summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-04-17 20:26:08 +0000
committerjstebbins <[email protected]>2011-04-17 20:26:08 +0000
commit4d2dce20625d08032eb25dd2d98c3d4319d8e0d9 (patch)
tree182c48f2ccd8afde6c17d9f0151b0eb9bd2f4d29
parentc921f0242dd7da08ea07b9ef5e02d37dd91b020d (diff)
LinGui: fix a problem with display of audio gain value.
Was not updating properly, showed -1 and -0 when should have been 0. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3936 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--gtk/src/audiohandler.c6
-rw-r--r--gtk/src/ghb.ui2
2 files changed, 5 insertions, 3 deletions
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c
index b490c825a..0e809ebcb 100644
--- a/gtk/src/audiohandler.c
+++ b/gtk/src/audiohandler.c
@@ -378,7 +378,7 @@ ghb_audio_list_refresh_selected(signal_user_data_t *ud)
sr = ghb_settings_combo_option(asettings, "AudioSamplerate");
mix = ghb_settings_combo_option(asettings, "AudioMixdown");
gain = ghb_settings_get_double(asettings, "AudioTrackGain");
- s_gain = g_strdup_printf("%.fdB", gain);
+ s_gain = g_strdup_printf("%ddB", (int)gain);
drc = ghb_settings_get_double(asettings, "AudioTrackDRCSlider");
if (drc < 1.0)
@@ -571,6 +571,8 @@ drc_widget_changed_cb(GtkWidget *widget, gdouble val, signal_user_data_t *ud)
G_MODULE_EXPORT gchar*
format_gain_cb(GtkScale *scale, gdouble val, signal_user_data_t *ud)
{
+ if ( val >= 21.0 )
+ return g_strdup_printf("*11*", (int)val);
return g_strdup_printf("%ddB", (int)val);
}
@@ -638,7 +640,7 @@ add_to_audio_list(signal_user_data_t *ud, GValue *settings)
sr = ghb_settings_combo_option(settings, "AudioSamplerate");
mix = ghb_settings_combo_option(settings, "AudioMixdown");
gain = ghb_settings_get_double(settings, "AudioTrackGain");
- s_gain = g_strdup_printf("%.fdB", gain);
+ s_gain = g_strdup_printf("%ddB", (int)gain);
drc = ghb_settings_get_double(settings, "AudioTrackDRCSlider");
if (drc < 1.0)
diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui
index 586806f3c..7d70370b3 100644
--- a/gtk/src/ghb.ui
+++ b/gtk/src/ghb.ui
@@ -258,7 +258,7 @@
<property name="value">1</property>
</object>
<object class="GtkAdjustment" id="adjustment35">
- <property name="upper">20</property>
+ <property name="upper">21</property>
<property name="lower">-20</property>
<property name="page_increment">1</property>
<property name="step_increment">1</property>