summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-07-27 16:03:10 +0200
committerinfirit <[email protected]>2014-07-27 21:16:30 +0200
commitcfafe5ebda5b0b6c77458614440d939c4832003c (patch)
treeafa7729757a0e7798521607aac01dcb4bb6c1f2e /src
parent7a1720ee8a365ae6418de438d4c42068bf9a97d5 (diff)
downloadeom-cfafe5ebda5b0b6c77458614440d939c4832003c.tar.bz2
eom-cfafe5ebda5b0b6c77458614440d939c4832003c.tar.xz
Have the ThumbNav's scrollbuttons bound to the GSettings key
Based on eog commit 0a898703a9a19589e049a73d21c91898b0dbc51e From Felix Riemann <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/eom-window.c29
1 files changed, 4 insertions, 25 deletions
diff --git a/src/eom-window.c b/src/eom-window.c
index 6fc4eb6..2fb032e 100644
--- a/src/eom-window.c
+++ b/src/eom-window.c
@@ -381,26 +381,6 @@ eom_window_trans_color_changed_cb (GSettings *settings, gchar *key, gpointer use
}
static void
-eom_window_scroll_buttons_changed_cb (GSettings *settings, gchar *key, gpointer user_data)
-{
- EomWindowPrivate *priv;
- gboolean show_buttons = 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));
-
- show_buttons = g_settings_get_boolean (settings, key);
-
- eom_thumb_nav_set_show_buttons (EOM_THUMB_NAV (priv->nav),
- show_buttons);
-}
-
-static void
eom_window_collection_mode_changed_cb (GSettings *settings, gchar *key, gpointer user_data)
{
EomWindowPrivate *priv;
@@ -4545,6 +4525,10 @@ eom_window_construct_ui (EomWindow *window)
g_settings_get_boolean (priv->ui_settings,
EOM_CONF_UI_SCROLL_BUTTONS));
+ // Bind the scroll buttons to their GSettings key
+ g_settings_bind (priv->ui_settings, EOM_CONF_UI_SCROLL_BUTTONS,
+ priv->nav, "show-buttons", G_SETTINGS_BIND_GET);
+
thumb_popup = gtk_ui_manager_get_widget (priv->ui_mgr, "/ThumbnailPopup");
eom_thumb_view_set_thumbnail_popup (EOM_THUMB_VIEW (priv->thumbview),
GTK_MENU (thumb_popup));
@@ -4641,11 +4625,6 @@ eom_window_init (EomWindow *window)
window);
g_signal_connect (priv->ui_settings,
- "changed::" EOM_CONF_UI_SCROLL_BUTTONS,
- G_CALLBACK (eom_window_scroll_buttons_changed_cb),
- window);
-
- g_signal_connect (priv->ui_settings,
"changed::" EOM_CONF_UI_IMAGE_COLLECTION_POSITION,
G_CALLBACK (eom_window_collection_mode_changed_cb),
window);