From 7ae28ca59dbcf5fa4f7377a9740da6fbc05c0069 Mon Sep 17 00:00:00 2001 From: Seth Nickell Date: Wed, 5 Jun 2002 00:40:01 +0000 Subject: [PATCH] Get rid of "get" calls, since we should just rely on the GConf settings 2002-06-04 Seth Nickell * gnome-window-manager.c: (gnome_window_manager_new), (gnome_window_manager_class_init): * gnome-window-manager.h: Get rid of "get" calls, since we should just rely on the GConf settings being right. Otherwise you get ambiguous problems with merging settings, figuring out which takes predecedence, etc. --- libwindow-settings/ChangeLog | 10 ++++++++++ libwindow-settings/gnome-window-manager.c | 16 ++-------------- libwindow-settings/gnome-window-manager.h | 2 -- libwindow-settings/gnome-wm-manager.c | 2 -- 4 files changed, 12 insertions(+), 18 deletions(-) diff --git a/libwindow-settings/ChangeLog b/libwindow-settings/ChangeLog index e24bfe099..8c4a90955 100644 --- a/libwindow-settings/ChangeLog +++ b/libwindow-settings/ChangeLog @@ -1,3 +1,13 @@ +2002-06-04 Seth Nickell + + * gnome-window-manager.c: (gnome_window_manager_new), + (gnome_window_manager_class_init): + * gnome-window-manager.h: + + Get rid of "get" calls, since we should just rely on the GConf settings being right. + Otherwise you get ambiguous problems with merging settings, figuring out which + takes predecedence, etc. + 2002-06-04 Seth Nickell * gnome-window-manager.c: (gnome_window_manager_get_ditem): diff --git a/libwindow-settings/gnome-window-manager.c b/libwindow-settings/gnome-window-manager.c index 09421aac2..b53cbd645 100644 --- a/libwindow-settings/gnome-window-manager.c +++ b/libwindow-settings/gnome-window-manager.c @@ -30,7 +30,7 @@ gnome_window_manager_new (GnomeDesktopItem *item) return NULL; } - success = g_module_symbol (module, "metacity_window_manager_get_type", + success = g_module_symbol (module, "window_manager_new", (gpointer *) &wm_new_func); if ((!success) || wm_new_func == NULL) { @@ -38,7 +38,7 @@ gnome_window_manager_new (GnomeDesktopItem *item) return NULL; } - wm = g_object_new ((wm_new_func) (), NULL); + wm = (wm_new_func) (); (GNOME_WINDOW_MANAGER (wm))->p->window_manager_name = g_strdup (gnome_desktop_item_get_string (item, GNOME_DESKTOP_ITEM_NAME)); (GNOME_WINDOW_MANAGER (wm))->p->ditem = gnome_desktop_item_ref (item); @@ -79,13 +79,6 @@ gnome_window_manager_set_font (GnomeWindowManager *wm, const char *font) klass->set_font (font); } -gboolean -gnome_window_manager_get_focus_follows_mouse (GnomeWindowManager *wm) -{ - GnomeWindowManagerClass *klass = GNOME_WINDOW_MANAGER_GET_CLASS (wm); - return klass->get_focus_follows_mouse (); -} - void gnome_window_manager_set_focus_follows_mouse (GnomeWindowManager *wm, gboolean focus_follows_mouse) { @@ -129,7 +122,6 @@ gnome_window_manager_class_init (GnomeWindowManagerClass *class) wm_class->set_theme = NULL; wm_class->get_theme_list = NULL; wm_class->set_font = NULL; - wm_class->get_focus_follows_mouse = NULL; wm_class->set_focus_follows_mouse = NULL; parent_class = g_type_class_peek_parent (class); @@ -140,8 +132,6 @@ gnome_window_manager_get_type (void) { static GType gnome_window_manager_type = 0; - printf ("getting called...\n"); - if (!gnome_window_manager_type) { static GTypeInfo gnome_window_manager_info = { sizeof (GnomeWindowManagerClass), @@ -162,8 +152,6 @@ gnome_window_manager_get_type (void) &gnome_window_manager_info, 0); } - printf ("done\n"); - return gnome_window_manager_type; } diff --git a/libwindow-settings/gnome-window-manager.h b/libwindow-settings/gnome-window-manager.h index fca93ff05..8c78f6c4a 100644 --- a/libwindow-settings/gnome-window-manager.h +++ b/libwindow-settings/gnome-window-manager.h @@ -33,7 +33,6 @@ struct _GnomeWindowManagerClass void (*set_theme) (const char *theme_name); GList * (*get_theme_list) (void); void (*set_font) (const char *font); - gboolean (*get_focus_follows_mouse) (void); void (*set_focus_follows_mouse) (gboolean focus_follows_mouse); }; @@ -48,7 +47,6 @@ void gnome_window_manager_set_theme (GnomeWindowMana /* GList of char *'s */ GList * gnome_window_manager_get_theme_list (GnomeWindowManager *wm); void gnome_window_manager_set_font (GnomeWindowManager *wm, const char *font); -gboolean gnome_window_manager_get_focus_follows_mouse (GnomeWindowManager *wm); void gnome_window_manager_set_focus_follows_mouse (GnomeWindowManager *wm, gboolean focus_follows_mouse); G_END_DECLS diff --git a/libwindow-settings/gnome-wm-manager.c b/libwindow-settings/gnome-wm-manager.c index 3fe0d6060..e10ea859f 100644 --- a/libwindow-settings/gnome-wm-manager.c +++ b/libwindow-settings/gnome-wm-manager.c @@ -55,8 +55,6 @@ gnome_wm_manager_get_list (void) GList *wms = NULL; GnomeDesktopItem *ditem; - printf ("Total number of wms is %d\n", g_list_length (window_managers)); - for (wm_ditem = window_managers; wm_ditem != NULL; wm_ditem = wm_ditem->next) { ditem = ((WindowManager *)wm_ditem->data)->dentry; wms = g_list_prepend (wms, gnome_window_manager_new (ditem));