summaryrefslogtreecommitdiffstats
path: root/gtk/src
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/src')
-rw-r--r--gtk/src/hb-backend.c13
-rw-r--r--gtk/src/makedeps.py6
-rw-r--r--gtk/src/videohandler.c5
3 files changed, 14 insertions, 10 deletions
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));
diff --git a/gtk/src/makedeps.py b/gtk/src/makedeps.py
index 1cfdab0e4..931be71d4 100644
--- a/gtk/src/makedeps.py
+++ b/gtk/src/makedeps.py
@@ -57,12 +57,6 @@ dep_map = (
DepEntry("x264_subme", "x264_psy_rd", "<6", True, False),
DepEntry("x264_subme", "x264_psy_trell", "<6", True, False),
DepEntry("x264_trellis", "x264_psy_trell", "0", True, False),
- DepEntry("VideoEncoder", "VideoPresetSlider", "x264|x265", False, True),
- DepEntry("VideoEncoder", "VideoPresetLabel", "x264|x265", False, True),
- DepEntry("VideoEncoder", "VideoTune", "x264|x265", False, True),
- DepEntry("VideoEncoder", "VideoTuneLabel", "x264|x265", False, True),
- DepEntry("VideoEncoder", "VideoProfile", "x264|x265", False, True),
- DepEntry("VideoEncoder", "VideoProfileLabel", "x264|x265", False, True),
DepEntry("VideoEncoder", "x264FastDecode", "x264", False, True),
DepEntry("VideoEncoder", "x264UseAdvancedOptions", "x264", False, True),
DepEntry("HideAdvancedVideoSettings", "x264UseAdvancedOptions", "1", True, True),
diff --git a/gtk/src/videohandler.c b/gtk/src/videohandler.c
index 5bf706677..6f07e90d2 100644
--- a/gtk/src/videohandler.c
+++ b/gtk/src/videohandler.c
@@ -57,12 +57,17 @@ vcodec_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
// Set the range of the preset slider
int encoder = ghb_get_video_encoder(ud->settings);
GtkWidget *presetSlider = GHB_WIDGET(ud->builder, "VideoPresetSlider");
+ GtkWidget *presetLabel = GHB_WIDGET(ud->builder, "VideoPresetLabel");
const char * const *video_presets;
int count = 0;
video_presets = hb_video_encoder_get_presets(encoder);
while (video_presets && video_presets[count]) count++;
+ gtk_widget_set_visible(presetSlider, count > 0);
+ gtk_widget_set_visible(presetLabel, count > 0);
if (count)
+ {
gtk_range_set_range(GTK_RANGE(presetSlider), 0, count-1);
+ }
// Advanced options are only for x264
if (encoder != HB_VCODEC_X264)