summaryrefslogtreecommitdiffstats
path: root/gtk/src
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2008-09-23 15:40:53 +0000
committerjstebbins <[email protected]>2008-09-23 15:40:53 +0000
commit80e70df144fa2b67f6b357e0c8cb937781243c45 (patch)
tree3684438e5c4528817449dfc0c2360af27ec3f50a /gtk/src
parent7480a8483de8df20e892418e5228210ef6440e9e (diff)
LinGui: refine deblock slider. now shows "Off" and values 5-15.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1748 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src')
-rw-r--r--gtk/src/callbacks.c12
-rw-r--r--gtk/src/ghb.ui3
-rw-r--r--gtk/src/hb-backend.c2
-rw-r--r--gtk/src/resource_data.h4
-rw-r--r--gtk/src/resources.plist3
5 files changed, 20 insertions, 4 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index 3477ea2aa..98b107b26 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -4528,3 +4528,15 @@ gboolean queue_key_press_cb(
return FALSE;
}
+gchar*
+format_deblock_cb(GtkScale *scale, gdouble val, signal_user_data_t *ud)
+{
+ if (val < 5.0)
+ {
+ return g_strdup_printf("Off");
+ }
+ else
+ {
+ return g_strdup_printf("%d", (gint)val);
+ }
+}
diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui
index 3cef79446..dfc4430fb 100644
--- a/gtk/src/ghb.ui
+++ b/gtk/src/ghb.ui
@@ -155,7 +155,7 @@
</object>
<object class="GtkAdjustment" id="adjustment20">
<property name="upper">15</property>
- <property name="lower">0</property>
+ <property name="lower">4</property>
<property name="page_increment">1</property>
<property name="step_increment">1</property>
<property name="page_size">0</property>
@@ -1372,6 +1372,7 @@
<property name="digits">0</property>
<property name="value_pos">GTK_POS_RIGHT</property>
<signal handler="setting_widget_changed_cb" name="value_changed"/>
+ <signal handler="format_deblock_cb" name="format-value"/>
</object>
</child>
</object>
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index b05c249cc..1471181ba 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -3130,7 +3130,7 @@ ghb_add_job(GValue *js, gint unique_id)
hb_list_add( job->filters, &hb_filter_deinterlace );
}
gint deblock = ghb_settings_get_int(js, "deblock");
- if( deblock > 0 )
+ if( deblock >= 5 )
{
deblock_str = g_strdup_printf("%d", deblock);
hb_filter_deblock.settings = deblock_str;
diff --git a/gtk/src/resource_data.h b/gtk/src/resource_data.h
index 252620d8c..88f54d16f 100644
--- a/gtk/src/resource_data.h
+++ b/gtk/src/resource_data.h
@@ -200,7 +200,7 @@
" &lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment20&quot"
";&gt;\n"
" &lt;property name=&quot;upper&quot;&gt;15&lt;/property&gt;\n"
-" &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;\n"
+" &lt;property name=&quot;lower&quot;&gt;4&lt;/property&gt;\n"
" &lt;property name=&quot;page_increment&quot;&gt;1&lt;/property&gt;\n"
" &lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;\n"
" &lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;\n"
@@ -2159,6 +2159,8 @@
";value_pos&quot;&gt;GTK_POS_RIGHT&lt;/property&gt;\n"
" &lt;signal handler=&quo"
"t;setting_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;\n"
+" &lt;signal handler=&quo"
+"t;format_deblock_cb&quot; name=&quot;format-value&quot;/&gt;\n"
" &lt;/object&gt;\n"
" &lt;/child&gt;\n"
" &lt;/object&gt;\n"
diff --git a/gtk/src/resources.plist b/gtk/src/resources.plist
index 37e7c1adf..b9319ef07 100644
--- a/gtk/src/resources.plist
+++ b/gtk/src/resources.plist
@@ -160,7 +160,7 @@
&lt;/object&gt;
&lt;object class=&quot;GtkAdjustment&quot; id=&quot;adjustment20&quot;&gt;
&lt;property name=&quot;upper&quot;&gt;15&lt;/property&gt;
- &lt;property name=&quot;lower&quot;&gt;0&lt;/property&gt;
+ &lt;property name=&quot;lower&quot;&gt;4&lt;/property&gt;
&lt;property name=&quot;page_increment&quot;&gt;1&lt;/property&gt;
&lt;property name=&quot;step_increment&quot;&gt;1&lt;/property&gt;
&lt;property name=&quot;page_size&quot;&gt;0&lt;/property&gt;
@@ -1377,6 +1377,7 @@
&lt;property name=&quot;digits&quot;&gt;0&lt;/property&gt;
&lt;property name=&quot;value_pos&quot;&gt;GTK_POS_RIGHT&lt;/property&gt;
&lt;signal handler=&quot;setting_widget_changed_cb&quot; name=&quot;value_changed&quot;/&gt;
+ &lt;signal handler=&quot;format_deblock_cb&quot; name=&quot;format-value&quot;/&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;/object&gt;