mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04: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
@ -398,9 +398,9 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
|
||||
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 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
|
||||
pass
|
||||
|
||||
def system_tray_icon_activated(self, r):
|
||||
print r
|
||||
if r == QSystemTrayIcon.Trigger:
|
||||
if self.isVisible():
|
||||
self.hide_windows()
|
||||
@ -644,7 +643,7 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
|
||||
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 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
|
||||
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 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
|
||||
time.sleep(2)
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
self.hide()
|
||||
self.hide_windows()
|
||||
return True
|
||||
|
||||
def run_wizard(self, *args):
|
||||
@ -1697,7 +1696,7 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
|
||||
'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…
x
Reference in New Issue
Block a user