diff options
author | jstebbins <[email protected]> | 2013-06-15 20:28:07 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2013-06-15 20:28:07 +0000 |
commit | ca4a3f1f76d2a2c502fe891e171a3147b4b76255 (patch) | |
tree | 3862b3b5be9216cc91abb612cd69159d3d5288f3 /gtk/src/audiohandler.c | |
parent | 768561ada96cd0149ed115748c95a32357676b38 (diff) |
LinGui: use hb_audio_quality_get_default() to show/hide quality widgets.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5583 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/audiohandler.c')
-rw-r--r-- | gtk/src/audiohandler.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c index 72f58bfa7..c25cfe1f3 100644 --- a/gtk/src/audiohandler.c +++ b/gtk/src/audiohandler.c @@ -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; |