[evolution] Remove EShellSettings.



commit 7ec9a50ee085ea083e0424dbd7e117573cf4847a
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Mar 11 14:27:39 2013 -0400

    Remove EShellSettings.
    
    EShellSettings predates GSettings and is no longer necessary.
    
    GSettings allows binding GObject properties to GSettings keys,
    with optional mapping functions.  That fulfills the purpose of
    EShellSettings.

 doc/reference/libeshell/libeshell-docs.sgml    |    1 -
 doc/reference/libeshell/libeshell-sections.txt |   31 -
 shell/Makefile.am                              |    2 -
 shell/e-shell-settings.c                       |  753 ------------------------
 shell/e-shell-settings.h                       |  109 ----
 shell/e-shell.c                                |   78 +---
 shell/e-shell.h                                |    2 -
 7 files changed, 1 insertions(+), 975 deletions(-)
---
diff --git a/doc/reference/libeshell/libeshell-docs.sgml b/doc/reference/libeshell/libeshell-docs.sgml
index 22bc93f..992e0b2 100644
--- a/doc/reference/libeshell/libeshell-docs.sgml
+++ b/doc/reference/libeshell/libeshell-docs.sgml
@@ -20,7 +20,6 @@
     <xi:include href="xml/e-shell-sidebar.xml"/>
     <xi:include href="xml/e-shell-taskbar.xml"/>
     <xi:include href="xml/e-shell-searchbar.xml"/>
-    <xi:include href="xml/e-shell-settings.xml"/>
     <xi:include href="xml/e-shell-switcher.xml"/>
     <xi:include href="xml/e-shell-utils.xml"/>
   </chapter>
diff --git a/doc/reference/libeshell/libeshell-sections.txt b/doc/reference/libeshell/libeshell-sections.txt
index 5734ef3..10a42cd 100644
--- a/doc/reference/libeshell/libeshell-sections.txt
+++ b/doc/reference/libeshell/libeshell-sections.txt
@@ -9,7 +9,6 @@ e_shell_get_canonical_name
 e_shell_get_backend_by_name
 e_shell_get_backend_by_scheme
 e_shell_get_client_cache
-e_shell_get_shell_settings
 e_shell_get_registry
 e_shell_create_shell_window
 e_shell_handle_uris
@@ -151,36 +150,6 @@ EShellSearchbarPrivate
 </SECTION>
 
 <SECTION>
-<FILE>e-shell-settings</FILE>
-<TITLE>EShellSettings</TITLE>
-EShellSettings
-e_shell_settings_install_property
-e_shell_settings_install_property_for_key
-e_shell_settings_enable_debug
-e_shell_settings_get_boolean
-e_shell_settings_set_boolean
-e_shell_settings_get_int
-e_shell_settings_set_int
-e_shell_settings_get_string
-e_shell_settings_set_string
-e_shell_settings_get_object
-e_shell_settings_set_object
-e_shell_settings_get_pointer
-e_shell_settings_set_pointer
-<SUBSECTION Standard>
-E_SHELL_SETTINGS
-E_IS_SHELL_SETTINGS
-E_TYPE_SHELL_SETTINGS
-E_SHELL_SETTINGS_CLASS
-E_IS_SHELL_SETTINGS_CLASS
-E_SHELL_SETTINGS_GET_CLASS
-EShellSettingsClass
-e_shell_settings_get_type
-<SUBSECTION Private>
-EShellSettingsPrivate
-</SECTION>
-
-<SECTION>
 <FILE>e-shell-sidebar</FILE>
 <TITLE>EShellSidebar</TITLE>
 EShellSidebar
diff --git a/shell/Makefile.am b/shell/Makefile.am
index d1d3fdb..bd2fe53 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -23,7 +23,6 @@ eshellinclude_HEADERS =                       \
        e-shell-content.h                       \
        e-shell-enumtypes.h                     \
        e-shell-searchbar.h                     \
-       e-shell-settings.h                      \
        e-shell-sidebar.h                       \
        e-shell-switcher.h                      \
        e-shell-taskbar.h                       \
@@ -69,7 +68,6 @@ libeshell_la_SOURCES =                                \
        e-shell-meego.c                         \
        e-shell-meego.h                         \
        e-shell-searchbar.c                     \
-       e-shell-settings.c                      \
        e-shell-sidebar.c                       \
        e-shell-switcher.c                      \
        e-shell-taskbar.c                       \
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 22ea270..efb3348 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -47,7 +47,6 @@
 
 struct _EShellPrivate {
        GQueue alerts;
-       EShellSettings *settings;
        ESourceRegistry *registry;
        EClientCache *client_cache;
        GtkWidget *preferences_window;
@@ -91,8 +90,7 @@ enum {
        PROP_MODULE_DIRECTORY,
        PROP_NETWORK_AVAILABLE,
        PROP_ONLINE,
-       PROP_REGISTRY,
-       PROP_SHELL_SETTINGS
+       PROP_REGISTRY
 };
 
 enum {
@@ -105,14 +103,6 @@ enum {
        LAST_SIGNAL
 };
 
-enum {
-       DEBUG_KEY_SETTINGS = 1 << 0
-};
-
-static GDebugKey debug_keys[] = {
-       { "settings",   DEBUG_KEY_SETTINGS }
-};
-
 static gpointer default_shell;
 static guint signals[LAST_SIGNAL];
 
@@ -129,19 +119,6 @@ G_DEFINE_TYPE_WITH_CODE (
                E_TYPE_EXTENSIBLE, NULL))
 
 static void
-shell_parse_debug_string (EShell *shell)
-{
-       guint flags;
-
-       flags = g_parse_debug_string (
-               g_getenv ("EVOLUTION_DEBUG"),
-               debug_keys, G_N_ELEMENTS (debug_keys));
-
-       if (flags & DEBUG_KEY_SETTINGS)
-               e_shell_settings_enable_debug (shell->priv->settings);
-}
-
-static void
 shell_alert_response_cb (EShell *shell,
                          gint response_id,
                          EAlert *alert)
@@ -685,12 +662,6 @@ shell_get_property (GObject *object,
                                value, e_shell_get_registry (
                                E_SHELL (object)));
                        return;
-
-               case PROP_SHELL_SETTINGS:
-                       g_value_set_object (
-                               value, e_shell_get_shell_settings (
-                               E_SHELL (object)));
-                       return;
        }
 
        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -728,11 +699,6 @@ shell_dispose (GObject *object)
                priv->startup_view = NULL;
        }
 
-       if (priv->settings != NULL) {
-               g_object_unref (priv->settings);
-               priv->settings = NULL;
-       }
-
        if (priv->registry != NULL) {
                g_object_unref (priv->registry);
                priv->registry = NULL;
@@ -1067,21 +1033,6 @@ e_shell_class_init (EShellClass *class)
                        G_PARAM_READABLE));
 
        /**
-        * EShell:settings
-        *
-        * The #EShellSettings object stores application settings.
-        **/
-       g_object_class_install_property (
-               object_class,
-               PROP_SHELL_SETTINGS,
-               g_param_spec_object (
-                       "shell-settings",
-                       "Shell Settings",
-                       "Application-wide settings",
-                       E_TYPE_SHELL_SETTINGS,
-                       G_PARAM_READABLE));
-
-       /**
         * EShell::event
         * @shell: the #EShell which emitted the signal
         * @event_data: data associated with the event
@@ -1244,7 +1195,6 @@ e_shell_init (EShell *shell)
 
        g_queue_init (&shell->priv->alerts);
 
-       shell->priv->settings = g_object_new (E_TYPE_SHELL_SETTINGS, NULL);
        shell->priv->preferences_window = e_preferences_window_new (shell);
        shell->priv->backends_by_name = backends_by_name;
        shell->priv->backends_by_scheme = backends_by_scheme;
@@ -1259,20 +1209,10 @@ e_shell_init (EShell *shell)
        icon_theme = gtk_icon_theme_get_default ();
        gtk_icon_theme_append_search_path (icon_theme, EVOLUTION_ICONDIR);
 
-       shell_parse_debug_string (shell);
-
        g_signal_connect (
                shell, "notify::online",
                G_CALLBACK (shell_notify_online_cb), NULL);
 
-       /* XXX Do this after creating the EShellSettings instance,
-        *     otherwise the GSettings bindings will not get set up. */
-
-       e_shell_settings_install_property_for_key (
-               "start-offline",
-               "org.gnome.evolution.shell",
-               "start-offline");
-
        g_signal_connect_swapped (
                G_APPLICATION (shell), "shutdown",
                G_CALLBACK (shell_sm_quit_cb), shell);
@@ -1452,22 +1392,6 @@ e_shell_get_client_cache (EShell *shell)
 }
 
 /**
- * e_shell_get_shell_settings:
- * @shell: an #EShell
- *
- * Returns the #EShellSettings instance for @shell.
- *
- * Returns: the #EShellSettings instance for @shell
- **/
-EShellSettings *
-e_shell_get_shell_settings (EShell *shell)
-{
-       g_return_val_if_fail (E_IS_SHELL (shell), NULL);
-
-       return shell->priv->settings;
-}
-
-/**
  * e_shell_get_registry:
  * @shell: an #EShell
  *
diff --git a/shell/e-shell.h b/shell/e-shell.h
index bdbbf09..94ed735 100644
--- a/shell/e-shell.h
+++ b/shell/e-shell.h
@@ -28,7 +28,6 @@
 
 #include <shell/e-shell-common.h>
 #include <shell/e-shell-backend.h>
-#include <shell/e-shell-settings.h>
 
 /* Standard GObject macros */
 #define E_TYPE_SHELL \
@@ -117,7 +116,6 @@ EShellBackend *     e_shell_get_backend_by_name     (EShell *shell,
 EShellBackend *        e_shell_get_backend_by_scheme   (EShell *shell,
                                                 const gchar *scheme);
 EClientCache * e_shell_get_client_cache        (EShell *shell);
-EShellSettings *e_shell_get_shell_settings     (EShell *shell);
 ESourceRegistry *
                e_shell_get_registry            (EShell *shell);
 GtkWidget *    e_shell_create_shell_window     (EShell *shell,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]