diff --git a/Mailnag/configuration/configwindow.py b/Mailnag/configuration/configwindow.py index d86fb83..48f0107 100644 --- a/Mailnag/configuration/configwindow.py +++ b/Mailnag/configuration/configwindow.py @@ -43,6 +43,7 @@ class ConfigWindow: builder.add_from_file(get_data_file("config_window.ui")) builder.connect_signals({ \ "config_window_deleted" : self._on_config_window_deleted, \ + "btn_page_toggled" : self._on_btn_page_toggled, \ "btn_add_account_clicked" : self._on_btn_add_account_clicked, \ "btn_edit_account_clicked" : self._on_btn_edit_account_clicked, \ "btn_remove_account_clicked" : self._on_btn_remove_account_clicked, \ @@ -61,7 +62,14 @@ class ConfigWindow: self.daemon_enabled = False # - # general tab + # toggle buttons / notebook + # + self._notebook = builder.get_object("notebook") + self._box_navigation = builder.get_object("box_navigation") + self._box_navigation.get_children()[0].set_active(True) + + # + # general page # self._image_logo = builder.get_object("image_logo") pb = GdkPixbuf.Pixbuf.new_from_file_at_size(get_data_file("mailnag.svg"), 180, 180) @@ -72,7 +80,7 @@ class ConfigWindow: self._switch_daemon_enabled = builder.get_object("switch_daemon_enabled") # - # accounts tab + # accounts page # self._accounts = AccountList() @@ -99,7 +107,7 @@ class ConfigWindow: self._spinbutton_interval = builder.get_object("spinbutton_interval") # - # plugins tab + # plugins page # self._treeview_plugins = builder.get_object("treeview_plugins") self._liststore_plugins = builder.get_object("liststore_plugins") @@ -279,6 +287,18 @@ class ConfigWindow: os.remove(autostart_file) + def _on_btn_page_toggled(self, button): + if not button.get_active(): return + + page = 0 + for btn in self._box_navigation.get_children(): + if btn == button: + self._notebook.set_current_page(page) + else: + btn.set_active(False) + page += 1 + + def _on_account_toggled(self, cell, path): model = self._liststore_accounts iter = model.get_iter(path) diff --git a/data/config_window.ui b/data/config_window.ui index 7d05f04..98a2802 100644 --- a/data/config_window.ui +++ b/data/config_window.ui @@ -16,24 +16,112 @@ False - + True - True + False + vertical - + True False - vertical - 24 + 18 + 18 + 6 + 6 + True + - + + General + True + True + True + + + + False + True + 0 + + + + + Accounts + True + True + True + + + + False + True + 1 + + + + + Plugins + True + True + True + + + + False + True + 2 + + + + + False + True + 0 + + + + + True + True + False + False + + True False vertical + 12 - - - - - True - False - General - - - False - - - - - True - False - 12 - vertical - - - True - True - in - + True True - liststore_accounts - False - True - False - 1 - - - + center + + + False + False + 2 + + + + + + + + + + True + False + 12 + vertical + + + True + True + in + + + True + True + liststore_accounts + False + True + False + 1 + + + + + - - - - True - True - 0 - - - - - True - False - icons - 1 - - - - True - False - Add Account - list-add-symbolic - - - False - True - - - - - True - False - Remove Account - list-remove-symbolic - - - - False - True - - - - - True - False - Edit Account - text-editor-symbolic - - - - False - True - - - - - False - True - 1 - - - - - True - False - 12 - 6 - - - True - False - start - 0 - Check interval: - - - False + True True 0 - + True - True - - True - 0.10000000149011612 - adjustment1 - True + False + icons + 1 + + + + True + False + Add Account + list-add-symbolic + + + + False + True + + + + + True + False + Remove Account + list-remove-symbolic + + + + False + True + + + + + True + False + Edit Account + text-editor-symbolic + + + + False + True + + False @@ -225,118 +250,145 @@ and contributors. - + True False - 0 - minutes + 12 + 6 + + + True + False + start + 0 + Check interval: + + + False + True + 0 + + + + + True + True + + True + 0.10000000149011612 + adjustment1 + True + + + False + True + 1 + + + + + True + False + 0 + minutes + + + True + True + 2 + + - True + False True 2 - False - True - 2 + 1 - - - 1 - - - - - True - False - Accounts - - - 1 - False - - - - - True - False - 12 - vertical - - - True - True - in - - - True - True - liststore_plugins - False - True - False - 1 - - - - - - - - - - True - True - 0 - + + - + True False - icons - 1 - + 12 + vertical - + + True + True + in + + + True + True + liststore_plugins + False + True + False + 1 + + + + + + + + + + True + True + 0 + + + + True False - Edit Plugin - text-editor-symbolic - + icons + 1 + + + + True + False + Edit Plugin + text-editor-symbolic + + + + False + True + + False - True + True + 1 - False - True - 1 + 2 + + + - 2 - - - - - True - False - Plugins - - - 2 - False + True + True + 1