[gnome-builder] Add mnemonics to frame header buttons



commit 6b6358febe623cedeb90cce5d4fd9ca7c162f6eb
Author: vanadiae <vanadiae35 gmail com>
Date:   Tue Jul 20 20:14:50 2021 +0200

    Add mnemonics to frame header buttons

 src/plugins/devhelp/gbp-devhelp-menu-button.ui    | 3 ++-
 src/plugins/glade/gbp-glade-frame-addin.c         | 8 +++++---
 src/plugins/symbol-tree/gbp-symbol-menu-button.c  | 2 +-
 src/plugins/symbol-tree/gbp-symbol-menu-button.ui | 3 ++-
 4 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/src/plugins/devhelp/gbp-devhelp-menu-button.ui b/src/plugins/devhelp/gbp-devhelp-menu-button.ui
index ad20dece9..72de6cb47 100644
--- a/src/plugins/devhelp/gbp-devhelp-menu-button.ui
+++ b/src/plugins/devhelp/gbp-devhelp-menu-button.ui
@@ -22,7 +22,8 @@
     <property name="popover">popover</property>
     <child>
       <object class="GtkLabel">
-        <property name="label" translatable="yes">Select Documentation…</property>
+        <property name="label" translatable="yes">_Select Documentation…</property>
+        <property name="use-underline">True</property>
         <property name="visible">true</property>
         <property name="xalign">0.5</property>
         <property name="ellipsize">end</property>
diff --git a/src/plugins/glade/gbp-glade-frame-addin.c b/src/plugins/glade/gbp-glade-frame-addin.c
index 8751a6269..172448606 100644
--- a/src/plugins/glade/gbp-glade-frame-addin.c
+++ b/src/plugins/glade/gbp-glade-frame-addin.c
@@ -297,7 +297,8 @@ gbp_glade_frame_addin_load (IdeFrameAddin *addin,
   gtk_container_add (GTK_CONTAINER (box), GTK_WIDGET (self->image));
 
   self->label = g_object_new (GTK_TYPE_LABEL,
-                              "label", _("Select Widget…"),
+                              "use-underline", TRUE,
+                              "label", _("_Select Widget…"),
                               "visible", TRUE,
                               NULL);
   gtk_container_add (GTK_CONTAINER (box), GTK_WIDGET (self->label));
@@ -314,6 +315,7 @@ gbp_glade_frame_addin_load (IdeFrameAddin *addin,
    */
   self->toggle_source = g_object_new (GTK_TYPE_BUTTON,
                                       "has-tooltip", TRUE,
+                                      "use-underline", TRUE,
                                       "hexpand", FALSE,
                                       "visible", FALSE,
                                       NULL);
@@ -390,7 +392,7 @@ gbp_glade_frame_addin_set_view (IdeFrameAddin *addin,
 
       if (g_str_has_suffix (name, ".ui"))
         {
-          gtk_button_set_label (self->toggle_source, _("View Design"));
+          gtk_button_set_label (self->toggle_source, _("_View Design"));
           gtk_widget_set_tooltip_text (GTK_WIDGET (self->toggle_source),
                                        _("Switch to UI designer"));
           gtk_widget_show (GTK_WIDGET (self->toggle_source));
@@ -398,7 +400,7 @@ gbp_glade_frame_addin_set_view (IdeFrameAddin *addin,
     }
   else if (GBP_IS_GLADE_PAGE (view))
     {
-      gtk_button_set_label (self->toggle_source, _("View Source"));
+      gtk_button_set_label (self->toggle_source, _("_View Source"));
       gtk_widget_set_tooltip_text (GTK_WIDGET (self->toggle_source),
                                    _("Switch to source code editor"));
       gtk_widget_show (GTK_WIDGET (self->toggle_source));
diff --git a/src/plugins/symbol-tree/gbp-symbol-menu-button.c 
b/src/plugins/symbol-tree/gbp-symbol-menu-button.c
index 1f6a18aaf..56260f181 100644
--- a/src/plugins/symbol-tree/gbp-symbol-menu-button.c
+++ b/src/plugins/symbol-tree/gbp-symbol-menu-button.c
@@ -311,7 +311,7 @@ gbp_symbol_menu_button_set_symbol (GbpSymbolMenuButton *self,
 
   if (dzl_str_empty0 (title))
     {
-      title = _("Select Symbol…");
+      title = _("_Select Symbol…");
       icon_name = NULL;
       symbol = NULL;
     }
diff --git a/src/plugins/symbol-tree/gbp-symbol-menu-button.ui 
b/src/plugins/symbol-tree/gbp-symbol-menu-button.ui
index 2d8849613..3cdf2f051 100644
--- a/src/plugins/symbol-tree/gbp-symbol-menu-button.ui
+++ b/src/plugins/symbol-tree/gbp-symbol-menu-button.ui
@@ -75,7 +75,8 @@
         <child type="center">
           <object class="GtkLabel" id="symbol_title">
             <property name="ellipsize">end</property>
-            <property name="label" translatable="yes">Document Outline</property>
+            <property name="label" translatable="yes">_Document Outline</property>
+            <property name="use-underline">True</property>
             <property name="visible">true</property>
           </object>
         </child>


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