From f0109cb4cecd63949e65f7cafda9f47d81916759 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Thu, 28 May 2015 20:15:43 +0000 Subject: LinGui: simplify some video widget dependency handling git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7236 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- gtk/src/hb-backend.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'gtk/src/hb-backend.c') diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index f2d704bcb..ecb33f791 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -2040,6 +2040,10 @@ video_tune_opts_set(signal_user_data_t *ud, const gchar *name) tunes = hb_video_encoder_get_tunes(encoder); while (tunes && tunes[count]) count++; + GtkWidget *w = GHB_WIDGET(ud->builder, "VideoTune"); + gtk_widget_set_visible(w, count > 0); + w = GHB_WIDGET(ud->builder, "VideoTuneLabel"); + gtk_widget_set_visible(w, count > 0); if (count == 0) return; g_debug("video_tune_opts_set ()\n"); @@ -2089,6 +2093,10 @@ video_profile_opts_set(signal_user_data_t *ud, const gchar *name) profiles = hb_video_encoder_get_profiles(encoder); while (profiles && profiles[count]) count++; + GtkWidget *w = GHB_WIDGET(ud->builder, "VideoProfile"); + gtk_widget_set_visible(w, count > 0); + w = GHB_WIDGET(ud->builder, "VideoProfileLabel"); + gtk_widget_set_visible(w, count > 0); if (count == 0) return; g_debug("video_profile_opts_set ()\n"); @@ -2130,10 +2138,7 @@ video_level_opts_set(signal_user_data_t *ud, const gchar *name) gtk_widget_set_visible(w, count > 0); w = GHB_WIDGET(ud->builder, "VideoLevelLabel"); gtk_widget_set_visible(w, count > 0); - if (count <= 0) - { - return; - } + if (count <= 0) return; g_debug("video_level_opts_set ()\n"); GtkComboBox *combo = GTK_COMBO_BOX(GHB_WIDGET(ud->builder, name)); -- cgit v1.2.3