diff options
Diffstat (limited to 'gtk/src')
-rw-r--r-- | gtk/src/audiohandler.c | 14 | ||||
-rw-r--r-- | gtk/src/callbacks.c | 13 | ||||
-rw-r--r-- | gtk/src/ghb.ui | 3 | ||||
-rw-r--r-- | gtk/src/queuehandler.c | 7 | ||||
-rw-r--r-- | gtk/src/resource_data.h | 4 | ||||
-rw-r--r-- | gtk/src/resources.plist | 3 |
6 files changed, 35 insertions, 9 deletions
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c index 1bfdcf2c5..17d0a3414 100644 --- a/gtk/src/audiohandler.c +++ b/gtk/src/audiohandler.c @@ -244,7 +244,6 @@ audio_list_refresh_selected(signal_user_data_t *ud) br = ghb_settings_combo_option(asettings, "AudioBitrate"); sr = ghb_settings_combo_option(asettings, "AudioSamplerate"); mix = ghb_settings_combo_option(asettings, "AudioMixdown"); - drc = ghb_settings_get_string(asettings, "AudioTrackDRCSlider"); s_track = ghb_settings_get_string(asettings, "AudioTrack"); s_codec = ghb_settings_get_string(asettings, "AudioEncoder"); @@ -252,6 +251,10 @@ audio_list_refresh_selected(signal_user_data_t *ud) s_sr = ghb_settings_get_string(asettings, "AudioSamplerate"); s_mix = ghb_settings_get_string(asettings, "AudioMixdown"); s_drc = ghb_settings_get_double(asettings, "AudioTrackDRCSlider"); + if (s_drc < 0.1) + drc = g_strdup("Off"); + else + drc = g_strdup_printf("%.1f", s_drc); gtk_list_store_set(GTK_LIST_STORE(store), &iter, // These are displayed in list @@ -260,8 +263,8 @@ audio_list_refresh_selected(signal_user_data_t *ud) 2, br, 3, sr, 4, mix, - // These are used to set combo values when a list item is selected 5, drc, + // These are used to set combo values when a list item is selected 6, s_track, 7, s_codec, 8, s_br, @@ -445,7 +448,6 @@ add_to_audio_list(signal_user_data_t *ud, GValue *settings) br = ghb_settings_combo_option(settings, "AudioBitrate"); sr = ghb_settings_combo_option(settings, "AudioSamplerate"); mix = ghb_settings_combo_option(settings, "AudioMixdown"); - drc = ghb_settings_get_string(settings, "AudioTrackDRCSlider"); s_track = ghb_settings_get_string(settings, "AudioTrack"); s_codec = ghb_settings_get_string(settings, "AudioEncoder"); @@ -453,6 +455,10 @@ add_to_audio_list(signal_user_data_t *ud, GValue *settings) s_sr = ghb_settings_get_string(settings, "AudioSamplerate"); s_mix = ghb_settings_get_string(settings, "AudioMixdown"); s_drc = ghb_settings_get_double(settings, "AudioTrackDRCSlider"); + if (s_drc < 0.1) + drc = g_strdup("Off"); + else + drc = g_strdup_printf("%.1f", s_drc); gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, @@ -462,8 +468,8 @@ add_to_audio_list(signal_user_data_t *ud, GValue *settings) 2, br, 3, sr, 4, mix, - // These are used to set combo box values when a list item is selected 5, drc, + // These are used to set combo box values when a list item is selected 6, s_track, 7, s_codec, 8, s_br, diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 44709628e..914b34468 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -2793,6 +2793,19 @@ format_deblock_cb(GtkScale *scale, gdouble val, signal_user_data_t *ud) } gchar* +format_drc_cb(GtkScale *scale, gdouble val, signal_user_data_t *ud) +{ + if (val <= 0.0) + { + return g_strdup_printf("Off"); + } + else + { + return g_strdup_printf("%.1f", val); + } +} + +gchar* format_vquality_cb(GtkScale *scale, gdouble val, signal_user_data_t *ud) { if (ghb_settings_get_boolean(ud->settings, "directqp")) diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui index 81c5b316c..7adbbff75 100644 --- a/gtk/src/ghb.ui +++ b/gtk/src/ghb.ui @@ -123,7 +123,7 @@ </object> <object class="GtkAdjustment" id="adjustment6"> <property name="upper">4</property> - <property name="lower">1</property> + <property name="lower">0</property> <property name="page_increment">1</property> <property name="step_increment">0.2</property> <property name="page_size">0</property> @@ -1825,6 +1825,7 @@ <property name="fill_level">3823.35009765625</property> <property name="value_pos">GTK_POS_RIGHT</property> <signal handler="audio_widget_changed_cb" name="value_changed"/> + <signal name="format_value" handler="format_drc_cb"/> </object> <packing> <property name="position">1</property> diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c index 05cae3b63..d928ed7c7 100644 --- a/gtk/src/queuehandler.c +++ b/gtk/src/queuehandler.c @@ -419,7 +419,6 @@ audio_list_refresh(signal_user_data_t *ud) br = ghb_settings_combo_option(asettings, "AudioBitrate"); sr = ghb_settings_combo_option(asettings, "AudioSamplerate"); mix = ghb_settings_combo_option(asettings, "AudioMixdown"); - drc = ghb_settings_get_string(asettings, "AudioTrackDRCSlider"); s_track = ghb_settings_get_string(asettings, "AudioTrack"); s_codec = ghb_settings_get_string(asettings, "AudioEncoder"); @@ -427,6 +426,10 @@ audio_list_refresh(signal_user_data_t *ud) s_sr = ghb_settings_get_string(asettings, "AudioSamplerate"); s_mix = ghb_settings_get_string(asettings, "AudioMixdown"); s_drc = ghb_settings_get_double(asettings, "AudioTrackDRCSlider"); + if (s_drc < 0.1) + drc = g_strdup("Off"); + else + drc = g_strdup_printf("%.1f", s_drc); gtk_list_store_set(GTK_LIST_STORE(store), &iter, // These are displayed in list @@ -435,8 +438,8 @@ audio_list_refresh(signal_user_data_t *ud) 2, br, 3, sr, 4, mix, - // These are used to set combo values when an item is selected 5, drc, + // These are used to set combo values when an item is selected 6, s_track, 7, s_codec, 8, s_br, diff --git a/gtk/src/resource_data.h b/gtk/src/resource_data.h index 1417d0150..26e869b53 100644 --- a/gtk/src/resource_data.h +++ b/gtk/src/resource_data.h @@ -160,7 +160,7 @@ " <object class="GtkAdjustment" id="adjustment6"" ">\n" " <property name="upper">4</property>\n" -" <property name="lower">1</property>\n" +" <property name="lower">0</property>\n" " <property name="page_increment">1</property>\n" " <property name="step_increment">0.2</property>" ";\n" @@ -2900,6 +2900,8 @@ ";value_pos">GTK_POS_RIGHT</property>\n" " <signal handler=&quo" "t;audio_widget_changed_cb" name="value_changed"/>\n" +" <signal name="f" +"ormat_value" handler="format_drc_cb"/>\n" " </object>\n" " <packing>\n" " <property name="" diff --git a/gtk/src/resources.plist b/gtk/src/resources.plist index 7cb679216..b6630d26c 100644 --- a/gtk/src/resources.plist +++ b/gtk/src/resources.plist @@ -128,7 +128,7 @@ </object> <object class="GtkAdjustment" id="adjustment6"> <property name="upper">4</property> - <property name="lower">1</property> + <property name="lower">0</property> <property name="page_increment">1</property> <property name="step_increment">0.2</property> <property name="page_size">0</property> @@ -1830,6 +1830,7 @@ <property name="fill_level">3823.35009765625</property> <property name="value_pos">GTK_POS_RIGHT</property> <signal handler="audio_widget_changed_cb" name="value_changed"/> + <signal name="format_value" handler="format_drc_cb"/> </object> <packing> <property name="position">1</property> |