mirror of
https://github.com/Guake/guake.git
synced 2025-10-26 11:27:13 +00:00
Merge branch 'focus_if_open' of https://github.com/pypingou/guake into pypingou-focus_if_open
Conflicts: src/guake Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
This commit is contained in:
commit
ebe6f77bff
@ -649,5 +649,19 @@
|
||||
<long>Set it as false to enjoy guake's fullscreen.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/guake/general/focus_if_open</key>
|
||||
<applyto>/apps/guake/general/focus_if_open</applyto>
|
||||
<owner>guake</owner>
|
||||
<type>bool</type>
|
||||
<default>true</default>
|
||||
<locale name="C">
|
||||
<short>Give focus to guake if tab is opened.</short>
|
||||
<long>If the guake window is out of focus but open,
|
||||
enabling this will give it back the focus instead of closing the window.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
</schemalist>
|
||||
</gconfschemafile>
|
||||
|
||||
@ -874,8 +874,12 @@ class Guake(SimpleGladeApp):
|
||||
if not self.window.get_property('visible'):
|
||||
self.show()
|
||||
self.set_terminal_focus()
|
||||
else:
|
||||
elif not self.client.get_bool(KEY('general/focus_if_open')) and \
|
||||
self.window.window.get_state() == gtk.gdk.WINDOW_STATE_ABOVE:
|
||||
self.hide()
|
||||
else:
|
||||
self.show()
|
||||
self.set_terminal_focus()
|
||||
|
||||
def show(self):
|
||||
"""Shows the main window and grabs the focus on it.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user