mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -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_a_view.connect_dirtied_signal(self.upload_booklists)
|
||||||
self.card_b_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:
|
if self.system_tray_icon.isVisible() and opts.start_in_tray:
|
||||||
self.hide()
|
self.hide_windows()
|
||||||
self.stack.setCurrentIndex(0)
|
self.stack.setCurrentIndex(0)
|
||||||
try:
|
try:
|
||||||
db = LibraryDatabase2(self.library_path)
|
db = LibraryDatabase2(self.library_path)
|
||||||
@ -515,7 +515,6 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def system_tray_icon_activated(self, r):
|
def system_tray_icon_activated(self, r):
|
||||||
print r
|
|
||||||
if r == QSystemTrayIcon.Trigger:
|
if r == QSystemTrayIcon.Trigger:
|
||||||
if self.isVisible():
|
if self.isVisible():
|
||||||
self.hide_windows()
|
self.hide_windows()
|
||||||
@ -644,7 +643,7 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
|
|||||||
self.add_filesystem_book(path)
|
self.add_filesystem_book(path)
|
||||||
self.setWindowState(self.windowState() & \
|
self.setWindowState(self.windowState() & \
|
||||||
~Qt.WindowMinimized|Qt.WindowActive)
|
~Qt.WindowMinimized|Qt.WindowActive)
|
||||||
self.show()
|
self.show_windows()
|
||||||
self.raise_()
|
self.raise_()
|
||||||
self.activateWindow()
|
self.activateWindow()
|
||||||
elif msg.startswith('refreshdb:'):
|
elif msg.startswith('refreshdb:'):
|
||||||
@ -1661,7 +1660,7 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
|
|||||||
self.spare_servers.pop().close()
|
self.spare_servers.pop().close()
|
||||||
self.device_manager.keep_going = False
|
self.device_manager.keep_going = False
|
||||||
self.cover_cache.stop()
|
self.cover_cache.stop()
|
||||||
self.hide()
|
self.hide_windows()
|
||||||
self.cover_cache.terminate()
|
self.cover_cache.terminate()
|
||||||
self.emailer.stop()
|
self.emailer.stop()
|
||||||
try:
|
try:
|
||||||
@ -1673,7 +1672,7 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
|
|||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
pass
|
pass
|
||||||
self.hide()
|
self.hide_windows()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def run_wizard(self, *args):
|
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 '
|
'choose <b>Quit</b> in the context menu of the '
|
||||||
'system tray.')).exec_()
|
'system tray.')).exec_()
|
||||||
dynamic['systray_msg'] = True
|
dynamic['systray_msg'] = True
|
||||||
self.hide()
|
self.hide_windows()
|
||||||
e.ignore()
|
e.ignore()
|
||||||
else:
|
else:
|
||||||
if self.confirm_quit():
|
if self.confirm_quit():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user