diff options
author | Lucas Fryzek <lucas.fryzek@fryzekconcepts.com> | 2024-10-06 17:34:29 +0100 |
---|---|---|
committer | Lucas Fryzek <lucas.fryzek@fryzekconcepts.com> | 2024-10-06 17:34:29 +0100 |
commit | db10dc4fdd656b25442c63eb02ea30931eee300e (patch) | |
tree | 9b2a4e835d6d52b48c0e7fb9bcb83884999ee1da /src/window.py | |
parent | 0dc8409b168b293e9566dc5a35bded510fbd043d (diff) |
window: Add interface for connecting and disconnecting
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 + |