[gnome-panel/wip/gnome-3.10+: 2/31] remove gconf



commit 9898f7f52847aaa845f36652c14c2aa86dde30e4
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Tue Jul 8 18:44:45 2014 +0300

    remove gconf

 configure.ac                                       |    7 +-
 doc/reference/panel-applet/panel-applet-docs.sgml  |    1 -
 .../panel-applet/panel-applet-sections.txt         |   20 -
 doc/reference/panel-applet/tmpl/gconf.sgml         |  166 -------
 gnome-panel/Makefile.am                            |    2 -
 .../panel-applet-container.c                       |    1 -
 .../panel-applet-frame-dbus.c                      |    6 -
 gnome-panel/panel-applet-frame.c                   |    6 -
 gnome-panel/panel-applet-frame.h                   |    1 -
 gnome-panel/panel-gconf.c                          |  142 ------
 gnome-panel/panel-gconf.h                          |   44 --
 gnome-panel/panel-layout.c                         |   24 -
 gnome-panel/panel-test-applets.c                   |    3 +-
 libpanel-applet/Makefile.am                        |   11 +-
 .../libpanelapplet-4.0-uninstalled.pc.in           |    2 +-
 libpanel-applet/libpanelapplet-4.0.pc.in           |    2 +-
 libpanel-applet/panel-applet-bindings.c            |    8 +-
 libpanel-applet/panel-applet-bindings.h            |    4 -
 libpanel-applet/panel-applet-gconf.c               |  487 --------------------
 libpanel-applet/panel-applet-gconf.h               |   84 ----
 libpanel-applet/panel-applet.c                     |  240 ----------
 libpanel-applet/panel-applet.h                     |    6 -
 22 files changed, 10 insertions(+), 1257 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 64aef07..8711366 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,7 +37,6 @@ AC_PROG_CC
 AM_PATH_PYTHON
 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
 AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources)
-AC_PATH_PROG(GCONFTOOL, gconftool-2)
 
 GNOME_COMPILE_WARNINGS([maximum])
 
@@ -69,7 +68,6 @@ PANGO_REQUIRED=1.15.4
 GLIB_REQUIRED=2.35.0
 GTK_REQUIRED=3.3.8
 LIBWNCK_REQUIRED=3.4.6
-GCONF_REQUIRED=2.6.1
 LIBGNOME_MENU_REQUIRED=3.7.90
 TELEPATHY_GLIB_REQUIRED=0.14.0
 LIBECAL_REQUIRED=3.5.3
@@ -93,7 +91,6 @@ PKG_CHECK_MODULES(PANEL, gmodule-2.0 >= $GLIB_REQUIRED
                         gio-2.0 >= $GLIB_REQUIRED
                         gio-unix-2.0 >= $GLIB_REQUIRED
                         gnome-desktop-3.0 >= $LIBGNOME_DESKTOP_REQUIRED
-                        gconf-2.0 >= $GCONF_REQUIRED
                         libgnome-menu-3.0 >= $LIBGNOME_MENU_REQUIRED
                         dconf >= $DCONF_REQUIRED)
 AC_SUBST(PANEL_CFLAGS)
@@ -109,7 +106,7 @@ if test "x$HAVE_TELEPATHY_GLIB" = "xyes" ; then
     AC_DEFINE(HAVE_TELEPATHY_GLIB, 1, [Defined if telepathy-glib support is enabled])
 fi
 
-PKG_CHECK_MODULES(LIBPANEL_APPLET, gtk+-3.0 >= $GTK_REQUIRED cairo-xlib cairo-gobject gconf-2.0 >= 
$GCONF_REQUIRED gio-2.0 >= $GLIB_REQUIRED gio-unix-2.0 >= $GLIB_REQUIRED)
+PKG_CHECK_MODULES(LIBPANEL_APPLET, gtk+-3.0 >= $GTK_REQUIRED cairo-xlib cairo-gobject gio-2.0 >= 
$GLIB_REQUIRED gio-unix-2.0 >= $GLIB_REQUIRED)
 AC_SUBST(LIBPANEL_APPLET_CFLAGS)
 AC_SUBST(LIBPANEL_APPLET_LIBS)
 
@@ -299,8 +296,6 @@ dnl yelp-tools stuff
 
 YELP_HELP_INIT
 
-AM_GCONF_SOURCE_2
-
 dnl platform test
 case $host in
 *-*-solaris*)
diff --git a/doc/reference/panel-applet/panel-applet-docs.sgml 
b/doc/reference/panel-applet/panel-applet-docs.sgml
index 4272f26..5695efa 100644
--- a/doc/reference/panel-applet/panel-applet-docs.sgml
+++ b/doc/reference/panel-applet/panel-applet-docs.sgml
@@ -737,7 +737,6 @@ PanelApplet.Applet.factory_main("HelloWorldFactory",
 
     <xi:include href="xml/applet.xml"/>
     <xi:include href="xml/applet-factory.xml"/>
-    <xi:include href="xml/gconf.xml"/>
   </part>
 
 </book>
diff --git a/doc/reference/panel-applet/panel-applet-sections.txt 
b/doc/reference/panel-applet/panel-applet-sections.txt
index 4da5a93..409b547 100644
--- a/doc/reference/panel-applet/panel-applet-sections.txt
+++ b/doc/reference/panel-applet/panel-applet-sections.txt
@@ -42,23 +42,3 @@ PANEL_APPLET_OUT_PROCESS_FACTORY
 PANEL_APPLET_IN_PROCESS_FACTORY
 panel_applet_factory_main
 </SECTION>
-
-<INCLUDE>panel-applet-gconf.h</INCLUDE>
-
-<SECTION>
-<FILE>gconf</FILE>
-<TITLE>GConf Utilities</TITLE>
-panel_applet_gconf_get_full_key
-panel_applet_gconf_get_bool
-panel_applet_gconf_get_int
-panel_applet_gconf_get_string
-panel_applet_gconf_get_float
-panel_applet_gconf_get_list
-panel_applet_gconf_get_value
-panel_applet_gconf_set_bool
-panel_applet_gconf_set_int
-panel_applet_gconf_set_string
-panel_applet_gconf_set_float
-panel_applet_gconf_set_list
-panel_applet_gconf_set_value
-</SECTION>
diff --git a/gnome-panel/Makefile.am b/gnome-panel/Makefile.am
index 2f0e5a0..1b40334 100644
--- a/gnome-panel/Makefile.am
+++ b/gnome-panel/Makefile.am
@@ -30,7 +30,6 @@ panel_sources =                       \
        panel.c                 \
        applet.c                \
        panel-util.c            \
-       panel-gconf.c           \
        panel-properties-dialog.c       \
        panel-run-dialog.c      \
        menu.c                  \
@@ -79,7 +78,6 @@ panel_headers =                       \
        applet.h                \
        panel-util.h            \
        panel-properties-dialog.h       \
-       panel-gconf.h           \
        panel-run-dialog.h      \
        menu.h                  \
        panel-context-menu.h    \
diff --git a/gnome-panel/libpanel-applet-private/panel-applet-container.c 
b/gnome-panel/libpanel-applet-private/panel-applet-container.c
index 1a47145..8f09811 100644
--- a/gnome-panel/libpanel-applet-private/panel-applet-container.c
+++ b/gnome-panel/libpanel-applet-private/panel-applet-container.c
@@ -52,7 +52,6 @@ typedef struct {
 
 static const AppletPropertyInfo applet_properties [] = {
        { "settings-path", "SettingsPath" },
-       { "prefs-key",     "PrefsKey" },
        { "orient",        "Orient" },
        { "size",          "Size" },
        { "size-hints",    "SizeHints" },
diff --git a/gnome-panel/libpanel-applet-private/panel-applet-frame-dbus.c 
b/gnome-panel/libpanel-applet-private/panel-applet-frame-dbus.c
index 5ca1be5..049fa58 100644
--- a/gnome-panel/libpanel-applet-private/panel-applet-frame-dbus.c
+++ b/gnome-panel/libpanel-applet-private/panel-applet-frame-dbus.c
@@ -408,7 +408,6 @@ panel_applet_frame_dbus_load (const gchar                 *iid,
        GVariantBuilder       builder;
        GdkScreen            *screen;
        gchar                *settings_path;
-       gchar                *conf_path;
        gchar                *background;
        guint                 orient;
 
@@ -425,7 +424,6 @@ panel_applet_frame_dbus_load (const gchar                 *iid,
        screen = panel_applet_frame_activating_get_screen (frame_act);
        orient = get_panel_applet_orient (panel_applet_frame_activating_get_orientation (frame_act));
        settings_path = panel_applet_frame_activating_get_settings_path (frame_act);
-       conf_path = panel_applet_frame_activating_get_conf_path (frame_act);
        /* we can't really get a background string at this point since we don't
         * know the position of the applet */
        background = NULL;
@@ -435,9 +433,6 @@ panel_applet_frame_dbus_load (const gchar                 *iid,
                               "settings-path",
                               g_variant_new_string (settings_path));
        g_variant_builder_add (&builder, "{sv}",
-                              "prefs-key",
-                              g_variant_new_string (conf_path));
-       g_variant_builder_add (&builder, "{sv}",
                               "orient",
                               g_variant_new_uint32 (orient));
        g_variant_builder_add (&builder, "{sv}",
@@ -460,7 +455,6 @@ panel_applet_frame_dbus_load (const gchar                 *iid,
                                    frame,
                                    g_variant_builder_end (&builder));
 
-       g_free (conf_path);
        g_free (settings_path);
        g_free (background);
 
diff --git a/gnome-panel/panel-applet-frame.c b/gnome-panel/panel-applet-frame.c
index c4c2e17..c6c9ea3 100644
--- a/gnome-panel/panel-applet-frame.c
+++ b/gnome-panel/panel-applet-frame.c
@@ -891,12 +891,6 @@ panel_applet_frame_activating_get_settings_path (PanelAppletFrameActivating *fra
        return path_instance;
 }
 
-gchar *
-panel_applet_frame_activating_get_conf_path (PanelAppletFrameActivating *frame_act)
-{
-       return panel_layout_object_get_gconf_path (frame_act->id);
-}
-
 static void
 panel_applet_frame_loading_failed_response (GtkWidget *dialog,
                                            guint      response,
diff --git a/gnome-panel/panel-applet-frame.h b/gnome-panel/panel-applet-frame.h
index 64b8486..8090895 100644
--- a/gnome-panel/panel-applet-frame.h
+++ b/gnome-panel/panel-applet-frame.h
@@ -108,7 +108,6 @@ PanelOrientation  panel_applet_frame_activating_get_orientation (PanelAppletFram
 guint32           panel_applet_frame_activating_get_size        (PanelAppletFrameActivating *frame_act);
 gboolean          panel_applet_frame_activating_get_locked_down (PanelAppletFrameActivating *frame_act);
 gchar            *panel_applet_frame_activating_get_settings_path (PanelAppletFrameActivating *frame_act);
-gchar            *panel_applet_frame_activating_get_conf_path   (PanelAppletFrameActivating *frame_act);
 
 void  _panel_applet_frame_set_iid               (PanelAppletFrame           *frame,
                                                 const gchar                *iid);
diff --git a/gnome-panel/panel-layout.c b/gnome-panel/panel-layout.c
index 633f520..0db2167 100644
--- a/gnome-panel/panel-layout.c
+++ b/gnome-panel/panel-layout.c
@@ -34,7 +34,6 @@
 #include <libpanel-util/panel-gsettings.h>
 
 #include "panel.h"
-#include "panel-gconf.h"
 #include "panel-multiscreen.h"
 #include "panel-object-loader.h"
 #include "panel-schemas.h"
@@ -48,7 +47,6 @@ static GSettings *layout_settings = NULL;
 #define PANEL_LAYOUT_ERROR panel_layout_error_quark ()
 
 #define PANEL_LAYOUT_DEFAULT_LAYOUT_FILE "panel-default-layout.layout"
-#define PANEL_LAYOUT_OBJECT_GCONF_PATH_TEMPLATE "/apps/panel3-applets/%s"
 #define PANEL_LAYOUT_INSTANCE_CONFIG_SUBPATH "@instance-config/"
 
 static void panel_layout_load_toplevel    (const char *toplevel_id);
@@ -700,24 +698,6 @@ panel_layout_object_create (PanelObjectType      type,
         g_free (id);
 }
 
-char *
-panel_layout_object_get_gconf_path (const char *object_id)
-{
-        char *ret;
-        char *gconfied_id;
-
-        /* gconf uses '_' and not '-' */
-        gconfied_id = g_strdup (object_id);
-        g_strdelimit (gconfied_id, "-", '_');
-
-        ret = g_strdup_printf (PANEL_LAYOUT_OBJECT_GCONF_PATH_TEMPLATE,
-                               gconfied_id);
-
-        g_free (gconfied_id);
-
-        return ret;
-}
-
 GSettings *
 panel_layout_get_instance_settings (GSettings  *settings_object,
                                     const char *schema)
@@ -926,10 +906,6 @@ panel_layout_delete_object (const char *object_id)
         panel_dconf_recursive_reset (path, NULL);
         g_free (path);
 
-        path = panel_layout_object_get_gconf_path (id_copy);
-        panel_gconf_recursive_unset (path, NULL);
-        g_free (path);
-
         g_free (id_copy);
 }
 
diff --git a/gnome-panel/panel-test-applets.c b/gnome-panel/panel-test-applets.c
index b6616ae..795b138 100644
--- a/gnome-panel/panel-test-applets.c
+++ b/gnome-panel/panel-test-applets.c
@@ -10,7 +10,6 @@
 #include <config.h>
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
-#include <gconf/gconf.h>
 
 #include <libpanel-util/panel-cleanup.h>
 
@@ -301,7 +300,7 @@ setup_options (void)
        setup_combo (orient_combo, orient_items, "Orientation",
                     G_N_ELEMENTS (orient_items));
 
-       unique_key = gconf_unique_key ();
+       unique_key = g_strdup ("unused");
        prefs_dir = g_strdup_printf ("/tmp/%s", unique_key);
        g_free (unique_key);
        gtk_entry_set_text (GTK_ENTRY (prefs_dir_entry), prefs_dir);
diff --git a/libpanel-applet/Makefile.am b/libpanel-applet/Makefile.am
index f9e03d7..4c017e5 100644
--- a/libpanel-applet/Makefile.am
+++ b/libpanel-applet/Makefile.am
@@ -12,7 +12,6 @@ AM_CFLAGS = $(WARN_CFLAGS)
 libpanel_appletincludedir = $(includedir)/gnome-panel-4.0/libpanel-applet
 libpanel_appletinclude_HEADERS =       \
        panel-applet.h                  \
-       panel-applet-gconf.h            \
        panel-applet-enums.h
 
 libpanel_applet_4_la_SOURCES =         \
@@ -22,9 +21,7 @@ libpanel_applet_4_la_SOURCES =                \
        panel-applet-factory.h          \
        panel-applet-factory.c          \
        panel-applet-bindings.h         \
-       panel-applet-bindings.c         \
-       panel-applet-gconf.c            \
-       panel-applet-gconf.h
+       panel-applet-bindings.c
 
 libpanel_applet_4_la_LIBADD  = \
        $(LIBPANEL_APPLET_LIBS) \
@@ -111,15 +108,13 @@ INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
 if HAVE_INTROSPECTION
 introspection_sources =        \
        panel-applet.c          \
-       panel-applet.h          \
-       panel-applet-gconf.c    \
-       panel-applet-gconf.h
+       panel-applet.h
 built_introspection_sources =  \
        panel-applet-enums.c    \
        panel-applet-enums.h
 
 PanelApplet-4.0.gir: libpanel-applet-4.la
-PanelApplet_4_0_gir_INCLUDES = GObject-2.0 Gtk-3.0 GConf-2.0
+PanelApplet_4_0_gir_INCLUDES = GObject-2.0 Gtk-3.0
 PanelApplet_4_0_gir_CFLAGS = $(AM_CPPFLAGS)
 PanelApplet_4_0_gir_LIBS = libpanel-applet-4.la
 PanelApplet_4_0_gir_FILES = $(addprefix $(srcdir)/,$(introspection_sources)) $(addprefix 
$(builddir)/,$(built_introspection_sources))
diff --git a/libpanel-applet/libpanelapplet-4.0-uninstalled.pc.in 
b/libpanel-applet/libpanelapplet-4.0-uninstalled.pc.in
index 3660939..2e5acce 100644
--- a/libpanel-applet/libpanelapplet-4.0-uninstalled.pc.in
+++ b/libpanel-applet/libpanelapplet-4.0-uninstalled.pc.in
@@ -7,7 +7,7 @@ libpanel_applet_api_version= LIBPANEL_APPLET_API_VERSION@
 
 Name: libpanel-applet-4
 Description: libpanel-applet-4
-Requires: glib-2.0 gconf-2.0 gtk+-3.0
+Requires: glib-2.0 gtk+-3.0
 Version: @VERSION@
 Libs: ${pc_top_builddir}/${pcfiledir}/libpanel-applet-4.la
 Cflags: -I${pc_top_builddir}/${pcfiledir}
diff --git a/libpanel-applet/libpanelapplet-4.0.pc.in b/libpanel-applet/libpanelapplet-4.0.pc.in
index c1c303e..b6f989c 100644
--- a/libpanel-applet/libpanelapplet-4.0.pc.in
+++ b/libpanel-applet/libpanelapplet-4.0.pc.in
@@ -10,7 +10,7 @@ libpanel_applet_dir= appletsdir_pkgconfig@
 
 Name: libpanel-applet-4
 Description: libpanel-applet-4
-Requires: glib-2.0 gconf-2.0 gtk+-3.0
+Requires: glib-2.0 gtk+-3.0
 Version: @VERSION@
 Libs: -L${libdir} -lpanel-applet-4
 Cflags: -I${includedir}/gnome-panel-4.0/libpanel-applet
diff --git a/libpanel-applet/panel-applet-bindings.c b/libpanel-applet/panel-applet-bindings.c
index 843e502..ecbb835 100644
--- a/libpanel-applet/panel-applet-bindings.c
+++ b/libpanel-applet/panel-applet-bindings.c
@@ -159,10 +159,8 @@ panel_bindings_mouse_modifier_changed (GSettings *settings, const gchar *key)
        panel_bindings_mouse_modifier_set_from_string (g_settings_get_string (settings, key));
 }
 
-void panel_applet_bindings_clean (GConfClient *client) {}
-
-void
-panel_applet_bindings_init (GConfClient *client)
+static void
+panel_applet_bindings_init (void)
 {
        char *str;
 
@@ -191,7 +189,7 @@ panel_applet_bindings_get_mouse_button_modifier_keymask (void)
        g_assert (mouse_button_modifier_keymask != 0);
 
        if (!initialised)
-               panel_applet_bindings_init (NULL);
+               panel_applet_bindings_init ();
 
        mod = panel_applet_bindings_get_real_modifier_mask (mouse_button_modifier_keymask);
 
diff --git a/libpanel-applet/panel-applet-bindings.h b/libpanel-applet/panel-applet-bindings.h
index d5f15bc..262d9bf 100644
--- a/libpanel-applet/panel-applet-bindings.h
+++ b/libpanel-applet/panel-applet-bindings.h
@@ -25,13 +25,9 @@
 
 #include <glib.h>
 #include <gdk/gdk.h>
-#include <gconf/gconf-client.h>
 
 G_BEGIN_DECLS
 
-void  panel_applet_bindings_init  (GConfClient *client);
-void  panel_applet_bindings_clean (GConfClient *client);
-
 guint panel_applet_bindings_get_mouse_button_modifier_keymask (void);
 
 void panel_applet_bindings_key_event_is_popup (GdkEventKey *event,
diff --git a/libpanel-applet/panel-applet.c b/libpanel-applet/panel-applet.c
index 40f4442..7dbf956 100644
--- a/libpanel-applet/panel-applet.c
+++ b/libpanel-applet/panel-applet.c
@@ -36,8 +36,6 @@
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
 #include <gtk/gtkx.h>
-#include <gconf/gconf.h>
-#include <gconf/gconf-client.h>
 #include <X11/Xatom.h>
 #include <cairo-xlib.h>
 
@@ -80,7 +78,6 @@
 struct _PanelAppletPrivate {
        GtkWidget         *plug;
        GtkWidget         *applet;
-       GConfClient       *client;
        GDBusConnection   *connection;
 
        char              *id;
@@ -88,7 +85,6 @@ struct _PanelAppletPrivate {
        char              *object_path;
        guint              object_id;
        char              *settings_path;
-       char              *prefs_key;
 
        GtkBuilder         *builder;
        GSimpleActionGroup *applet_action_group;
@@ -127,7 +123,6 @@ enum {
        PROP_CLOSURE,
        PROP_CONNECTION,
        PROP_SETTINGS_PATH,
-       PROP_PREFS_KEY,
        PROP_ORIENT,
        PROP_SIZE,
        PROP_BACKGROUND,
@@ -176,204 +171,6 @@ G_DEFINE_TYPE (PanelApplet, panel_applet, GTK_TYPE_EVENT_BOX)
 #define PANEL_APPLET_INTERFACE   "org.gnome.panel.applet.Applet"
 #define PANEL_APPLET_OBJECT_PATH "/org/gnome/panel/applet/%s/%d"
 
-static void
-panel_applet_associate_schemas_in_dir (GConfClient  *client,
-                                      const gchar  *prefs_key,
-                                      const gchar  *schema_dir,
-                                      GError      **error)
-{
-       GSList *list, *l;
-
-       g_assert (error != NULL);
-
-       list = gconf_client_all_entries (client, schema_dir, error);
-
-       if (*error != NULL)
-               return;
-
-       for (l = list; l; l = l->next) {
-               GConfEntry  *entry = l->data;
-               const gchar *schema_key;
-               GConfEntry  *applet_entry;
-               const gchar *applet_schema_key;
-               gchar       *key;
-               gchar       *tmp;
-
-               schema_key = gconf_entry_get_key (entry);
-               tmp = g_path_get_basename (schema_key);
-
-               if (strchr (tmp, '-'))
-                       g_warning ("Applet key '%s' contains a hyphen. Please "
-                                  "use underscores in gconf keys\n", tmp);
-
-               key = g_strdup_printf ("%s/%s", prefs_key, tmp);
-               g_free (tmp);
-
-               /* Associating a schema is potentially expensive, so let's try
-                * to avoid this by doing it only when needed. So we check if
-                * the key is already correctly associated. */
-
-               applet_entry = gconf_client_get_entry (client, key,
-                                                      NULL, TRUE, NULL);
-               if (applet_entry)
-                       applet_schema_key = gconf_entry_get_schema_name (applet_entry);
-               else
-                       applet_schema_key = NULL;
-
-               if (g_strcmp0 (schema_key, applet_schema_key) != 0) {
-                       gconf_engine_associate_schema (client->engine,
-                                                      key, schema_key, error);
-
-                       if (applet_entry == NULL ||
-                           gconf_entry_get_value (applet_entry) == NULL ||
-                           gconf_entry_get_is_default (applet_entry)) {
-                               /* unset the key: gconf_client_get_entry()
-                                * brought an invalid entry in the client
-                                * cache, and we want to fix this */
-                               gconf_client_unset (client, key, NULL);
-                       }
-               }
-
-               g_free (key);
-
-               if (applet_entry)
-                       gconf_entry_unref (applet_entry);
-               gconf_entry_unref (entry);
-
-               if (*error) {
-                       g_slist_free (list);
-                       return;
-               }
-       }
-
-       g_slist_free (list);
-
-       list = gconf_client_all_dirs (client, schema_dir, error);
-
-       for (l = list; l; l = l->next) {
-               gchar *subdir = l->data;
-               gchar *prefs_subdir;
-               gchar *schema_subdir;
-               gchar *tmp;
-
-               tmp = g_path_get_basename (subdir);
-
-               prefs_subdir  = g_strdup_printf ("%s/%s", prefs_key, tmp);
-               schema_subdir = g_strdup_printf ("%s/%s", schema_dir, tmp);
-
-               panel_applet_associate_schemas_in_dir (client,
-                                                      prefs_subdir,
-                                                      schema_subdir,
-                                                      error);
-
-               g_free (prefs_subdir);
-               g_free (schema_subdir);
-               g_free (subdir);
-               g_free (tmp);
-
-               if (*error) {
-                       g_slist_free (list);
-                       return;
-               }
-       }
-
-       g_slist_free (list);
-}
-
-/**
- * panel_applet_add_preferences:
- * @applet: a #PanelApplet.
- * @schema_dir: a GConf path of a schema directory.
- * @error: a #GError, or %NULL.
- *
- * Associates the per-instance GConf directory of @applet to the schemas
- * defined in @schema_dir. This must be called if the applet will save
- * per-instance settings, to ensure that each key in the per-instance GConf
- * directory has a defined type, sane default and documentation.
- *
- * Deprecated: 3.0: Use #GSettings to store per-instance settings.
- **/
-void
-panel_applet_add_preferences (PanelApplet  *applet,
-                             const gchar  *schema_dir,
-                             GError      **error)
-{
-       GError **_error = NULL;
-       GError  *our_error = NULL;
-
-       g_return_if_fail (PANEL_IS_APPLET (applet));
-       g_return_if_fail (schema_dir != NULL);
-
-       if (!applet->priv->prefs_key)
-               return;
-
-       /* panel_applet_associate_schemas_in_dir() requires a non-NULL error */
-       if (error)
-               _error = error;
-       else
-               _error = &our_error;
-
-       panel_applet_associate_schemas_in_dir (applet->priv->client,
-                                              applet->priv->prefs_key,
-                                              schema_dir,
-                                              _error);
-
-       if (!error && our_error)
-               g_error_free (our_error);
-}
-
-/**
- * panel_applet_get_preferences_key:
- * @applet: a #PanelApplet.
- *
- * Gets the GConf path to the per-instance settings of @applet.
- *
- * Returns: a copy of the GConf path to the per-instance settings of @applet.
- *
- * Deprecated: 3.0: Use #GSettings to store per-instance settings.
- **/
-char *
-panel_applet_get_preferences_key (PanelApplet *applet)
-{
-       g_return_val_if_fail (PANEL_IS_APPLET (applet), NULL);
-
-       if (!applet->priv->prefs_key)
-               return NULL;
-
-       return g_strdup (applet->priv->prefs_key);
-}
-
-static void
-panel_applet_set_preferences_key (PanelApplet *applet,
-                                 const char  *prefs_key)
-{
-       if (applet->priv->prefs_key == prefs_key)
-               return;
-
-       if (g_strcmp0 (applet->priv->prefs_key, prefs_key) == 0)
-               return;
-
-       if (applet->priv->prefs_key) {
-               gconf_client_remove_dir (applet->priv->client,
-                                        applet->priv->prefs_key,
-                                        NULL);
-
-               g_free (applet->priv->prefs_key);
-               applet->priv->prefs_key = NULL;
-       }
-
-       if (prefs_key) {
-               applet->priv->prefs_key = g_strdup (prefs_key);
-
-               gconf_client_add_dir (applet->priv->client,
-                                     applet->priv->prefs_key,
-                                     GCONF_CLIENT_PRELOAD_RECURSIVE,
-                                     NULL);
-       }
-
-       g_object_notify (G_OBJECT (applet), "prefs-key");
-}
-
 /**
  * panel_applet_settings_new:
  * @applet: a #PanelApplet.
@@ -1067,12 +864,6 @@ panel_applet_finalize (GObject *object)
                applet->priv->object_path = NULL;
        }
 
-       panel_applet_set_preferences_key (applet, NULL);
-
-       if (applet->priv->client)
-               g_object_unref (applet->priv->client);
-       applet->priv->client = NULL;
-
        if (applet->priv->applet_action_group) {
                g_object_unref (applet->priv->applet_action_group);
                applet->priv->applet_action_group = NULL;
@@ -1089,7 +880,6 @@ panel_applet_finalize (GObject *object)
        }
 
        g_free (applet->priv->size_hints);
-       g_free (applet->priv->prefs_key);
        g_free (applet->priv->settings_path);
        g_free (applet->priv->background);
        g_free (applet->priv->id);
@@ -1896,9 +1686,6 @@ panel_applet_get_property (GObject    *object,
        case PROP_SETTINGS_PATH:
                g_value_set_string (value, applet->priv->settings_path);
                break;
-       case PROP_PREFS_KEY:
-               g_value_set_string (value, applet->priv->prefs_key);
-               break;
        case PROP_ORIENT:
                g_value_set_uint (value, applet->priv->orient);
                break;
@@ -1960,9 +1747,6 @@ panel_applet_set_property (GObject      *object,
        case PROP_SETTINGS_PATH:
                panel_applet_set_settings_path (applet, g_value_get_string (value));
                break;
-       case PROP_PREFS_KEY:
-               panel_applet_set_preferences_key (applet, g_value_get_string (value));
-               break;
        case PROP_ORIENT:
                panel_applet_set_orient (applet, g_value_get_uint (value));
                break;
@@ -2060,8 +1844,6 @@ panel_applet_init (PanelApplet *applet)
        applet->priv->orient = PANEL_APPLET_ORIENT_UP;
        applet->priv->size   = 24;
 
-       applet->priv->client = gconf_client_get_default ();
-
        applet->priv->panel_action_group = g_simple_action_group_new ();
        g_action_map_add_action_entries (G_ACTION_MAP (applet->priv->panel_action_group),
                                         menu_entries,
@@ -2185,22 +1967,6 @@ panel_applet_class_init (PanelAppletClass *klass)
                                                              NULL,
                                                              G_PARAM_READWRITE));
        /**
-        * PanelApplet:prefs-key:
-        *
-        * The GConf path to the per-instance settings of the applet.
-        *
-        * This property gets set when the applet gets embedded.
-        *
-        * Deprecated: 3.0: Use #GSettings to store per-instance settings.
-        **/
-       g_object_class_install_property (gobject_class,
-                                        PROP_PREFS_KEY,
-                                        g_param_spec_string ("prefs-key",
-                                                             "PrefsKey",
-                                                             "GConf Preferences Key",
-                                                             NULL,
-                                                             G_PARAM_READWRITE));
-       /**
         * PanelApplet:orient:
         *
         * The #PanelAppletOrient of the applet.
@@ -2419,9 +2185,6 @@ get_property_cb (GDBusConnection *connection,
        if (g_strcmp0 (property_name, "SettingsPath") == 0) {
                retval = g_variant_new_string (applet->priv->settings_path ?
                                               applet->priv->settings_path : "");
-       } else if (g_strcmp0 (property_name, "PrefsKey") == 0) {
-               retval = g_variant_new_string (applet->priv->prefs_key ?
-                                              applet->priv->prefs_key : "");
        } else if (g_strcmp0 (property_name, "Orient") == 0) {
                retval = g_variant_new_uint32 (applet->priv->orient);
        } else if (g_strcmp0 (property_name, "Size") == 0) {
@@ -2462,8 +2225,6 @@ set_property_cb (GDBusConnection *connection,
 
        if (g_strcmp0 (property_name, "SettingsPath") == 0) {
                panel_applet_set_settings_path (applet, g_variant_get_string (value, NULL));
-       } else if (g_strcmp0 (property_name, "PrefsKey") == 0) {
-               panel_applet_set_preferences_key (applet, g_variant_get_string (value, NULL));
        } else if (g_strcmp0 (property_name, "Orient") == 0) {
                panel_applet_set_orient (applet, g_variant_get_uint32 (value));
        } else if (g_strcmp0 (property_name, "Size") == 0) {
@@ -2497,7 +2258,6 @@ static const gchar introspection_xml[] =
              "<arg name='time' type='u' direction='in'/>"
            "</method>"
            "<property name='SettingsPath' type='s' access='readwrite'/>"
-           "<property name='PrefsKey' type='s' access='readwrite'/>"
            "<property name='Orient' type='u' access='readwrite' />"
            "<property name='Size' type='u' access='readwrite'/>"
            "<property name='Background' type='s' access='readwrite'/>"
diff --git a/libpanel-applet/panel-applet.h b/libpanel-applet/panel-applet.h
index ff5e8ce..411e9a9 100644
--- a/libpanel-applet/panel-applet.h
+++ b/libpanel-applet/panel-applet.h
@@ -142,12 +142,6 @@ void               panel_applet_set_background_widget (PanelApplet *applet,
 GSettings         *panel_applet_settings_new         (PanelApplet *applet,
                                                      const char  *schema);
 
-gchar             *panel_applet_get_preferences_key  (PanelApplet *applet);
-
-void               panel_applet_add_preferences      (PanelApplet  *applet,
-                                                     const gchar  *schema_dir,
-                                                     GError      **error);
-
 PanelAppletFlags   panel_applet_get_flags            (PanelApplet      *applet);
 void              panel_applet_set_flags            (PanelApplet      *applet,
                                                      PanelAppletFlags  flags);


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