mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Do not show system tray notification popups while analyzing books on device, as they can be slow on systems that display multiple messages serially instead of replacing the last message
This commit is contained in:
parent
8c67730759
commit
58c084e68b
@ -1805,7 +1805,7 @@ class DeviceMixin(object): # {{{
|
|||||||
if current_book_count % 100 == 0:
|
if current_book_count % 100 == 0:
|
||||||
self.status_bar.show_message(
|
self.status_bar.show_message(
|
||||||
_('Analyzing books on the device: %d%% finished')%(
|
_('Analyzing books on the device: %d%% finished')%(
|
||||||
int((float(current_book_count)/total_book_count)*100.0)))
|
int((float(current_book_count)/total_book_count)*100.0)), show_notification=False)
|
||||||
|
|
||||||
# I am assuming that this sort-of multi-threading won't break
|
# I am assuming that this sort-of multi-threading won't break
|
||||||
# anything. Reasons: excluding UI events prevents the user
|
# anything. Reasons: excluding UI events prevents the user
|
||||||
|
@ -227,9 +227,9 @@ class StatusBar(QStatusBar): # {{{
|
|||||||
self.device_string = ''
|
self.device_string = ''
|
||||||
self.set_label()
|
self.set_label()
|
||||||
|
|
||||||
def show_message(self, msg, timeout=0):
|
def show_message(self, msg, timeout=0, show_notification=True):
|
||||||
self.showMessage(msg, timeout)
|
self.showMessage(msg, timeout)
|
||||||
if self.notifier is not None and not config['disable_tray_notification']:
|
if self.notifier is not None and not config['disable_tray_notification'] and show_notification:
|
||||||
if isosx and isinstance(msg, unicode):
|
if isosx and isinstance(msg, unicode):
|
||||||
try:
|
try:
|
||||||
msg = msg.encode(preferred_encoding)
|
msg = msg.encode(preferred_encoding)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user