[gnome-notes/wip/igaldino/search-shortcut: 1/2] main-toolbar: Create new shortcut to search notes



commit e417e6830c918ff661d069538b36b1bd755ff403
Author: João Vieira <jvieira tpt gmail com>
Date:   Tue Feb 11 19:06:01 2020 +0000

    main-toolbar: Create new shortcut to search notes

 data/resources/help-overlay.ui | 7 +++++++
 src/bjb-main-toolbar.c         | 2 ++
 2 files changed, 9 insertions(+)
---
diff --git a/data/resources/help-overlay.ui b/data/resources/help-overlay.ui
index e342685..021f941 100644
--- a/data/resources/help-overlay.ui
+++ b/data/resources/help-overlay.ui
@@ -8,6 +8,13 @@
                     <object class="GtkShortcutsGroup">
                         <property name="title" translatable="yes" context="shortcut 
window">General</property>
                         <property name="visible">True</property>
+                        <child>
+                            <object class="GtkShortcutsShortcut">
+                                <property name="accelerator">&lt;Primary&gt;f</property>
+                                <property name="title" translatable="yes" context="shortcut window">Search 
notes</property>
+                                <property name="visible">True</property>
+                            </object>
+                        </child>
                         <child>
                             <object class="GtkShortcutsShortcut">
                                 <property name="accelerator">&lt;Primary&gt;n</property>
diff --git a/src/bjb-main-toolbar.c b/src/bjb-main-toolbar.c
index 00d01d3..dc0c581 100644
--- a/src/bjb-main-toolbar.c
+++ b/src/bjb-main-toolbar.c
@@ -667,6 +667,8 @@ bjb_main_toolbar_constructed (GObject *obj)
   gtk_window_add_accel_group (self->window, self->accel);
   gtk_widget_add_accelerator (self->new_button, "clicked", self->accel, GDK_KEY_n,
                               GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
+  gtk_widget_add_accelerator (self->search_button, "clicked", self->accel, GDK_KEY_f,
+                              GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
 
   g_signal_connect_swapped (self->window, "view-changed",
                             G_CALLBACK (populate_main_toolbar), self);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]