From 28b17b94edab18467abba30a3ed580c3bc6d24fc Mon Sep 17 00:00:00 2001 From: jstebbins Date: Thu, 28 May 2015 18:04:32 +0000 Subject: LinGui: disable level widget when no levels returned by libhb git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7233 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- gtk/src/hb-backend.c | 9 ++++++++- gtk/src/makedeps.py | 2 -- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'gtk') diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 29c0493b4..f2d704bcb 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -2126,7 +2126,14 @@ video_level_opts_set(signal_user_data_t *ud, const gchar *name) levels = hb_video_encoder_get_levels(encoder); while (levels && levels[count]) count++; - if (count == 0) return; + GtkWidget *w = GHB_WIDGET(ud->builder, "VideoLevel"); + gtk_widget_set_visible(w, count > 0); + w = GHB_WIDGET(ud->builder, "VideoLevelLabel"); + gtk_widget_set_visible(w, count > 0); + if (count <= 0) + { + return; + } g_debug("video_level_opts_set ()\n"); GtkComboBox *combo = GTK_COMBO_BOX(GHB_WIDGET(ud->builder, name)); diff --git a/gtk/src/makedeps.py b/gtk/src/makedeps.py index 0826055e4..1cfdab0e4 100644 --- a/gtk/src/makedeps.py +++ b/gtk/src/makedeps.py @@ -63,8 +63,6 @@ dep_map = ( DepEntry("VideoEncoder", "VideoTuneLabel", "x264|x265", False, True), DepEntry("VideoEncoder", "VideoProfile", "x264|x265", False, True), DepEntry("VideoEncoder", "VideoProfileLabel", "x264|x265", False, True), - DepEntry("VideoEncoder", "VideoLevel", "x264|x265", False, True), - DepEntry("VideoEncoder", "VideoLevelLabel", "x264|x265", False, True), DepEntry("VideoEncoder", "x264FastDecode", "x264", False, True), DepEntry("VideoEncoder", "x264UseAdvancedOptions", "x264", False, True), DepEntry("HideAdvancedVideoSettings", "x264UseAdvancedOptions", "1", True, True), -- cgit v1.2.3