From a289b9d47a259394ffd7e9b82dfdbda63249c2c9 Mon Sep 17 00:00:00 2001 From: Manuel Date: Mon, 6 May 2024 16:07:56 +0200 Subject: [PATCH 1/3] Backspace can now unselect all tags --- timetagger/app/front.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/timetagger/app/front.py b/timetagger/app/front.py index 0bd2579..69dc25d 100644 --- a/timetagger/app/front.py +++ b/timetagger/app/front.py @@ -1452,6 +1452,8 @@ def _on_key(self, e): # elif e.key.lower() == "f": self._handle_button_press("search") + elif e.key.lower() == "backspace": + self._handle_button_press("select_none") # elif e.key.lower() == "arrowup" or e.key.lower() == "pageup": self._handle_button_press("nav_backward") @@ -1615,6 +1617,12 @@ def _handle_button_press(self, action): elif action == "nav_menu": self._canvas.timeselection_dialog.open() + elif action.startswith("select_"): + # A selection action + if action == 'select_none': + self._canvas.widgets.AnalyticsWidget.selected_tags = [] + self._canvas.widgets.AnalyticsWidget.update() + class RecordsWidget(Widget): """Widget that draws the records, ticks, handles record From 215ad48b60d4e76d425ba9fe127e46213245613d Mon Sep 17 00:00:00 2001 From: Manuel Date: Tue, 7 May 2024 12:45:57 +0200 Subject: [PATCH 2/3] Added the info about the new backspace shortcut into the GUI --- timetagger/app/dialogs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/timetagger/app/dialogs.py b/timetagger/app/dialogs.py index 4833f5a..e3629ac 100644 --- a/timetagger/app/dialogs.py +++ b/timetagger/app/dialogs.py @@ -3826,6 +3826,7 @@ def open(self, callback=None): "T": "Select time range", "R": "Open report dialog", "I": "Open the guide", + "Backspace": "Unselect all tags", } shortcuts_html = "" for key, expl in shortcuts.items(): From a647e44b3ddecf81f03b5462b49cd65817c6a403 Mon Sep 17 00:00:00 2001 From: Almar Klein Date: Thu, 18 Jul 2024 11:55:48 +0200 Subject: [PATCH 3/3] Update timetagger/app/front.py --- timetagger/app/front.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timetagger/app/front.py b/timetagger/app/front.py index 69dc25d..ae80c43 100644 --- a/timetagger/app/front.py +++ b/timetagger/app/front.py @@ -1619,7 +1619,7 @@ def _handle_button_press(self, action): elif action.startswith("select_"): # A selection action - if action == 'select_none': + if action == "select_none": self._canvas.widgets.AnalyticsWidget.selected_tags = [] self._canvas.widgets.AnalyticsWidget.update()