]> granicus.if.org Git - handbrake/commitdiff
LinGui: use hb_audio_quality_get_default() to show/hide quality widgets.
authorjstebbins <jstebbins.hb@gmail.com>
Sat, 15 Jun 2013 20:28:07 +0000 (20:28 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Sat, 15 Jun 2013 20:28:07 +0000 (20:28 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5583 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/audiohandler.c
gtk/src/makedeps.py

index 72f58bfa73162228c68bf0393350e4bac69c75f1..c25cfe1f3de5474d7d3e69fbdd7eba446ba28402 100644 (file)
@@ -642,6 +642,27 @@ ghb_audio_list_refresh(signal_user_data_t *ud)
     }
 }
 
+static void enable_quality_widget(signal_user_data_t *ud, int acodec)
+{
+    GtkWidget *widget1, *widget2, *widget3;
+
+    widget1 = GHB_WIDGET(ud->builder, "AudioTrackQualityEnable");
+    widget2 = GHB_WIDGET(ud->builder, "AudioTrackQualityValue");
+    widget3 = GHB_WIDGET(ud->builder, "AudioTrackQuality");
+    if (hb_audio_quality_get_default(acodec) == HB_INVALID_AUDIO_QUALITY)
+    {
+        gtk_widget_hide(widget1);
+        gtk_widget_hide(widget2);
+        gtk_widget_hide(widget3);
+    }
+    else
+    {
+        gtk_widget_show(widget1);
+        gtk_widget_show(widget2);
+        gtk_widget_show(widget3);
+    }
+}
+
 G_MODULE_EXPORT void
 audio_codec_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
 {
@@ -654,6 +675,7 @@ audio_codec_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
     acodec_code = ghb_lookup_combo_int("AudioEncoder", gval);
     ghb_value_free(gval);
 
+    enable_quality_widget(ud, acodec_code);
     if (block_updates)
     {
         prev_acodec = acodec_code;
index 9fecd37fea14a0f73a1bd3eef7abb3322424333c..07830237c65ff1c01ab052c1bdc317e732b94b7b 100644 (file)
@@ -50,13 +50,8 @@ dep_map = (
     DepEntry("VideoEncoder", "x264VideoSettings", "x264", False, True),
     DepEntry("VideoEncoder", "lavc_mpeg4_tab", "ffmpeg|ffmpeg4|ffmpeg2", False, True),
     DepEntry("VideoEncoder", "Mp4iPodCompatible", "x264", False, False),
-    DepEntry("AudioTrackQualityEnable", "AudioTrackQuality", "FALSE", True, False),
-    DepEntry("AudioTrackQualityEnable", "AudioTrackQualityValue", "FALSE", True, False),
     DepEntry("AudioTrackQualityEnable", "AudioBitrateLabel", "TRUE", True, False),
     DepEntry("AudioTrackQualityEnable", "AudioBitrate", "TRUE", True, False),
-    DepEntry("AudioEncoderActual", "AudioTrackQualityEnable", "lame|vorbis", False, True),
-    DepEntry("AudioEncoderActual", "AudioTrackQuality", "lame|vorbis", False, True),
-    DepEntry("AudioEncoderActual", "AudioTrackQualityValue", "lame|vorbis", False, True),
     DepEntry("AudioEncoderActual", "AudioBitrateLabel", "copy:mp3|copy:aac|copy:ac3|copy:dts|copy:dtshd", True, False),
     DepEntry("AudioEncoderActual", "AudioBitrate", "copy:mp3|copy:aac|copy:ac3|copy:dts|copy:dtshd", True, False),
     DepEntry("AudioEncoderActual", "AudioSamplerateLabel", "copy:mp3|copy:aac|copy:ac3|copy:dts|copy:dtshd", True, False),