]> granicus.if.org Git - handbrake/commitdiff
LinGui: add preset description tooltip to preset menu button
authorJohn Stebbins <jstebbins.hb@gmail.com>
Tue, 19 Sep 2017 16:12:17 +0000 (09:12 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Mon, 6 Nov 2017 16:19:49 +0000 (08:19 -0800)
gtk/src/ghb.m4
gtk/src/presets.c

index 93d070061e762fd60772be8df51cfd45d65a73ec..06888b4e859b0757c6db770233cd23ed04abec98 100644 (file)
@@ -883,7 +883,7 @@ libx264 authors:
                     </child>
                     <child>
                       <object class="GtkCheckMenuItem" id="show_presets">
-                        <property name="label" translatable="yes">_Show Presets</property>
+                        <property name="label" translatable="yes">Presets _List</property>
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="use_underline">True</property>
index bfa8981926d386b2854ff8979d860c5ae72f34fb..955d9f9db66310af82f3e0b5731e1d0f932f2443 100644 (file)
@@ -566,7 +566,9 @@ static void
 set_preset_menu_button_label(signal_user_data_t *ud, hb_preset_index_t *path)
 {
     char              * fullname, * text;
+    const char        * description;
     GtkLabel          * label;
+    GtkWidget         * widget;
     GhbValue          * dict;
     int                 type;
 
@@ -578,6 +580,10 @@ set_preset_menu_button_label(signal_user_data_t *ud, hb_preset_index_t *path)
     gtk_label_set_markup(label, text);
     free(fullname);
     free(text);
+
+    description = ghb_dict_get_string(dict, "PresetDescription");
+    widget = GHB_WIDGET(ud->builder, "presets_menu_button");
+    gtk_widget_set_tooltip_text(widget, description);
 }
 
 static void