diff options
Diffstat (limited to 'src/eom-scroll-view.c')
-rw-r--r-- | src/eom-scroll-view.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/eom-scroll-view.c b/src/eom-scroll-view.c index 664d819..52bce7e 100644 --- a/src/eom-scroll-view.c +++ b/src/eom-scroll-view.c @@ -79,8 +79,9 @@ static GtkTargetEntry target_table[] = { enum { PROP_0, - PROP_USE_BG_COLOR, PROP_BACKGROUND_COLOR, + PROP_SCROLLWHEEL_ZOOM, + PROP_USE_BG_COLOR, PROP_ZOOM_MULTIPLIER }; @@ -2552,6 +2553,9 @@ eom_scroll_view_get_property (GObject *object, guint property_id, //FIXME: This doesn't really handle the NULL color. g_value_set_boxed (value, priv->background_color); break; + case PROP_SCROLLWHEEL_ZOOM: + g_value_set_boolean (value, priv->scroll_wheel_zoom); + break; case PROP_ZOOM_MULTIPLIER: g_value_set_double (value, priv->zoom_multiplier); break; @@ -2582,6 +2586,9 @@ eom_scroll_view_set_property (GObject *object, guint property_id, eom_scroll_view_set_background_color (view, color); break; } + case PROP_SCROLLWHEEL_ZOOM: + eom_scroll_view_set_scroll_wheel_zoom (view, g_value_get_boolean (value)); + break; case PROP_ZOOM_MULTIPLIER: eom_scroll_view_set_zoom_multiplier (view, g_value_get_double (value)); break; @@ -2628,6 +2635,11 @@ eom_scroll_view_class_init (EomScrollViewClass *klass) -G_MAXDOUBLE, G_MAXDOUBLE, 0.05, G_PARAM_READWRITE | G_PARAM_STATIC_NAME)); + g_object_class_install_property ( + gobject_class, PROP_SCROLLWHEEL_ZOOM, + g_param_spec_boolean ("scrollwheel-zoom", NULL, NULL, TRUE, + G_PARAM_READWRITE | G_PARAM_STATIC_NAME)); + view_signals [SIGNAL_ZOOM_CHANGED] = g_signal_new ("zoom_changed", EOM_TYPE_SCROLL_VIEW, @@ -2857,7 +2869,10 @@ eom_scroll_view_set_scroll_wheel_zoom (EomScrollView *view, { g_return_if_fail (EOM_IS_SCROLL_VIEW (view)); - view->priv->scroll_wheel_zoom = scroll_wheel_zoom; + if (view->priv->scroll_wheel_zoom != scroll_wheel_zoom) { + view->priv->scroll_wheel_zoom = scroll_wheel_zoom; + g_object_notify (G_OBJECT (view), "scrollwheel-zoom"); + } } void |