summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2016-03-10 13:23:14 -0700
committerJohn Stebbins <[email protected]>2016-03-11 14:13:33 -0700
commit5d9e1585a9be17528546f82cde903829082e7a2b (patch)
treea72a127df3f5eea3c7f0f553351039b2e24cd3b5
parent2fc857d1a2eafcaa3771cc9cbc293a7fcc8076e7 (diff)
LinGui: link comb-detect and deinterlace filters
When comb-detect is enabled and decomb/deinterlace filter is not, enable decomb. When decomb/detinterlace filter is disabled, disable comb-detect.
-rw-r--r--gtk/src/callbacks.c30
-rw-r--r--gtk/src/ghb-3.12.ui3
-rw-r--r--gtk/src/ghb-3.14.ui3
-rw-r--r--gtk/src/ghb.ui2
4 files changed, 35 insertions, 3 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index 13d2d8531..b79225df3 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -2128,6 +2128,28 @@ setting_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
}
G_MODULE_EXPORT void
+comb_detect_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ ghb_widget_to_setting(ud->settings, widget);
+ ghb_check_dependency(ud, widget, NULL);
+ ghb_clear_presets_selection(ud);
+ ghb_live_reset(ud);
+
+ const char * comb_detect;
+ comb_detect = ghb_dict_get_string(ud->settings, "PictureCombDetectPreset");
+ if (strcasecmp(comb_detect, "off"))
+ {
+ const char * deint;
+ deint = ghb_dict_get_string(ud->settings, "PictureDeinterlaceFilter");
+ if (!strcasecmp(deint, "off"))
+ {
+ ghb_ui_update(ud, "PictureDeinterlaceFilter",
+ ghb_string_value("decomb"));
+ }
+ }
+}
+
+G_MODULE_EXPORT void
deint_filter_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
ghb_widget_to_setting(ud->settings, widget);
@@ -2137,6 +2159,14 @@ deint_filter_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
ghb_update_ui_combo_box(ud, "PictureDeinterlacePreset", NULL, FALSE);
ghb_ui_update(ud, "PictureDeinterlacePreset",
ghb_dict_get(ud->settings, "PictureDeinterlacePreset"));
+
+ const char * deint;
+ deint = ghb_dict_get_string(ud->settings, "PictureDeinterlaceFilter");
+ if (!strcasecmp(deint, "off"))
+ {
+ ghb_ui_update(ud, "PictureCombDetectPreset",
+ ghb_string_value("off"));
+ }
}
G_MODULE_EXPORT void
diff --git a/gtk/src/ghb-3.12.ui b/gtk/src/ghb-3.12.ui
index 3e9f9d174..023f79c73 100644
--- a/gtk/src/ghb-3.12.ui
+++ b/gtk/src/ghb-3.12.ui
@@ -2867,6 +2867,7 @@ Players will scale the image in order to achieve the specified aspect.</property
<property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="selection-mode">none</property>
<property name="column-spacing">4</property>
<property name="row-spacing">32</property>
<property name="margin-top">16</property>
@@ -2965,7 +2966,7 @@ JunkLeft:JunkRight:JunkTop:JunkBottom:StrictBreaks:MetricPlane:Parity</property>
If a deinterlace filter is enabled, only frames that this filter finds
to be interlaced will be deinterlaced.</property>
- <signal name="changed" handler="setting_widget_changed_cb" swapped="no"/>
+ <signal name="changed" handler="comb_detect_widget_changed_cb" swapped="no"/>
</object>
<packing>
<property name="top_attach">0</property>
diff --git a/gtk/src/ghb-3.14.ui b/gtk/src/ghb-3.14.ui
index 35139ed59..e9c0421a9 100644
--- a/gtk/src/ghb-3.14.ui
+++ b/gtk/src/ghb-3.14.ui
@@ -2868,6 +2868,7 @@ Players will scale the image in order to achieve the specified aspect.</property
<property name="orientation">horizontal</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="selection-mode">none</property>
<property name="column-spacing">4</property>
<property name="row-spacing">32</property>
<property name="margin-top">16</property>
@@ -2966,7 +2967,7 @@ JunkLeft:JunkRight:JunkTop:JunkBottom:StrictBreaks:MetricPlane:Parity</property>
If a deinterlace filter is enabled, only frames that this filter finds
to be interlaced will be deinterlaced.</property>
- <signal name="changed" handler="setting_widget_changed_cb" swapped="no"/>
+ <signal name="changed" handler="comb_detect_widget_changed_cb" swapped="no"/>
</object>
<packing>
<property name="top_attach">0</property>
diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui
index b6edfb6f0..9e327ed53 100644
--- a/gtk/src/ghb.ui
+++ b/gtk/src/ghb.ui
@@ -2970,7 +2970,7 @@ JunkLeft:JunkRight:JunkTop:JunkBottom:StrictBreaks:MetricPlane:Parity</property>
If a deinterlace filter is enabled, only frames that this filter finds
to be interlaced will be deinterlaced.</property>
- <signal name="changed" handler="setting_widget_changed_cb" swapped="no"/>
+ <signal name="changed" handler="comb_detect_widget_changed_cb" swapped="no"/>
</object>
<packing>
<property name="top_attach">0</property>