diff --git a/GTG/gtk/browser/main_window.py b/GTG/gtk/browser/main_window.py index d9629363de..5426019d6f 100644 --- a/GTG/gtk/browser/main_window.py +++ b/GTG/gtk/browser/main_window.py @@ -241,6 +241,7 @@ def _init_widget_aliases(self): self.menu_view_workview = self.builder.get_object("view_workview") self.toggle_workview = self.builder.get_object("workview_toggle") self.search_entry = self.builder.get_object("search_entry") + self.search_cheatsheet = self.builder.get_object("search_cheatsheet") self.searchbar = self.builder.get_object("searchbar") self.search_button = self.builder.get_object("search_button") self.quickadd_entry = self.builder.get_object("quickadd_field") @@ -260,6 +261,17 @@ def _init_widget_aliases(self): self.tagpopup = TagContextMenu(self.req, self.app) + # Setup search syntax popup button + self.search_entry.connect('icon-release', + self.on_search_box_help_icon_click) + + + def on_search_box_help_icon_click(self, widget, icon_pos, event) -> None: + """Show search syntax popup""" + + self.search_cheatsheet.popup() + + def _init_ui_widget(self): """ Sets the main pane with three trees for active tasks, actionable tasks (workview), closed tasks and creates diff --git a/GTG/gtk/data/main_window.ui b/GTG/gtk/data/main_window.ui index 869357055d..37c2b6501a 100644 --- a/GTG/gtk/data/main_window.ui +++ b/GTG/gtk/data/main_window.ui @@ -3,57 +3,59 @@ - False - 6 - center-on-parent - dialog - gtg + False + 6 + center-on-parent + dialog + gtg True - False + False vertical 2 True - False - end + False + end False True - end + end 0 - - - + + + 100 + 1 + 10 main_menu - False + False True - False - 14 - 14 - 8 - 8 + False + 14 + 14 + 8 + 8 vertical True - False - True - Start today - win.start_today + False + True + Start today + win.start_today Today @@ -65,9 +67,9 @@ True - False - 6 - 6 + False + 6 + 6 False @@ -78,10 +80,10 @@ True - False - True - Start 2 days from now - win.start_next_day_2 + False + True + Start 2 days from now + win.start_next_day_2 Tuesday @@ -93,10 +95,10 @@ True - False - True - Start 3 days from now - win.start_next_day_3 + False + True + Start 3 days from now + win.start_next_day_3 Wednesday @@ -108,10 +110,10 @@ True - False - True - Start 4 days from now - win.start_next_day_4 + False + True + Start 4 days from now + win.start_next_day_4 Thursday @@ -123,10 +125,10 @@ True - False - True - Start 5 days from now - win.start_next_day_5 + False + True + Start 5 days from now + win.start_next_day_5 Friday @@ -138,10 +140,10 @@ True - False - True - Start 6 days from now - win.start_next_day_6 + False + True + Start 6 days from now + win.start_next_day_6 Saturday @@ -153,9 +155,9 @@ True - False - True - win.start_custom + False + True + win.start_custom Pick a Date... @@ -167,9 +169,9 @@ True - False - 6 - 6 + False + 6 + 6 False @@ -180,9 +182,9 @@ True - False - True - win.start_clear + False + True + win.start_clear Clear Start Date @@ -200,22 +202,23 @@ main_menu - False + False True - False - 14 - 14 - 8 - 8 + False + 14 + 14 + 8 + 8 vertical True - Show Sidebar + False + False win.sidebar - + Show Sidebar False @@ -226,7 +229,7 @@ True - False + False False @@ -237,8 +240,9 @@ True - True - win.collapse_all_tasks + False + True + win.collapse_all_tasks Collapse All Tasks @@ -250,8 +254,9 @@ True - True - win.expand_all_tasks + False + True + win.expand_all_tasks Expand All Tasks @@ -263,9 +268,9 @@ True - False - 6 - 6 + False + 6 + 6 False @@ -276,8 +281,9 @@ True - True - app.open_plugins + False + True + app.open_plugins Plugins @@ -290,7 +296,8 @@ True False - True + False + True Synchronization @@ -302,9 +309,9 @@ True - False - 6 - 6 + False + 6 + 6 False @@ -315,8 +322,9 @@ True - True - app.open_preferences + False + True + app.open_preferences Preferences @@ -328,8 +336,9 @@ True - True - win.show-help-overlay + False + True + win.show-help-overlay Keyboard Shortcuts @@ -341,8 +350,9 @@ True - True - app.open_help + False + True + app.open_help Help @@ -354,8 +364,9 @@ True - True - app.open_about + False + True + app.open_about About GTG @@ -373,30 +384,30 @@ True - False + False vertical True - True + True - 75 - False + 75 + False vertical True - True - 10 - 10 - bottom - False - False + True + 10 + 10 + bottom + False + False True - True + True @@ -408,11 +419,11 @@ True - False + False Tags - False + False @@ -434,30 +445,31 @@ True - False + False vertical True - True - True - True + True + True + True center True - False + False 6 True - True - True - True - True - 40 - False - Search here + True + True + True + True + 40 + help-faq-symbolic + False + Search here @@ -470,9 +482,9 @@ Save Search True - False - False - win.save_search + False + False + win.save_search False @@ -492,17 +504,17 @@ True - True + True vertical True - False - crossfade + False + crossfade True - True + True @@ -515,7 +527,7 @@ True - True + True @@ -529,7 +541,7 @@ True - True + True @@ -556,23 +568,23 @@ True - False + False True - True - True - True - True - Ex.: "Buy a new printer for @Initech tags:equipment,office start:monday due:soon" - 10 - 10 - 7 - 7 - False - Quickly create tasks here - GTK_INPUT_HINT_SPELLCHECK | GTK_INPUT_HINT_NONE - True + True + True + True + True + Ex.: "Buy a new printer for @Initech tags:equipment,office start:monday due:soon" + 10 + 10 + 7 + 7 + False + Quickly create tasks here + GTK_INPUT_HINT_SPELLCHECK | GTK_INPUT_HINT_NONE + True @@ -607,28 +619,28 @@ True - False - True + False + True True - False + False stack True - False - False - Create a new task + False + False + Create a new task center - app.new_task + app.new_task True - False - list-add-symbolic + False + list-add-symbolic 1 @@ -637,58 +649,58 @@ True - False - True + False + True main_menu True - False - open-menu-symbolic + False + open-menu-symbolic - end + end 1 True - False - False - Activate Search Entry + False + False + Activate Search Entry center - win.search + win.search True - False - edit-find-symbolic + False + edit-find-symbolic 1 - end + end 3 True - False + False start Start Tomorrow True False - False - True - Out of time? Need additional focus? Easily defer the selected task(s) to tomorrow! - win.start_tomorrow + False + True + Out of time? Need additional focus? Easily defer the selected task(s) to tomorrow! + win.start_tomorrow True @@ -700,16 +712,16 @@ True False - False - True + False + True defer_menu True False - False + False start - pan-down-symbolic + pan-down-symbolic 1 @@ -733,4 +745,438 @@ + + False + end + search_entry + + + True + False + 36 + 36 + 16 + 22 + vertical + + + True + False + 20 + Search Syntax + 0 + + + + + + + False + True + 0 + + + + + True + False + adjustment1 + none + + + + True + False + 6 + 25 + + + True + False + !notag + 0 + + + 0 + 0 + + + + + True + False + Tasks without tags + 0 + + + + 1 + 0 + + + + + True + False + @tag + 0 + + + 0 + 1 + + + + + True + False + Tasks with this tag + 0 + + + + 1 + 1 + + + + + True + False + [word] + 0 + + + 0 + 2 + + + + + True + False + Tasks that contain [word] + 0 + + + + 1 + 2 + + + + + True + False + "Some Text" + 0 + + + 0 + 3 + + + + + True + False + Tasks that contain exactly the text in quotes + 0 + + + + 1 + 3 + + + + + True + False + !before [date] + 2.2351741291171123e-10 + + + 0 + 4 + + + + + True + False + Tasks that need to be done before [date] + 0 + + + + 1 + 4 + + + + + True + False + !after [date] + 0 + + + 0 + 5 + + + + + True + False + Tasks that need to be done after [date] + 0 + + + + 1 + 5 + + + + + True + False + !today + 0 + + + 0 + 6 + + + + + True + False + Tasks that are due today + 0 + + + + 1 + 6 + + + + + True + False + !tomorrow + 0 + + + 0 + 7 + + + + + True + False + !nodate + 0 + + + 0 + 8 + + + + + True + False + !now + 0 + + + 0 + 9 + + + + + True + False + !soon + 0 + + + 0 + 10 + + + + + True + False + Tasks that are due tomorrow + 0 + + + + 1 + 7 + + + + + True + False + Tasks without a set due date + 0 + + + + 1 + 8 + + + + + True + False + Tasks with due date defined as "now" + 0 + + + + 1 + 9 + + + + + True + False + Tasks with due date defined as "soon" + 0 + + + + 1 + 10 + + + + + True + False + !someday + 0 + + + 0 + 11 + + + + + True + False + !not [query] + 0 + + + 0 + 12 + + + + + True + False + [query] !or [query] + 0 + + + 0 + 13 + + + + + True + False + Tasks with due date defined as "someday" + 0 + + + + 1 + 11 + + + + + True + False + Tasks that do not include the next part of the query + 0 + + + + 1 + 12 + + + + + True + False + Tasks with one of the specified elements in the query + 0 + + + + 1 + 13 + + + + + + + False + True + 1 + + + + +