summaryrefslogtreecommitdiffstats
path: root/gtk/src/x264handler.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2015-06-17 21:59:26 +0000
committerjstebbins <[email protected]>2015-06-17 21:59:26 +0000
commit7b24a71db27d1ee6253f7ee0e5fe1b9e575e7a2a (patch)
tree56c6445aa6b73039f1077384e1a8d05554fc704b /gtk/src/x264handler.c
parent5d197f1cbad9e64eeba2188e309b3f5ef74ccc9f (diff)
LinGui: fix video options edit box tooltip
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7302 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/x264handler.c')
-rw-r--r--gtk/src/x264handler.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/gtk/src/x264handler.c b/gtk/src/x264handler.c
index fb041a709..66434cabc 100644
--- a/gtk/src/x264handler.c
+++ b/gtk/src/x264handler.c
@@ -121,17 +121,17 @@ x264_me_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
}
}
+extern char *video_option_tooltip;
+
G_MODULE_EXPORT void
x264_entry_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
g_debug("x264_entry_changed_cb ()");
- static char *tt = NULL;
-
- if (tt == NULL)
+ if (video_option_tooltip == NULL)
{
GtkWidget *eo = GTK_WIDGET(GHB_WIDGET(ud->builder, "VideoOptionExtra"));
- tt = gtk_widget_get_tooltip_text(eo);
+ video_option_tooltip = gtk_widget_get_tooltip_text(eo);
}
if (!ignore_options_update)
@@ -153,14 +153,20 @@ x264_entry_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
ghb_update_x264Option(ud, sopts);
ghb_x264_parse_options(ud, sopts);
- GtkWidget *eo = GTK_WIDGET(GHB_WIDGET(ud->builder, "VideoOptionExtra"));
- char * new_tt;
- if (sopts)
- new_tt = g_strdup_printf(_("%s\n\nExpanded Options:\n\"%s\""), tt, sopts);
- else
- new_tt = g_strdup_printf(_("%s\n\nExpanded Options:\n\"\""), tt);
- gtk_widget_set_tooltip_text(eo, new_tt);
- g_free(new_tt);
+ if (ghb_dict_get_bool(ud->settings, "x264UseAdvancedOptions"))
+ {
+ GtkWidget *eo;
+ eo = GTK_WIDGET(GHB_WIDGET(ud->builder, "VideoOptionExtra"));
+ char * tt;
+ if (sopts)
+ tt = g_strdup_printf(_("%s\n\nExpanded Options:\n\"%s\""),
+ video_option_tooltip, sopts);
+ else
+ tt = g_strdup_printf(_("%s\n\nExpanded Options:\n\"\""),
+ video_option_tooltip);
+ gtk_widget_set_tooltip_text(eo, tt);
+ g_free(tt);
+ }
g_free(sopts);
}