diff options
author | infirit <[email protected]> | 2014-07-27 15:45:43 +0200 |
---|---|---|
committer | infirit <[email protected]> | 2014-07-27 21:16:30 +0200 |
commit | f9308d5f86250219e6bf35208e517780d2de2772 (patch) | |
tree | b821c0ec823f8e6e936e554805be7b99c5152e4f /src/eom-window.c | |
parent | 77f6ed0e2a178b9934baee8b846cdd1cc88b2eab (diff) | |
download | eom-f9308d5f86250219e6bf35208e517780d2de2772.tar.bz2 eom-f9308d5f86250219e6bf35208e517780d2de2772.tar.xz |
Bind zoom multiplier to GSettings instead of setting it by hand
Based on eog commit 0cadaebd5c7561991eceaf3ed9af32f50e63b1e9
From Felix Riemann <[email protected]>
Diffstat (limited to 'src/eom-window.c')
-rw-r--r-- | src/eom-window.c | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/src/eom-window.c b/src/eom-window.c index 7e8008f..287a037 100644 --- a/src/eom-window.c +++ b/src/eom-window.c @@ -286,26 +286,6 @@ eom_window_scroll_wheel_zoom_changed_cb (GSettings *settings, gchar *key, gpoint } static void -eom_window_zoom_multiplier_changed_cb (GSettings *settings, gchar *key, gpointer user_data) -{ - EomWindowPrivate *priv; - gdouble multiplier = 0.05; - - 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)); - - multiplier = g_settings_get_double (settings, key); - - eom_scroll_view_set_zoom_multiplier (EOM_SCROLL_VIEW (priv->view), - multiplier); -} - -static void eom_window_transparency_changed_cb (GSettings *settings, gchar *key, gpointer user_data) { EomWindowPrivate *priv; @@ -4244,7 +4224,7 @@ eom_window_drag_data_received (GtkWidget *widget, /* if the request is from another process this will return NULL */ src = gtk_drag_get_source_widget (context); - /* if the drag request originates from the current eog instance, ignore + /* if the drag request originates from the current eom instance, ignore the request if the source window is the same as the dest window */ if (src && gtk_widget_get_toplevel (src) == gtk_widget_get_toplevel (widget)) @@ -4548,6 +4528,9 @@ eom_window_construct_ui (EomWindow *window) G_CALLBACK (view_zoom_changed_cb), window); + g_settings_bind (priv->view_settings, EOM_CONF_VIEW_ZOOM_MULTIPLIER, + priv->view, "zoom-multiplier", G_SETTINGS_BIND_GET); + view_popup = gtk_ui_manager_get_widget (priv->ui_mgr, "/ViewPopup"); eom_scroll_view_set_popup (EOM_SCROLL_VIEW (priv->view), GTK_MENU (view_popup)); @@ -4597,9 +4580,6 @@ eom_window_construct_ui (EomWindow *window) eom_window_scroll_wheel_zoom_changed_cb (priv->view_settings, EOM_CONF_VIEW_SCROLL_WHEEL_ZOOM, window); - eom_window_zoom_multiplier_changed_cb (priv->view_settings, - EOM_CONF_VIEW_ZOOM_MULTIPLIER, - window); eom_window_bg_color_changed_cb (priv->view_settings, EOM_CONF_VIEW_BACKGROUND_COLOR, window); @@ -4667,11 +4647,6 @@ eom_window_init (EomWindow *window) window); g_signal_connect (priv->view_settings, - "changed::" EOM_CONF_VIEW_ZOOM_MULTIPLIER, - G_CALLBACK (eom_window_zoom_multiplier_changed_cb), - window); - - g_signal_connect (priv->view_settings, "changed::" EOM_CONF_VIEW_BACKGROUND_COLOR, G_CALLBACK (eom_window_bg_color_changed_cb), window); |