summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/eom-scroll-view.c19
-rw-r--r--src/eom-window.c28
2 files changed, 19 insertions, 28 deletions
diff --git a/src/eom-scroll-view.c b/src/eom-scroll-view.c
index 45618b1..3f63564 100644
--- a/src/eom-scroll-view.c
+++ b/src/eom-scroll-view.c
@@ -81,6 +81,7 @@ static GtkTargetEntry target_table[] = {
enum {
PROP_0,
PROP_ANTIALIAS_IN,
+ PROP_ANTIALIAS_OUT,
PROP_BACKGROUND_COLOR,
PROP_SCROLLWHEEL_ZOOM,
PROP_USE_BG_COLOR,
@@ -2131,6 +2132,8 @@ eom_scroll_view_set_antialiasing_out (EomScrollView *view, gboolean state)
if (priv->interp_type_out != new_interp_type) {
priv->interp_type_out = new_interp_type;
gtk_widget_queue_draw (GTK_WIDGET (priv->display));
+ g_object_notify (G_OBJECT (view), "antialiasing-out");
+
}
}
@@ -2540,6 +2543,8 @@ eom_scroll_view_init (EomScrollView *view)
sv_color_to_string_mapping, NULL, NULL);
g_settings_bind (settings, EOM_CONF_VIEW_EXTRAPOLATE, view,
"antialiasing-in", G_SETTINGS_BIND_GET);
+ g_settings_bind (settings, EOM_CONF_VIEW_INTERPOLATE, view,
+ "antialiasing-out", G_SETTINGS_BIND_GET);
g_object_unref (settings);
@@ -2609,6 +2614,12 @@ eom_scroll_view_get_property (GObject *object, guint property_id,
g_value_set_boolean (value, filter);
break;
}
+ case PROP_ANTIALIAS_OUT:
+ {
+ gboolean filter = (priv->interp_type_out != GDK_INTERP_NEAREST);
+ g_value_set_boolean (value, filter);
+ break;
+ }
case PROP_USE_BG_COLOR:
g_value_set_boolean (value, priv->use_bg_color);
break;
@@ -2643,6 +2654,9 @@ eom_scroll_view_set_property (GObject *object, guint property_id,
case PROP_ANTIALIAS_IN:
eom_scroll_view_set_antialiasing_in (view, g_value_get_boolean (value));
break;
+ case PROP_ANTIALIAS_OUT:
+ eom_scroll_view_set_antialiasing_out (view, g_value_get_boolean (value));
+ break;
case PROP_USE_BG_COLOR:
eom_scroll_view_set_use_bg_color (view, g_value_get_boolean (value));
break;
@@ -2682,6 +2696,11 @@ eom_scroll_view_class_init (EomScrollViewClass *klass)
g_param_spec_boolean ("antialiasing-in", NULL, NULL, TRUE,
G_PARAM_READWRITE | G_PARAM_STATIC_NAME));
+ g_object_class_install_property (
+ gobject_class, PROP_ANTIALIAS_OUT,
+ g_param_spec_boolean ("antialiasing-out", NULL, NULL, TRUE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_NAME));
+
/**
* EomScrollView:background-color:
*
diff --git a/src/eom-window.c b/src/eom-window.c
index ee15a4f..aad323a 100644
--- a/src/eom-window.c
+++ b/src/eom-window.c
@@ -226,26 +226,6 @@ eom_window_error_quark (void)
}
static void
-eom_window_interp_out_type_changed_cb (GSettings *settings, gchar *key, gpointer user_data)
-{
- EomWindowPrivate *priv;
- gboolean interpolate_out = TRUE;
-
- eom_debug (DEBUG_PREFERENCES);
-
- g_return_if_fail (EOM_IS_WINDOW (user_data));
-
- priv = EOM_WINDOW (user_data)->priv;
-
- g_return_if_fail (EOM_IS_SCROLL_VIEW (priv->view));
-
- interpolate_out = g_settings_get_boolean (settings, key);
-
- eom_scroll_view_set_antialiasing_out (EOM_SCROLL_VIEW (priv->view),
- interpolate_out);
-}
-
-static void
eom_window_transparency_changed_cb (GSettings *settings, gchar *key, gpointer user_data)
{
EomWindowPrivate *priv;
@@ -4473,9 +4453,6 @@ eom_window_construct_ui (EomWindow *window)
gtk_box_pack_end (GTK_BOX (priv->cbox), priv->layout, TRUE, TRUE, 0);
- eom_window_interp_out_type_changed_cb (priv->view_settings,
- EOM_CONF_VIEW_INTERPOLATE,
- window);
eom_window_transparency_changed_cb (priv->view_settings,
EOM_CONF_VIEW_TRANSPARENCY,
window);
@@ -4522,11 +4499,6 @@ eom_window_init (EomWindow *window)
priv->lockdown_settings = g_settings_new (EOM_CONF_LOCKDOWN_SCHEMA);
g_signal_connect (priv->view_settings,
- "changed::" EOM_CONF_VIEW_INTERPOLATE,
- G_CALLBACK (eom_window_interp_out_type_changed_cb),
- window);
-
- g_signal_connect (priv->view_settings,
"changed::" EOM_CONF_VIEW_TRANSPARENCY,
G_CALLBACK (eom_window_transparency_changed_cb),
window);