Fix a regression in 2.72 that broke the --start-in-tray command line option. Fixes #1644876 [calibre --start-in-tray does not work anymore on Win10](https://bugs.launchpad.net/calibre/+bug/1644876)

This commit is contained in:
Kovid Goyal 2016-12-04 20:07:27 +05:30
parent ee5711f0ba
commit cc0d25c123

View File

@ -84,6 +84,7 @@ class Listener(Thread): # {{{
# }}} # }}}
_gui = None _gui = None
@ -348,8 +349,6 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{
LibraryViewMixin.init_library_view_mixin(self, db) LibraryViewMixin.init_library_view_mixin(self, db)
SearchBoxMixin.init_search_box_mixin(self) # Requires current_db SearchBoxMixin.init_search_box_mixin(self) # Requires current_db
if self.system_tray_icon is not None and self.system_tray_icon.isVisible() and opts.start_in_tray:
self.hide_windows()
self.library_view.model().count_changed_signal.connect( self.library_view.model().count_changed_signal.connect(
self.iactions['Choose Library'].count_changed) self.iactions['Choose Library'].count_changed)
if not gprefs.get('quick_start_guide_added', False): if not gprefs.get('quick_start_guide_added', False):
@ -423,6 +422,8 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{
# Note this has to come after restoreGeometry() because of # Note this has to come after restoreGeometry() because of
# https://bugreports.qt.io/browse/QTBUG-56831 # https://bugreports.qt.io/browse/QTBUG-56831
self.show() self.show()
if self.system_tray_icon is not None and self.system_tray_icon.isVisible() and opts.start_in_tray:
self.hide_windows()
self.auto_adder = AutoAdder(gprefs['auto_add_path'], self) self.auto_adder = AutoAdder(gprefs['auto_add_path'], self)
self.save_layout_state() self.save_layout_state()