diff --git a/discover_overlay/glade/settings.glade b/discover_overlay/glade/settings.glade index b03605d..d40f707 100644 --- a/discover_overlay/glade/settings.glade +++ b/discover_overlay/glade/settings.glade @@ -2091,7 +2091,7 @@ - + True False @@ -2130,29 +2130,28 @@ - core_show_tray_icon_label True False - Show Tray Icon + Run Configuration on Startup 0 0 - 3 + 1 - core_show_tray_icon + core_run_conf_on_startup True True False True - + 1 - 3 + 1 @@ -2184,34 +2183,36 @@ + core_show_tray_icon_label True False - Run Configuration on Startup + Show Tray Icon + 0 0 - 1 + 3 - core_run_conf_on_startup + core_show_tray_icon True True False True - + 1 - 1 + 3 True False - Hide overlays + Start Settings Minimized 0 @@ -2219,6 +2220,20 @@ 4 + + + core_settings_min + True + True + False + True + + + + 1 + 4 + + core_hide_overlay @@ -2229,7 +2244,19 @@ 1 - 4 + 5 + + + + + True + False + Hide Overlays + 0 + + + 0 + 5 diff --git a/discover_overlay/glade/settings.glade~ b/discover_overlay/glade/settings.glade~ index ca2ac5e..3abff46 100644 --- a/discover_overlay/glade/settings.glade~ +++ b/discover_overlay/glade/settings.glade~ @@ -2091,7 +2091,7 @@ - + True False @@ -2130,29 +2130,28 @@ - core_show_tray_icon_label True False - Show Tray Icon + Run Configuration on Startup 0 0 - 3 + 1 - core_show_tray_icon + core_run_conf_on_startup True True False True - + 1 - 3 + 1 @@ -2184,34 +2183,36 @@ + core_show_tray_icon_label True False - Run Configuration on Startup + Show Tray Icon + 0 0 - 1 + 3 - core_run_conf_on_startup + core_show_tray_icon True True False True - + 1 - 1 + 3 True False - Hide overlays + Start Settings Minimized 0 @@ -2219,6 +2220,20 @@ 4 + + + core_settings_min + True + True + False + True + + + + 1 + 4 + + core_hide_overlay @@ -2226,13 +2241,30 @@ True False True - 1 - 4 + 5 + + + True + False + Hide Overlays + 0 + + + 0 + 5 + + + + + + + + 4 diff --git a/discover_overlay/settings_window.py b/discover_overlay/settings_window.py index 3e5884f..9aff72d 100644 --- a/discover_overlay/settings_window.py +++ b/discover_overlay/settings_window.py @@ -138,7 +138,8 @@ class MainSettingsWindow(): self.populate_guild_menu() builder.connect_signals(self) - if not (self.show_sys_tray_icon and '--minimized' in self.args): + + if not self.start_minimized or not self.show_sys_tray_icon: window.show() def request_channels_from_guild(self, guild_id): @@ -448,10 +449,16 @@ class MainSettingsWindow(): "general", "showsystray", fallback=True) self.set_sys_tray_icon_visible(self.show_sys_tray_icon) self.widget['core_show_tray_icon'].set_active(self.show_sys_tray_icon) - self.hidden_overlay = self.show_sys_tray_icon = config.getboolean( + + self.hidden_overlay = config.getboolean( "general", "hideoverlay", fallback=False) self.update_toggle_overlay() + self.start_minimized = config.getboolean( + "general", "start_min", fallback=False) + + self.widget['core_settings_min'].set_sensitive(self.show_sys_tray_icon) + def make_colour(self, col): col = json.loads(col) return Gdk.RGBA(col[0], col[1], col[2], col[3]) @@ -982,6 +989,10 @@ class MainSettingsWindow(): def core_show_tray_icon_changed(self, button): self.set_sys_tray_icon_visible(button.get_active()) self.config_set("general", "showsystray", "%s" % (button.get_active())) + self.widget['core_settings_min'].set_sensitive(button.get_active()) def core_hide_overlay_changed(self, button): self.toggle_overlay() + + def core_settings_min_changed(self, button): + self.config_set("general", "start_min", "%s" % (button.get_active()))