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))