Always bring manager to front on icon click.(#565)
This commit is contained in:
parent
47157e93a1
commit
9d509917d6
@ -1722,7 +1722,7 @@ class QubesTrayIcon(QSystemTrayIcon):
|
|||||||
# Handle the right click normally, i.e. display the context menu
|
# Handle the right click normally, i.e. display the context menu
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
toggle_manager()
|
bring_manager_to_front()
|
||||||
|
|
||||||
def addActions(self, target, actions):
|
def addActions(self, target, actions):
|
||||||
for action in actions:
|
for action in actions:
|
||||||
@ -1773,28 +1773,28 @@ def get_frame_size():
|
|||||||
manager_window.frame_height = h
|
manager_window.frame_height = h
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
def show_manager():
|
def show_manager():
|
||||||
manager_window.show()
|
manager_window.show()
|
||||||
|
manager_window.set_table_geom_size()
|
||||||
|
manager_window.update_table(True)
|
||||||
|
|
||||||
def toggle_manager():
|
get_frame_size()
|
||||||
|
#print manager_window.frame_width, " x ", manager_window.frame_height
|
||||||
|
manager_window.set_table_geom_size()
|
||||||
|
|
||||||
|
def bring_manager_to_front():
|
||||||
|
|
||||||
if manager_window.isVisible():
|
if manager_window.isVisible():
|
||||||
manager_window.hide()
|
subprocess.check_call(['wmctrl', '-R', str(manager_window.windowTitle())])
|
||||||
else:
|
|
||||||
manager_window.show()
|
|
||||||
manager_window.set_table_geom_size()
|
|
||||||
manager_window.update_table(True)
|
|
||||||
|
|
||||||
get_frame_size()
|
else:
|
||||||
print manager_window.frame_width, " x ", manager_window.frame_height
|
show_manager()
|
||||||
manager_window.set_table_geom_size()
|
|
||||||
|
|
||||||
|
|
||||||
def exit_app():
|
def exit_app():
|
||||||
notifier.stop()
|
notifier.stop()
|
||||||
app.exit()
|
app.exit()
|
||||||
|
|
||||||
|
|
||||||
# Bases on the original code by:
|
# Bases on the original code by:
|
||||||
# Copyright (c) 2002-2007 Pascal Varet <p.varet@gmail.com>
|
# Copyright (c) 2002-2007 Pascal Varet <p.varet@gmail.com>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Vendor: Invisible Things Lab
|
|||||||
License: GPL
|
License: GPL
|
||||||
URL: http://fixme
|
URL: http://fixme
|
||||||
Requires: python, PyQt4, qubes-core-dom0 > 1.7.23, kdebase
|
Requires: python, PyQt4, qubes-core-dom0 > 1.7.23, kdebase
|
||||||
Requires: pmount, cryptsetup
|
Requires: pmount, cryptsetup, wmctrl
|
||||||
BuildRequires: PyQt4-devel
|
BuildRequires: PyQt4-devel
|
||||||
AutoReq: 0
|
AutoReq: 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user