From 56b4e32f0d08d53043254213e47c5d01af9dd725 Mon Sep 17 00:00:00 2001 From: Faerbit Date: Thu, 3 Feb 2022 19:52:57 +0100 Subject: [PATCH] Revert "No clicky clicky" This reverts commit 0b9e415e0855b6981205b3cab883311678435edb. --- src/fime/main.py | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/src/fime/main.py b/src/fime/main.py index 461b477..53926b8 100755 --- a/src/fime/main.py +++ b/src/fime/main.py @@ -41,7 +41,6 @@ class App: self.menu_flipped = config.flip_menu self.menu = QtWidgets.QMenu(None) - self.menu.aboutToShow.connect(self.no_clickyclicky) self.import_task = ImportTask(config, None) self.import_task.accepted.connect(self.new_task_imported) @@ -62,24 +61,19 @@ class App: self.tray.setToolTip("fime") self.update_tray_menu() - self.clicky = False - @QtCore.Slot() def new_task_imported(self): - self.clicky = False if self.import_task.task_text: self.tasks.add_jira_task(self.import_task.task_text) - self.update_tray_menu() + self.update_tray_menu() @QtCore.Slot() def tasks_edited(self): - self.clicky = False self.tasks.tasks = self.taskEdit.tasks self.update_tray_menu() @QtCore.Slot() def log_edited(self): - self.clicky = False self.active_task = self.log.last_log() or "Nothing" @property @@ -97,16 +91,6 @@ class App: self.log.log(task) self.tasks.update_jira_task_usage(task) - @QtCore.Slot() - def no_clickyclicky(self): - if self.clicky: - self.menu.clear() - raise FimeException("No clicky clicky!!") - - def click(self, f): - self.clicky = True - f() - def update_tray_menu(self): menu_items = [] tmp_action = self.menu.addAction("tmp") @@ -131,10 +115,10 @@ class App: add_tasks(["Nothing"]) menu_items.append((1, None)) - menu_items.append(("Import Jira task", partial(self.click, self.import_task.show))) - menu_items.append(("Edit tasks", partial(self.click, self.edit_tasks))) - menu_items.append(("Report", partial(self.click, self.reportDialog.show))) - menu_items.append(("Worklog", partial(self.click, self.worklogDialog.show))) + menu_items.append(("Import Jira task", self.import_task.show)) + menu_items.append(("Edit tasks", self.edit_tasks)) + menu_items.append(("Report", self.reportDialog.show)) + menu_items.append(("Worklog", self.worklogDialog.show)) menu_items.append((1, None))