summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2017-09-01 17:16:40 -0700
committerJohn Stebbins <[email protected]>2017-09-01 17:16:40 -0700
commit1e457989f1668e969642a47178a5ded86ce197af (patch)
treee95b9dde09746ec89bc524b25946f27e8db59881 /gtk
parentae2627cedefb29d6f0743175613a2e5597465be8 (diff)
LinGui: fix "More Settings" tooltip updates
The tooltip was not updating when the video preset slider changed
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/videohandler.c72
1 files changed, 39 insertions, 33 deletions
diff --git a/gtk/src/videohandler.c b/gtk/src/videohandler.c
index 8fc441a17..7e23f120b 100644
--- a/gtk/src/videohandler.c
+++ b/gtk/src/videohandler.c
@@ -115,37 +115,8 @@ vcodec_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
char *video_option_tooltip = NULL;
-G_MODULE_EXPORT void
-video_preset_slider_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
-{
- ghb_widget_to_setting(ud->settings, widget);
-
- int presetIndex = ghb_dict_get_int(ud->settings, "VideoPresetSlider");
- const char * const *video_presets;
- const char *preset = "medium";
- int count;
-
- int encoder = ghb_get_video_encoder(ud->settings);
- video_presets = hb_video_encoder_get_presets(encoder);
- if (video_presets != NULL)
- {
- for (count = 0; video_presets[count]; count++);
- if (presetIndex < count)
- {
- preset = video_presets[presetIndex];
- }
- }
-
- ghb_set_video_preset(ud->settings, encoder, preset);
- GhbValue *gval = ghb_dict_get_value(ud->settings, "VideoPresetSlider");
- ghb_ui_settings_update(ud, ud->settings, "VideoPresetSlider", gval);
-
- ghb_check_dependency(ud, widget, NULL);
- ghb_clear_presets_selection(ud);
-}
-
-void
-ghb_video_setting_changed(GtkWidget *widget, signal_user_data_t *ud)
+static void
+update_adv_settings_tooltip(signal_user_data_t *ud)
{
if (video_option_tooltip == NULL)
{
@@ -153,8 +124,6 @@ ghb_video_setting_changed(GtkWidget *widget, signal_user_data_t *ud)
video_option_tooltip = gtk_widget_get_tooltip_text(eo);
}
- ghb_widget_to_setting(ud->settings, widget);
-
int encoder = ghb_get_video_encoder(ud->settings);
if (!ghb_dict_get_bool(ud->settings, "x264UseAdvancedOptions") &&
(encoder & HB_VCODEC_X264_MASK))
@@ -261,6 +230,43 @@ ghb_video_setting_changed(GtkWidget *widget, signal_user_data_t *ud)
gtk_widget_set_tooltip_text(eo, tt);
g_free(tt);
}
+}
+
+G_MODULE_EXPORT void
+video_preset_slider_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ ghb_widget_to_setting(ud->settings, widget);
+
+ int presetIndex = ghb_dict_get_int(ud->settings, "VideoPresetSlider");
+ const char * const *video_presets;
+ const char *preset = "medium";
+ int count;
+
+ int encoder = ghb_get_video_encoder(ud->settings);
+ video_presets = hb_video_encoder_get_presets(encoder);
+ if (video_presets != NULL)
+ {
+ for (count = 0; video_presets[count]; count++);
+ if (presetIndex < count)
+ {
+ preset = video_presets[presetIndex];
+ }
+ }
+
+ ghb_set_video_preset(ud->settings, encoder, preset);
+ GhbValue *gval = ghb_dict_get_value(ud->settings, "VideoPresetSlider");
+ ghb_ui_settings_update(ud, ud->settings, "VideoPresetSlider", gval);
+
+ ghb_check_dependency(ud, widget, NULL);
+ ghb_clear_presets_selection(ud);
+ update_adv_settings_tooltip(ud);
+}
+
+void
+ghb_video_setting_changed(GtkWidget *widget, signal_user_data_t *ud)
+{
+ ghb_widget_to_setting(ud->settings, widget);
+ update_adv_settings_tooltip(ud);
ghb_check_dependency(ud, widget, NULL);
ghb_clear_presets_selection(ud);