From 80f950c9b774f9bb18918026ad547b784a62de76 Mon Sep 17 00:00:00 2001 From: Henri Wahl Date: Sun, 8 Dec 2019 23:35:46 +0100 Subject: [PATCH] qApp -> APP --- Nagstamon/QUI/__init__.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Nagstamon/QUI/__init__.py b/Nagstamon/QUI/__init__.py index 52ab7053..c312bd03 100644 --- a/Nagstamon/QUI/__init__.py +++ b/Nagstamon/QUI/__init__.py @@ -1637,7 +1637,7 @@ def hide_window_if_not_under_mouse(self): mouse_pos = QCursor.pos() # Check mouse cursor over window and an opened context menu or dropdown list if self.geometry().contains(mouse_pos.x(), mouse_pos.y()) or\ - not qApp.activePopupWidget() is None or \ + not APP.activePopupWidget() is None or \ self.is_shown: return False @@ -2120,7 +2120,7 @@ def raise_window_on_all_desktops(self): if OS == OS_WINDOWS and\ not conf.fullscreen and\ not conf.windowed and\ - qApp.activePopupWidget() == None: + APP.activePopupWidget() == None: # find out if no context menu is shown and thus would be # overlapped by statuswindow for vbox in self.servers_vbox.children(): @@ -3267,7 +3267,7 @@ def __init__(self, columncount, rowcount, sort_column, sort_order, server, paren self.worker.finish.connect(self.finish_worker_thread) # receive information if action menu is shown - self.action_menu.is_shown.connect(self.worker.track_action_menu) + # self.action_menu.is_shown.connect(self.worker.track_action_menu) # get status if started self.worker_thread.started.connect(self.worker.get_status) @@ -4046,7 +4046,7 @@ class Worker(QObject): last_sort_order = 0 # keep track of action menu being shown or not to avoid refresh while selecting multiple items - action_menu_shown = False + # action_menu_shown = False def __init__(self, parent=None, server=None, sort_column=0, sort_order=0): QObject.__init__(self) @@ -4067,7 +4067,8 @@ def get_status(self): # if counter is at least update interval get status if self.server.thread_counter >= conf.update_interval_seconds: # only if no multiple selection is done at the moment and no context action menu is open - if not is_modifier_pressed() and not self.action_menu_shown: + # if not is_modifier_pressed() and not self.action_menu_shown: + if not is_modifier_pressed() and APP.activePopupWidget() is None: # reflect status retrieval attempt on server vbox label self.change_label_status.emit('Refreshing...', '') @@ -4472,9 +4473,9 @@ def unfresh_event_history(self): for event in self.server.events_history.keys(): self.server.events_history[event] = False - @pyqtSlot(bool) - def track_action_menu(self, action_menu_shown): - self.action_menu_shown = action_menu_shown + # @pyqtSlot(bool) + # def track_action_menu(self, action_menu_shown): + # self.action_menu_shown = action_menu_shown class Dialogs(object):