mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-26 15:36:23 +01:00
User show_windows and hide_windows to ensure all windows are shown and hidden properly.
This commit is contained in:
parent
119afd3fc7
commit
96b2b71241
1 changed files with 6 additions and 7 deletions
|
|
@ -398,9 +398,9 @@ def __init__(self, listener, opts, actions, parent=None):
|
|||
self.card_a_view.connect_dirtied_signal(self.upload_booklists)
|
||||
self.card_b_view.connect_dirtied_signal(self.upload_booklists)
|
||||
|
||||
self.show()
|
||||
self.show_windows()
|
||||
if self.system_tray_icon.isVisible() and opts.start_in_tray:
|
||||
self.hide()
|
||||
self.hide_windows()
|
||||
self.stack.setCurrentIndex(0)
|
||||
try:
|
||||
db = LibraryDatabase2(self.library_path)
|
||||
|
|
@ -515,7 +515,6 @@ def no_op(self, *args):
|
|||
pass
|
||||
|
||||
def system_tray_icon_activated(self, r):
|
||||
print r
|
||||
if r == QSystemTrayIcon.Trigger:
|
||||
if self.isVisible():
|
||||
self.hide_windows()
|
||||
|
|
@ -644,7 +643,7 @@ def another_instance_wants_to_talk(self):
|
|||
self.add_filesystem_book(path)
|
||||
self.setWindowState(self.windowState() & \
|
||||
~Qt.WindowMinimized|Qt.WindowActive)
|
||||
self.show()
|
||||
self.show_windows()
|
||||
self.raise_()
|
||||
self.activateWindow()
|
||||
elif msg.startswith('refreshdb:'):
|
||||
|
|
@ -1661,7 +1660,7 @@ def shutdown(self, write_settings=True):
|
|||
self.spare_servers.pop().close()
|
||||
self.device_manager.keep_going = False
|
||||
self.cover_cache.stop()
|
||||
self.hide()
|
||||
self.hide_windows()
|
||||
self.cover_cache.terminate()
|
||||
self.emailer.stop()
|
||||
try:
|
||||
|
|
@ -1673,7 +1672,7 @@ def shutdown(self, write_settings=True):
|
|||
time.sleep(2)
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
self.hide()
|
||||
self.hide_windows()
|
||||
return True
|
||||
|
||||
def run_wizard(self, *args):
|
||||
|
|
@ -1697,7 +1696,7 @@ def closeEvent(self, e):
|
|||
'choose <b>Quit</b> in the context menu of the '
|
||||
'system tray.')).exec_()
|
||||
dynamic['systray_msg'] = True
|
||||
self.hide()
|
||||
self.hide_windows()
|
||||
e.ignore()
|
||||
else:
|
||||
if self.confirm_quit():
|
||||
|
|
|
|||
Loading…
Reference in a new issue