@@ 46,7 46,6 @@ class AboutDialog(Gtk.AboutDialog):
)
self.add_credit_section(_("Based on Lesana by"), ["valhalla", "https://git.trueelena.org/cgit.cgi/software/lesana"])
-
class CollectorWindow(Gtk.ApplicationWindow):
"""
The main application window
@@ 82,9 81,40 @@ class CollectorWindow(Gtk.ApplicationWindow):
self.add_action(action)
# main container
+ self.box = Gtk.VBox()
+
self.view = Gtk.Stack(
transition_type=Gtk.StackTransitionType.SLIDE_LEFT )
self.view.connect("notify::visible-child", self.on_page_changed)
+ self.box.pack_start(self.view, True, True, 0)
+
+ ## bottom part
+ # TODO: I don't really like this.This should be in "Recent" page, which
+ # can't be because itself is a scrolledview and I want this to be outside
+ # the scroll area.
+ # A better solution would be to have a multi-window approach:
+ # A "recent" window with open/clone/create UI, and a "browse" window
+ # with everithing else (like "builder" does). this would allow to have
+ # multiple collection opened at same time
+ self.box.pack_start(
+ Gtk.Separator(orientation=Gtk.Orientation.HORIZONTAL),
+ False, False, 2)
+ self.bottombox = Gtk.ButtonBox(
+ orientation=Gtk.Orientation.HORIZONTAL,
+ layout_style=Gtk.ButtonBoxStyle.SPREAD)
+
+ btn_new = Gtk.Button(label=_("Start new collection..."))
+ btn_open = Gtk.Button(label=_("Select folder..."))
+ btn_clone = Gtk.Button(label=_("Clone repository..."))
+
+ btn_open.set_action_name("app.open")
+
+ self.bottombox.add(btn_new)
+ self.bottombox.add(btn_open)
+ self.bottombox.add(btn_clone)
+
+ self.box.pack_start(self.bottombox, False, False, 8)
+
# overlay
self.overlay = Gtk.Overlay.new()
@@ 92,7 122,7 @@ class CollectorWindow(Gtk.ApplicationWindow):
self.notification = NotificationOverlay()
self.overlay.add_overlay(self.notification)
- self.overlay.add(self.view)
+ self.overlay.add(self.box)
self.add(self.overlay)