mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-30 23:00:21 -04:00
Show device open popup messages only once per session
Fixes #2039864 [Lots of warning popups about Amazon having broken cover screen](https://bugs.launchpad.net/calibre/+bug/2039864)
This commit is contained in:
parent
fd6742faa7
commit
69141dcd6a
@ -195,6 +195,7 @@ class DeviceManager(Thread): # {{{
|
||||
self.keep_going = True
|
||||
self.job_manager = job_manager
|
||||
self.reported_errors = set()
|
||||
self.shown_open_popups = set()
|
||||
self.current_job = None
|
||||
self.scanner = DeviceScanner()
|
||||
self.connected_device = None
|
||||
@ -233,7 +234,8 @@ class DeviceManager(Thread): # {{{
|
||||
opm = dev.get_open_popup_message()
|
||||
if opm is not None:
|
||||
skip_key = f'do_not_show_device_open_popup_message_{dev.__class__.__name__}'
|
||||
if not gprefs.get(skip_key, False):
|
||||
if skip_key not in self.shown_open_popups and not gprefs.get(skip_key, False):
|
||||
self.shown_open_popups.add(skip_key)
|
||||
self.open_feedback_msg(dev.get_gui_name(), convert_open_popup(opm, skip_key))
|
||||
try:
|
||||
dev.reset(detected_device=detected_device,
|
||||
|
Loading…
x
Reference in New Issue
Block a user