summaryrefslogtreecommitdiff
path: root/src/eom-window.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-07-28 20:48:46 +0200
committerinfirit <[email protected]>2014-07-28 20:48:46 +0200
commita8f9ec1f676ccf61dfc90a678fad56c762852fc6 (patch)
tree4a18cebaaf0a77cee92558e04399f32ca86c36d9 /src/eom-window.c
parent68bee853e2c5fd5515d9622144fdfe0ec22f4138 (diff)
downloadeom-a8f9ec1f676ccf61dfc90a678fad56c762852fc6.tar.bz2
eom-a8f9ec1f676ccf61dfc90a678fad56c762852fc6.tar.xz
Switch EomPropertiesDialog netbook mode using a GSettings binding
Based on eog commit 21ced20430078aaa283b7925ce282ebb54e05e5d From Felix Riemann <[email protected]>
Diffstat (limited to 'src/eom-window.c')
-rw-r--r--src/eom-window.c31
1 files changed, 4 insertions, 27 deletions
diff --git a/src/eom-window.c b/src/eom-window.c
index b7ec35f..ccd8157 100644
--- a/src/eom-window.c
+++ b/src/eom-window.c
@@ -379,22 +379,6 @@ eom_window_can_save_changed_cb (GSettings *settings, gchar *key, gpointer user_d
}
}
-static void
-eom_window_pd_nbmode_changed_cb (GSettings *settings, gchar *key, gpointer user_data)
-{
- EomWindow *window = EOM_WINDOW (user_data);
-
- if (window->priv->properties_dlg != NULL) {
- gboolean netbook_mode;
- EomPropertiesDialog *dlg;
-
- netbook_mode = g_settings_get_boolean (settings, key);
- dlg = EOM_PROPERTIES_DIALOG (window->priv->properties_dlg);
-
- eom_properties_dialog_set_netbook_mode (dlg, netbook_mode);
- }
-}
-
#ifdef HAVE_LCMS
static cmsHPROFILE *
eom_window_get_display_profile (GdkScreen *screen)
@@ -3022,7 +3006,6 @@ eom_window_cmd_properties (GtkAction *action, gpointer user_data)
"GoPrevious");
if (window->priv->properties_dlg == NULL) {
- gboolean netbook_mode;
window->priv->properties_dlg =
eom_properties_dialog_new (GTK_WINDOW (window),
@@ -3032,11 +3015,10 @@ eom_window_cmd_properties (GtkAction *action, gpointer user_data)
eom_properties_dialog_update (EOM_PROPERTIES_DIALOG (priv->properties_dlg),
priv->image);
- netbook_mode =
- g_settings_get_boolean (priv->ui_settings,
- EOM_CONF_UI_PROPSDIALOG_NETBOOK_MODE);
- eom_properties_dialog_set_netbook_mode (EOM_PROPERTIES_DIALOG (priv->properties_dlg),
- netbook_mode);
+ g_settings_bind (priv->ui_settings,
+ EOM_CONF_UI_PROPSDIALOG_NETBOOK_MODE,
+ priv->properties_dlg, "netbook-mode",
+ G_SETTINGS_BIND_GET);
}
eom_dialog_show (EOM_DIALOG (window->priv->properties_dlg));
@@ -4557,11 +4539,6 @@ eom_window_init (EomWindow *window)
G_CALLBACK (eom_window_collection_mode_changed_cb),
window);
- g_signal_connect (priv->ui_settings,
- "changed::" EOM_CONF_UI_PROPSDIALOG_NETBOOK_MODE,
- G_CALLBACK (eom_window_pd_nbmode_changed_cb),
- window);
-
g_signal_connect (priv->lockdown_settings,
"changed::" EOM_CONF_LOCKDOWN_CAN_SAVE,
G_CALLBACK (eom_window_can_save_changed_cb),