summaryrefslogtreecommitdiffstats
path: root/gtk/src/audiohandler.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-02-06 22:48:51 +0000
committerjstebbins <[email protected]>2009-02-06 22:48:51 +0000
commit77651fa029ebc39249f5f99dc1ef90cc7fff717c (patch)
treed200bc82037213b63c02c131b4e05ca0a859edbc /gtk/src/audiohandler.c
parentc33b94692d6d9c7a609ace7cdb91da937de67775 (diff)
LinGui: make drc slider jump from 0 to 1, skipping intermediate values
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2128 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/audiohandler.c')
-rw-r--r--gtk/src/audiohandler.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c
index 17d0a3414..1ffbf8df5 100644
--- a/gtk/src/audiohandler.c
+++ b/gtk/src/audiohandler.c
@@ -364,7 +364,7 @@ audio_mix_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
GValue *asettings;
- g_debug("audio_widget_changed_cb ()");
+ g_debug("audio_mix_changed_cb ()");
ghb_adjust_audio_rate_combos(ud);
ghb_check_dependency(ud, widget);
asettings = get_selected_asettings(ud);
@@ -392,6 +392,28 @@ audio_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
ghb_live_reset(ud);
}
+void
+drc_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ GValue *asettings;
+ gdouble val;
+
+ g_debug("drc_widget_changed_cb ()");
+ val = gtk_range_get_value(GTK_RANGE(widget));
+ if (val < 0.5)
+ gtk_range_set_value(GTK_RANGE(widget), 0.0);
+ else if (val < 1.0)
+ gtk_range_set_value(GTK_RANGE(widget), 1.0);
+ ghb_check_dependency(ud, widget);
+ asettings = get_selected_asettings(ud);
+ if (asettings != NULL)
+ {
+ ghb_widget_to_setting(asettings, widget);
+ audio_list_refresh_selected(ud);
+ }
+ ghb_live_reset(ud);
+}
+
// subtitles differ from other settings in that
// the selection is updated automaitcally when the title
// changes. I don't want the preset selection changed as