mirror of
https://github.com/Guake/guake.git
synced 2025-10-26 11:27:13 +00:00
Configuration for workspace-specific tab sets
This commit is contained in:
parent
f9a0791556
commit
e7530f7367
@ -36,6 +36,11 @@
|
||||
<summary>Sets the tray visibility.</summary>
|
||||
<description>When true tray is visible.</description>
|
||||
</key>
|
||||
<key name="workspace-specific-tab-sets" type="b">
|
||||
<default>false</default>
|
||||
<summary>Use workspace specific tab sets</summary>
|
||||
<description>When true, each workspace gets their own set of tabs.</description>
|
||||
</key>
|
||||
<key name="use-popup" type="b">
|
||||
<default>true</default>
|
||||
<summary>Sets the popup notifications visibility.</summary>
|
||||
|
||||
@ -321,6 +321,23 @@
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="workspace-specific-tab-sets">
|
||||
<property name="label" translatable="yes">Use workspace-specific tab sets</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_workspace_specific_tab_sets_toggled" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
|
||||
@ -145,13 +145,6 @@ class Guake(SimpleGladeApp):
|
||||
self.hidden = True
|
||||
self.forceHide = False
|
||||
|
||||
# Workspace tracking
|
||||
self.current_workspace = 0
|
||||
self.screen = Wnck.Screen.get_default()
|
||||
self.screen.connect("active-workspace-changed", self.workspace_changed)
|
||||
|
||||
self.notebooks = {}
|
||||
|
||||
# trayicon! Using SVG handles better different OS trays
|
||||
# img = pixmapfile('guake-tray.svg')
|
||||
# trayicon!
|
||||
@ -185,6 +178,15 @@ class Guake(SimpleGladeApp):
|
||||
self.mainframe = self.get_widget('mainframe')
|
||||
self.mainframe.remove(self.get_widget('notebook-teminals'))
|
||||
|
||||
# Workspace tracking
|
||||
self.notebooks = {}
|
||||
self.current_workspace = 0
|
||||
if self.settings.general.get_boolean('workspace-specific-tab-sets'):
|
||||
self.screen = Wnck.Screen.get_default()
|
||||
self.screen.connect("active-workspace-changed", self.workspace_changed)
|
||||
else:
|
||||
self.mainframe.add(self.notebook)
|
||||
|
||||
self.set_tab_position()
|
||||
|
||||
# check and set ARGB for real transparency
|
||||
|
||||
@ -386,6 +386,11 @@ class PrefsCallbacks():
|
||||
"""
|
||||
self.settings.general.set_boolean('use-popup', chk.get_active())
|
||||
|
||||
def on_workspace_specific_tab_sets_toggled(self, chk):
|
||||
"""Sets the 'workspace-specific-tab-sets' property in dconf
|
||||
"""
|
||||
self.settings.general.set_boolean('workspace-specific-tab-sets', chk.get_active())
|
||||
|
||||
def on_prompt_on_quit_toggled(self, chk):
|
||||
"""Set the `prompt on quit' property in dconf
|
||||
"""
|
||||
@ -1060,6 +1065,10 @@ class PrefsDialog(SimpleGladeApp):
|
||||
value = self.settings.general.get_boolean('use-popup')
|
||||
self.get_widget('use_popup').set_active(value)
|
||||
|
||||
# workspace-specific tab sets
|
||||
value = self.settings.general.get_boolean('workspace-specific-tab-sets')
|
||||
self.get_widget('workspace-specific-tab-sets').set_active(value)
|
||||
|
||||
# prompt on quit
|
||||
value = self.settings.general.get_boolean('prompt-on-quit')
|
||||
self.get_widget('prompt_on_quit').set_active(value)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user