mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Implement #1661 (Start minimized in tray)
This commit is contained in:
parent
fb0cc73f40
commit
5887406fc5
@ -296,6 +296,8 @@ class Main(MainWindow, Ui_MainWindow):
|
||||
self.card_view.connect_dirtied_signal(self.upload_booklists)
|
||||
|
||||
self.show()
|
||||
if self.system_tray_icon.isVisible() and opts.start_in_tray:
|
||||
self.hide()
|
||||
self.stack.setCurrentIndex(0)
|
||||
try:
|
||||
db = LibraryDatabase2(self.library_path)
|
||||
@ -1527,6 +1529,8 @@ path_to_ebook to the database.
|
||||
''')
|
||||
parser.add_option('--with-library', default=None, action='store',
|
||||
help=_('Use the library located at the specified path.'))
|
||||
parser.add_option('--start-in-tray', default=False, action='store_true',
|
||||
help=_('Start minimized to system tray.'))
|
||||
parser.add_option('-v', '--verbose', default=0, action='count',
|
||||
help=_('Log debugging information to console'))
|
||||
return parser
|
||||
|
@ -186,7 +186,7 @@ class RecursiveFetcher(object, LoggingInterface):
|
||||
if hasattr(err, 'code') and responses.has_key(err.code):
|
||||
raise FetchError, responses[err.code]
|
||||
if getattr(err, 'reason', [0])[0] == 104 or \
|
||||
getattr(err, 'errno', None) == -2: # Connection reset by peer or Name or service not know
|
||||
getattr(getattr(err, 'args', [None])[0], 'errno', None) == -2: # Connection reset by peer or Name or service not know
|
||||
self.log_debug('Temporary error, retrying in 1 second')
|
||||
time.sleep(1)
|
||||
with closing(self.browser.open(url)) as f:
|
||||
|
Loading…
x
Reference in New Issue
Block a user