- Added start minimized as a config option. Keeping arg
This commit is contained in:
parent
a45954246b
commit
17c6d0d140
3 changed files with 101 additions and 31 deletions
|
|
@ -2091,7 +2091,7 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=5 -->
|
||||
<!-- n-columns=2 n-rows=6 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
|
|
@ -2130,29 +2130,28 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="name">core_show_tray_icon_label</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Show Tray Icon</property>
|
||||
<property name="label" translatable="yes">Run Configuration on Startup</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton">
|
||||
<property name="name">core_show_tray_icon</property>
|
||||
<property name="name">core_run_conf_on_startup</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
<signal name="toggled" handler="core_show_tray_icon_changed" swapped="no"/>
|
||||
<signal name="toggled" handler="core_run_conf_on_startup_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
|
@ -2184,34 +2183,36 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="name">core_show_tray_icon_label</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Run Configuration on Startup</property>
|
||||
<property name="label" translatable="yes">Show Tray Icon</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton">
|
||||
<property name="name">core_run_conf_on_startup</property>
|
||||
<property name="name">core_show_tray_icon</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
<signal name="toggled" handler="core_run_conf_on_startup_changed" swapped="no"/>
|
||||
<signal name="toggled" handler="core_show_tray_icon_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Hide overlays</property>
|
||||
<property name="label" translatable="yes">Start Settings Minimized</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
|
|
@ -2219,6 +2220,20 @@
|
|||
<property name="top-attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton">
|
||||
<property name="name">core_settings_min</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
<signal name="toggled" handler="core_settings_min_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton">
|
||||
<property name="name">core_hide_overlay</property>
|
||||
|
|
@ -2229,7 +2244,19 @@
|
|||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">4</property>
|
||||
<property name="top-attach">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Hide Overlays</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
|
|
|||
|
|
@ -2091,7 +2091,7 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=5 -->
|
||||
<!-- n-columns=2 n-rows=7 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
|
|
@ -2130,29 +2130,28 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="name">core_show_tray_icon_label</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Show Tray Icon</property>
|
||||
<property name="label" translatable="yes">Run Configuration on Startup</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton">
|
||||
<property name="name">core_show_tray_icon</property>
|
||||
<property name="name">core_run_conf_on_startup</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
<signal name="toggled" handler="core_show_tray_icon_changed" swapped="no"/>
|
||||
<signal name="toggled" handler="core_run_conf_on_startup_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
|
@ -2184,34 +2183,36 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="name">core_show_tray_icon_label</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Run Configuration on Startup</property>
|
||||
<property name="label" translatable="yes">Show Tray Icon</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton">
|
||||
<property name="name">core_run_conf_on_startup</property>
|
||||
<property name="name">core_show_tray_icon</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
<signal name="toggled" handler="core_run_conf_on_startup_changed" swapped="no"/>
|
||||
<signal name="toggled" handler="core_show_tray_icon_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Hide overlays</property>
|
||||
<property name="label" translatable="yes">Start Settings Minimized</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
|
|
@ -2219,6 +2220,20 @@
|
|||
<property name="top-attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton">
|
||||
<property name="name">core_settings_min</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
<signal name="toggled" handler="core_settings_min_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton">
|
||||
<property name="name">core_hide_overlay</property>
|
||||
|
|
@ -2226,13 +2241,30 @@
|
|||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
<signal name="toggled" handler="core_hide_overlay_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">4</property>
|
||||
<property name="top-attach">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Hide Overlays</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">4</property>
|
||||
|
|
|
|||
|
|
@ -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()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue