From fac731e7359c978ff730d48f9ab88a5794450206 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 31 Jul 2009 00:45:38 -0400 Subject: Simplify binding EShellSettings properties to GConf keys. --- shell/e-shell.c | 63 ++++++++++++--------------------------------------------- 1 file changed, 13 insertions(+), 50 deletions(-) (limited to 'shell/e-shell.c') diff --git a/shell/e-shell.c b/shell/e-shell.c index 9ac85e99be..5b1e3beb78 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -923,46 +923,6 @@ shell_class_init (EShellClass *class) /* Install some application-wide settings. */ - e_shell_settings_install_property ( - g_param_spec_boolean ( - "disable-application-handlers", - NULL, - NULL, - FALSE, - G_PARAM_READWRITE)); - - e_shell_settings_install_property ( - g_param_spec_boolean ( - "disable-command-line", - NULL, - NULL, - FALSE, - G_PARAM_READWRITE)); - - e_shell_settings_install_property ( - g_param_spec_boolean ( - "disable-printing", - NULL, - NULL, - FALSE, - G_PARAM_READWRITE)); - - e_shell_settings_install_property ( - g_param_spec_boolean ( - "disable-print-setup", - NULL, - NULL, - FALSE, - G_PARAM_READWRITE)); - - e_shell_settings_install_property ( - g_param_spec_boolean ( - "disable-save-to-disk", - NULL, - NULL, - FALSE, - G_PARAM_READWRITE)); - e_shell_settings_install_property ( g_param_spec_string ( "file-chooser-folder", @@ -1003,24 +963,27 @@ shell_init (EShell *shell) shell, "notify::online", G_CALLBACK (shell_notify_online_cb), NULL); - e_shell_settings_bind_to_gconf ( - shell->priv->settings, "disable-application-handlers", + /* XXX Do this after creating the EShellSettings instance, + * otherwise the GConf bindings will not get set up. */ + + e_shell_settings_install_property_for_key ( + "disable-application-handlers", "/desktop/gnome/lockdown/disable_application_handlers"); - e_shell_settings_bind_to_gconf ( - shell->priv->settings, "disable-command-line", + e_shell_settings_install_property_for_key ( + "disable-command-line", "/desktop/gnome/lockdown/disable_command_line"); - e_shell_settings_bind_to_gconf ( - shell->priv->settings, "disable-printing", + e_shell_settings_install_property_for_key ( + "disable-printing", "/desktop/gnome/lockdown/disable_printing"); - e_shell_settings_bind_to_gconf ( - shell->priv->settings, "disable-print-setup", + e_shell_settings_install_property_for_key ( + "disable-print-setup", "/desktop/gnome/lockdown/disable_print_setup"); - e_shell_settings_bind_to_gconf ( - shell->priv->settings, "disable-save-to-disk", + e_shell_settings_install_property_for_key ( + "disable-save-to-disk", "/desktop/gnome/lockdown/disable_save_to_disk"); /*** Session Management ***/ -- cgit v1.2.3