[ekiga] Removed an unused part of the gmconf api



commit 71564247a502290fd5c6ba36000e0496a49cf822
Author: Julien Puydt <jpuydt gnome org>
Date:   Sun Aug 8 18:12:28 2010 +0200

    Removed an unused part of the gmconf api
    
    And this time, I remembered to push the code from watch/unwatch to init/shutdown so Eugen shouldn't have to revert...

 lib/gmconf/gmconf-gconf.c |   17 +++--------------
 lib/gmconf/gmconf-glib.c  |   31 -------------------------------
 lib/gmconf/gmconf.h       |    6 ------
 src/gui/main_window.cpp   |    3 ---
 4 files changed, 3 insertions(+), 54 deletions(-)
---
diff --git a/lib/gmconf/gmconf-gconf.c b/lib/gmconf/gmconf-gconf.c
index bd6b262..8b806f2 100644
--- a/lib/gmconf/gmconf-gconf.c
+++ b/lib/gmconf/gmconf-gconf.c
@@ -228,12 +228,15 @@ gm_conf_init ()
 {
   client = gconf_client_get_default ();
   gconf_client_set_error_handling (client, GCONF_CLIENT_HANDLE_UNRETURNED);
+  gconf_client_add_dir (client, "/apps/" PACKAGE_NAME,
+			GCONF_CLIENT_PRELOAD_NONE, NULL);
 }
 
 
 void
 gm_conf_shutdown ()
 {
+  gconf_client_remove_dir (client, "/apps/" PACKAGE_NAME, NULL);
   g_object_unref (client);
 }
 
@@ -392,17 +395,3 @@ gm_conf_notifier_trigger (const gchar *namespac)
 
   gconf_client_notify (client, namespac);
 }
-
-void
-gm_conf_watch ()
-{
-  gconf_client_add_dir (client, "/apps/" PACKAGE_NAME,
-			GCONF_CLIENT_PRELOAD_NONE, NULL);
-}
-
-
-void
-gm_conf_unwatch ()
-{
-  gconf_client_remove_dir (client, "/apps/" PACKAGE_NAME, NULL);
-}
diff --git a/lib/gmconf/gmconf-glib.c b/lib/gmconf/gmconf-glib.c
index b5682af..249a71a 100644
--- a/lib/gmconf/gmconf-glib.c
+++ b/lib/gmconf/gmconf-glib.c
@@ -97,7 +97,6 @@
  */
 typedef struct _DataBase
 {
-  gboolean is_watched;
   GData *entries;
 } DataBase;
 
@@ -255,7 +254,6 @@ static GmConfEntry *database_get_entry_for_key (DataBase *, const gchar *);
 static GmConfEntry *database_get_entry_for_key_create (DataBase *,
 						       const gchar *);
 
-static void database_set_watched (DataBase *, const gboolean);
 static void database_notify_on_namespace (DataBase *, const gchar *);
 
 /*
@@ -715,7 +713,6 @@ database_new ()
   DataBase *db = NULL;
 
   db = g_new (DataBase, 1);
-  db->is_watched = FALSE;
   db->entries = NULL;
   g_datalist_init (&db->entries);
   return db;
@@ -1045,15 +1042,6 @@ database_get_entry_for_key_create (DataBase *db,
 }
 
 static void
-database_set_watched (DataBase *db,
-		      const gboolean bool)
-{
-  g_return_if_fail (db != NULL);
-
-  db->is_watched = bool;
-}
-
-static void
 database_notify_on_namespace (DataBase *db,
 			      const gchar *namespac)
 {
@@ -1069,9 +1057,6 @@ database_notify_on_namespace (DataBase *db,
 
   g_return_if_fail (entry != NULL);
 
-  if (db->is_watched == FALSE)
-    return;
-
   for (key = g_strdup (namespac);
        key[0] != 0;
        g_strrstr (key, "/")[0] = 0) {
@@ -1199,22 +1184,6 @@ gm_conf_save ()
   g_free (user_conf);
 }
 
-void
-gm_conf_watch ()
-{
-  DataBase *db = database_get_default ();
-
-  database_set_watched (db, TRUE);
-}
-
-void
-gm_conf_unwatch ()
-{
-  DataBase *db = database_get_default ();
-
-  database_set_watched (db, FALSE);
-}
-
 gpointer
 gm_conf_notifier_add (const gchar *namespac,
 		      GmConfNotifier func,
diff --git a/lib/gmconf/gmconf.h b/lib/gmconf/gmconf.h
index 79a9ffd..1077c1c 100644
--- a/lib/gmconf/gmconf.h
+++ b/lib/gmconf/gmconf.h
@@ -80,12 +80,6 @@ void gm_conf_init (); /* don't try anything before! */
 void gm_conf_shutdown (); /* don't try anything after! */
 void gm_conf_save (); /* to forcibly save */
 
-/* to accept/refuse that the notifiers get fired:
- * the configuration is still readable/writable, but
- * the changes aren't propagated to the gui */
-void gm_conf_watch ();
-void gm_conf_unwatch ();
-
 /* to set/unset notifiers */
 /* sets a notifier on namespac, calling func, with user_data*/
 gpointer gm_conf_notifier_add (const gchar *namespac, 
diff --git a/src/gui/main_window.cpp b/src/gui/main_window.cpp
index 470db81..5304805 100644
--- a/src/gui/main_window.cpp
+++ b/src/gui/main_window.cpp
@@ -4477,9 +4477,6 @@ main (int argc,
   }
 #endif
 
-  /* Init gm_conf */
-  gm_conf_watch ();
-
   Ekiga::Runtime::init ();
   engine_init (service_core, argc, argv);
 



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