diff options
Diffstat (limited to 'src/window.py')
-rw-r--r-- | src/window.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/window.py b/src/window.py index df63e36..8a4eab7 100644 --- a/src/window.py +++ b/src/window.py @@ -28,6 +28,7 @@ class WeegtkWindow(Adw.ApplicationWindow): content_page = Gtk.Template.Child() color_scheme_button = Gtk.Template.Child() split_view = Gtk.Template.Child() + primary_menu = Gtk.Template.Child() def __init__(self, **kwargs): super().__init__(**kwargs) @@ -41,6 +42,9 @@ class WeegtkWindow(Adw.ApplicationWindow): self.notify_system_supports_color_schemes_cb() self.notify_visible_child_cb() + def set_connect_label(self): + pass + def notify_system_supports_color_schemes_cb(self): manager = Adw.StyleManager.get_default() supports = manager.get_system_supports_color_schemes() @@ -57,9 +61,14 @@ class WeegtkWindow(Adw.ApplicationWindow): if child is None: return page = self.stack.get_page(child) - self.content_page.set_title(page.get_title()) + page_title = "Weegtk" if page.get_title() is None else page.get_title() + self.content_page.set_title(page_title) self.split_view.set_show_content(True) + def set_page(self, page): + page_name = page.get_name() + self.stack.set_visible_child_name(page_name) + @Gtk.Template.Callback() def get_color_scheme_icon_name(self, user_data, dark): return "light-mode-symbolic" if dark else "dark-mode-symbolic" @@ -68,3 +77,4 @@ class WeegtkWindow(Adw.ApplicationWindow): def color_scheme_button_clicked_cb(self, *args): raise NotImplementedError + |