summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--gtk/src/audiohandler.c24
-rw-r--r--gtk/src/ghb.ui2
-rw-r--r--gtk/src/resource_data.h2
-rw-r--r--gtk/src/resources.plist2
4 files changed, 26 insertions, 4 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
diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui
index 8115f4ad1..1d2f35018 100644
--- a/gtk/src/ghb.ui
+++ b/gtk/src/ghb.ui
@@ -1824,7 +1824,7 @@
<property name="restrict_to_fill_level">False</property>
<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 handler="drc_widget_changed_cb" name="value_changed"/>
<signal name="format_value" handler="format_drc_cb"/>
</object>
<packing>
diff --git a/gtk/src/resource_data.h b/gtk/src/resource_data.h
index 59d75ca69..902cc6871 100644
--- a/gtk/src/resource_data.h
+++ b/gtk/src/resource_data.h
@@ -2899,7 +2899,7 @@
" &lt;property name=&quot"
";value_pos&quot;&gt;GTK_POS_RIGHT&lt;/property&gt;\n"
" &lt;signal handler=&quo"
-"t;audio_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+"t;drc_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
" &lt;signal name=&quot;f"
"ormat_value&quot; handler=&quot;format_drc_cb&quot;/&gt;\n"
" &lt;/object&gt;\n"
diff --git a/gtk/src/resources.plist b/gtk/src/resources.plist
index 7be8bbddf..fa5aed47c 100644
--- a/gtk/src/resources.plist
+++ b/gtk/src/resources.plist
@@ -1829,7 +1829,7 @@
&lt;property name=&quot;restrict_to_fill_level&quot;&gt;False&lt;/property&gt;
&lt;property name=&quot;fill_level&quot;&gt;3823.35009765625&lt;/property&gt;
&lt;property name=&quot;value_pos&quot;&gt;GTK_POS_RIGHT&lt;/property&gt;
- &lt;signal handler=&quot;audio_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+ &lt;signal handler=&quot;drc_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
&lt;signal name=&quot;format_value&quot; handler=&quot;format_drc_cb&quot;/&gt;
&lt;/object&gt;
&lt;packing&gt;