[gnome-panel] panel: Drop panel-profile.[ch] and remove dead code in panel-gconf.[ch]



commit 5da6a2695edaf25cfb6645d54e5c2e4bc6cf9ec4
Author: Vincent Untz <vuntz gnome org>
Date:   Fri Mar 25 23:04:02 2011 +0100

    panel: Drop panel-profile.[ch] and remove dead code in panel-gconf.[ch]

 gnome-panel/Makefile.am           |    2 -
 gnome-panel/applet.c              |    1 -
 gnome-panel/main.c                |    3 -
 gnome-panel/menu.c                |    1 -
 gnome-panel/panel-addto.c         |    1 -
 gnome-panel/panel-applet-frame.c  |    1 -
 gnome-panel/panel-bindings.c      |    2 +-
 gnome-panel/panel-compatibility.c |    1 -
 gnome-panel/panel-compatibility.h |    3 +-
 gnome-panel/panel-context-menu.c  |    1 -
 gnome-panel/panel-enums.h         |    6 -
 gnome-panel/panel-gconf.c         |  123 --------------------
 gnome-panel/panel-gconf.h         |   22 +----
 gnome-panel/panel-layout.h        |    3 +
 gnome-panel/panel-profile.c       |  225 -------------------------------------
 gnome-panel/panel-profile.h       |  159 --------------------------
 gnome-panel/panel-shell.c         |    3 +-
 gnome-panel/panel-toplevel.c      |    1 -
 gnome-panel/panel-widget.c        |    1 -
 gnome-panel/panel.c               |    1 -
 20 files changed, 8 insertions(+), 552 deletions(-)
---
diff --git a/gnome-panel/Makefile.am b/gnome-panel/Makefile.am
index 7672946..eed9ec4 100644
--- a/gnome-panel/Makefile.am
+++ b/gnome-panel/Makefile.am
@@ -60,7 +60,6 @@ panel_sources =			\
 	panel-multiscreen.c	\
 	panel-a11y.c		\
 	panel-bindings.c	\
-	panel-profile.c		\
 	panel-force-quit.c	\
 	panel-lockdown.c	\
 	panel-addto.c		\
@@ -107,7 +106,6 @@ panel_headers =			\
 	panel-multiscreen.h	\
 	panel-a11y.h		\
 	panel-bindings.h	\
-	panel-profile.h		\
 	panel-enums.h		\
 	panel-enums-gsettings.h	\
 	panel-force-quit.h	\
diff --git a/gnome-panel/applet.c b/gnome-panel/applet.c
index 956d8f3..ab5e34b 100644
--- a/gnome-panel/applet.c
+++ b/gnome-panel/applet.c
@@ -28,7 +28,6 @@
 #include "panel-separator.h"
 #include "panel-toplevel.h"
 #include "panel-util.h"
-#include "panel-profile.h"
 #include "panel-menu-button.h"
 #include "panel-globals.h"
 #include "panel-properties-dialog.h"
diff --git a/gnome-panel/main.c b/gnome-panel/main.c
index d4b502a..74b4e8d 100644
--- a/gnome-panel/main.c
+++ b/gnome-panel/main.c
@@ -20,7 +20,6 @@
 #include <libpanel-util/panel-cleanup.h>
 #include <libpanel-util/panel-glib.h>
 
-#include "panel-profile.h"
 #include "panel-shell.h"
 #include "panel-multiscreen.h"
 #include "panel-session.h"
@@ -98,8 +97,6 @@ main (int argc, char **argv)
 	panel_multiscreen_init ();
 	panel_init_stock_icons_and_items ();
 
-	panel_profile_load ();
-
 	if (!panel_layout_load ()) {
 		panel_cleanup_do ();
 		return 1;
diff --git a/gnome-panel/menu.c b/gnome-panel/menu.c
index 51c68d2..14ae289 100644
--- a/gnome-panel/menu.c
+++ b/gnome-panel/menu.c
@@ -39,7 +39,6 @@
 #include "panel.h"
 #include "panel-stock-icons.h"
 #include "panel-action-button.h"
-#include "panel-profile.h"
 #include "panel-menu-button.h"
 #include "panel-menu-items.h"
 #include "panel-globals.h"
diff --git a/gnome-panel/panel-addto.c b/gnome-panel/panel-addto.c
index c0f40ca..9c96cbc 100644
--- a/gnome-panel/panel-addto.c
+++ b/gnome-panel/panel-addto.c
@@ -45,7 +45,6 @@
 #include "panel-layout.h"
 #include "panel-lockdown.h"
 #include "panel-util.h"
-#include "panel-profile.h"
 #include "panel-addto.h"
 #include "panel-icon-names.h"
 
diff --git a/gnome-panel/panel-applet-frame.c b/gnome-panel/panel-applet-frame.c
index dd3d280..ed7023a 100644
--- a/gnome-panel/panel-applet-frame.c
+++ b/gnome-panel/panel-applet-frame.c
@@ -35,7 +35,6 @@
 
 #include "panel-applets-manager.h"
 #include "panel-bindings.h"
-#include "panel-profile.h"
 #include "panel.h"
 #include "applet.h"
 #include "panel-marshal.h"
diff --git a/gnome-panel/panel-bindings.c b/gnome-panel/panel-bindings.c
index 71b28f9..e9f1030 100644
--- a/gnome-panel/panel-bindings.c
+++ b/gnome-panel/panel-bindings.c
@@ -30,7 +30,7 @@
 #include <glib/gi18n.h>
 
 #include "panel-gconf.h"
-#include "panel-profile.h"
+#include "panel-toplevel.h"
 #include "panel-xutils.h"
 
 #define BINDINGS_PREFIX    "/apps/metacity/window_keybindings"
diff --git a/gnome-panel/panel-compatibility.c b/gnome-panel/panel-compatibility.c
index fd75795..483dd7d 100644
--- a/gnome-panel/panel-compatibility.c
+++ b/gnome-panel/panel-compatibility.c
@@ -26,7 +26,6 @@
 #include <libpanel-util/panel-glib.h>
 
 #include "panel-applets-manager.h"
-#include "panel-profile.h"
 #include "panel-schemas.h"
 
 #include "panel-compatibility.h"
diff --git a/gnome-panel/panel-compatibility.h b/gnome-panel/panel-compatibility.h
index ab46234..76de2c5 100644
--- a/gnome-panel/panel-compatibility.h
+++ b/gnome-panel/panel-compatibility.h
@@ -25,8 +25,7 @@
 #ifndef __PANEL_COMPATIBILITY_H__
 #define __PANEL_COMPATIBILITY_H__
 
-#include <glib.h>
-#include <gconf/gconf-client.h>
+#include <gio/gio.h>
 
 G_BEGIN_DECLS
 
diff --git a/gnome-panel/panel-context-menu.c b/gnome-panel/panel-context-menu.c
index 6cee28c..db4d7de 100644
--- a/gnome-panel/panel-context-menu.c
+++ b/gnome-panel/panel-context-menu.c
@@ -41,7 +41,6 @@
 #include "panel-util.h"
 #include "panel.h"
 #include "menu.h"
-#include "panel-profile.h"
 #include "panel-properties-dialog.h"
 #include "panel-layout.h"
 #include "panel-lockdown.h"
diff --git a/gnome-panel/panel-enums.h b/gnome-panel/panel-enums.h
index 6132e0d..419d2c9 100644
--- a/gnome-panel/panel-enums.h
+++ b/gnome-panel/panel-enums.h
@@ -51,12 +51,6 @@ typedef enum {
 } PanelState;
 
 typedef enum {
-	PANEL_GCONF_TOPLEVELS,
-	PANEL_GCONF_OBJECTS,
-	PANEL_GCONF_APPLETS
-} PanelGConfKeyType;
-
-typedef enum {
 	PANEL_OBJECT_MENU,
 	PANEL_OBJECT_LAUNCHER,
 	PANEL_OBJECT_APPLET,
diff --git a/gnome-panel/panel-gconf.c b/gnome-panel/panel-gconf.c
index bc76cbf..f41fc96 100644
--- a/gnome-panel/panel-gconf.c
+++ b/gnome-panel/panel-gconf.c
@@ -101,74 +101,6 @@ panel_gconf_sprintf (const char *format,
 	return buffer;
 }
 
-const char *
-panel_gconf_key_type_to_id_list (PanelGConfKeyType type)
-{
-	char *retval;
-
-	switch (type) {
-	case PANEL_GCONF_TOPLEVELS:
-		retval = "toplevel_id_list";
-		break;
-	case PANEL_GCONF_APPLETS:
-		retval = "applet_id_list";
-		break;
-	case PANEL_GCONF_OBJECTS:
-		retval = "object_id_list";
-		break;
-	default:
-		retval = NULL;
-		g_assert_not_reached ();
-		break;
-	}
-
-	return retval;
-}
-
-const char *
-panel_gconf_general_key (const char *key)
-{
-	return panel_gconf_sprintf (PANEL_CONFIG_DIR "/general/%s", key);
-}
-
-const char *
-panel_gconf_full_key (PanelGConfKeyType  type,
-		      const char        *id,
-		      const char        *key)
-{
-	char *subdir = NULL;
-
-	switch (type) {
-	case PANEL_GCONF_TOPLEVELS:
-		subdir = "toplevels";
-		break;
-	case PANEL_GCONF_OBJECTS:
-		subdir = "objects";
-		break;
-	case PANEL_GCONF_APPLETS:
-		subdir = "applets";
-		break;
-	default:
-		g_assert_not_reached ();
-		break;
-	}
-
-	return panel_gconf_sprintf (PANEL_CONFIG_DIR "/%s/%s/%s",
-				    subdir, id, key);
-}
-
-const char *
-panel_gconf_basename (const char *key)
-{
-	char *retval;
-
-	g_return_val_if_fail (key != NULL, NULL);
-
-	retval = strrchr (key, '/');
-
-	return retval ? retval + 1 : NULL;
-}
-
 static void
 panel_notify_object_dead (guint notify_id)
 {
@@ -201,58 +133,3 @@ panel_gconf_notify_add_while_alive (const char            *key,
 
 	return notify_id;
 }
-
-void
-panel_gconf_associate_schemas_in_dir (GConfClient  *client,
-				      const char   *profile_dir,
-				      const char   *schema_dir)
-{
-	GSList *list, *l;
-
-#ifdef PANEL_GCONF_DEBUG
-	g_print ("associating schemas in %s to %s\n", schema_dir, profile_dir);
-#endif
-
-	list = gconf_client_all_entries (client, schema_dir, NULL);
-	for (l = list; l; l = l->next) {
-		GConfEntry *entry = l->data;
-		const char *key;
-		char       *tmp;
-
-		tmp = g_path_get_basename (gconf_entry_get_key (entry));
-
-		key = panel_gconf_sprintf ("%s/%s", profile_dir, tmp);
-
-		g_free (tmp);
-
-		gconf_engine_associate_schema (
-			client->engine, key, gconf_entry_get_key (entry), NULL);
-
-		gconf_entry_unref (entry);
-	}
-
-	g_slist_free (list);
-
-	list = gconf_client_all_dirs (client, schema_dir, NULL);
-	for (l = list; l; l = l->next) {
-		char *subdir = l->data;
-		char *prefs_subdir;
-		char *schema_subdir;
-		char *tmp;
-
-		tmp = g_path_get_basename (subdir);
-
-		prefs_subdir  = g_strdup_printf ("%s/%s", profile_dir, tmp);
-		schema_subdir = g_strdup_printf ("%s/%s", schema_dir, tmp);
-
-		panel_gconf_associate_schemas_in_dir (
-			client, prefs_subdir, schema_subdir);
-
-		g_free (prefs_subdir);
-		g_free (schema_subdir);
-		g_free (subdir);
-		g_free (tmp);
-	}
-
-	g_slist_free (list);
-}
diff --git a/gnome-panel/panel-gconf.h b/gnome-panel/panel-gconf.h
index b159710..587aaf3 100644
--- a/gnome-panel/panel-gconf.h
+++ b/gnome-panel/panel-gconf.h
@@ -28,36 +28,16 @@
 
 #include <gconf/gconf-client.h>
 
-#include "panel-enums.h"
-
-#define PANEL_CONFIG_DIR     "/apps/panel"
-#define PANEL_SCHEMAS_DIR    "/schemas/apps/panel"
-#define PANEL_DEFAULTS_DIR   "/apps/panel/default_setup"
-#define PANEL_OLD_CONFIG_DIR "/apps/panel/profiles/default"
-
 G_BEGIN_DECLS
 
 GConfClient *panel_gconf_get_client          (void);
 
 const char  *panel_gconf_sprintf             (const char        *format, ...) G_GNUC_PRINTF (1, 2);
-const char  *panel_gconf_basename            (const char        *key);
-const char  *panel_gconf_general_key         (const char        *key);
-const char  *panel_gconf_full_key            (PanelGConfKeyType  type,
-					      const char        *id,
-					      const char        *key);
-const char  *panel_gconf_key_type_to_id_list (PanelGConfKeyType  type);
-
-guint		panel_gconf_notify_add             (const char            *key,
-						    GConfClientNotifyFunc  notify_func,
-						    gpointer               user_data);
+
 guint		panel_gconf_notify_add_while_alive (const char            *key,
 						    GConfClientNotifyFunc  notify_func,
 						    GObject               *alive_object);
 
-void            panel_gconf_associate_schemas_in_dir       (GConfClient *client,
-							    const char  *profile_dir,
-							    const char  *schema_dir);
-
 G_END_DECLS
 
 #endif /* __PANEL_GCONF_H__ */
diff --git a/gnome-panel/panel-layout.h b/gnome-panel/panel-layout.h
index 29c3eb8..a4bc090 100644
--- a/gnome-panel/panel-layout.h
+++ b/gnome-panel/panel-layout.h
@@ -26,6 +26,9 @@
 #define __PANEL_LAYOUT_H__
 
 #include <glib.h>
+#include <gdk/gdk.h>
+
+#include "panel-enums.h"
 
 G_BEGIN_DECLS
 
diff --git a/gnome-panel/panel-shell.c b/gnome-panel/panel-shell.c
index bc0823e..145d7d3 100644
--- a/gnome-panel/panel-shell.c
+++ b/gnome-panel/panel-shell.c
@@ -29,11 +29,12 @@
 
 #include <config.h>
 #include <glib/gi18n.h>
+#include <gio/gio.h>
 
 #include <libpanel-util/panel-cleanup.h>
 
-#include "panel-profile.h"
 #include "panel-session.h"
+#include "panel-toplevel.h"
 
 #include "panel-shell.h"
 
diff --git a/gnome-panel/panel-toplevel.c b/gnome-panel/panel-toplevel.c
index f8a051f..7f85c8f 100644
--- a/gnome-panel/panel-toplevel.c
+++ b/gnome-panel/panel-toplevel.c
@@ -37,7 +37,6 @@
 
 #include <libpanel-util/panel-glib.h>
 
-#include "panel-profile.h"
 #include "panel-frame.h"
 #include "panel-xutils.h"
 #include "panel-multiscreen.h"
diff --git a/gnome-panel/panel-widget.c b/gnome-panel/panel-widget.c
index 99d8760..9a0eccd 100644
--- a/gnome-panel/panel-widget.c
+++ b/gnome-panel/panel-widget.c
@@ -25,7 +25,6 @@
 #include "panel-typebuiltins.h"
 #include "panel-applet-frame.h"
 #include "panel-globals.h"
-#include "panel-profile.h"
 #include "panel-lockdown.h"
 
 #define MOVE_INCREMENT 1
diff --git a/gnome-panel/panel.c b/gnome-panel/panel.c
index 42f80ae..164e019 100644
--- a/gnome-panel/panel.c
+++ b/gnome-panel/panel.c
@@ -31,7 +31,6 @@
 #include "panel-context-menu.h"
 #include "panel-util.h"
 #include "panel-gconf.h"
-#include "panel-profile.h"
 #include "panel-applet-frame.h"
 #include "panel-action-button.h"
 #include "panel-menu-bar.h"



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