summaryrefslogtreecommitdiff
path: root/capplets/windows/gnome-window-properties.c
diff options
context:
space:
mode:
authorSeth Nickell <snickell@stanford.edu>2002-06-05 00:36:57 +0000
committerSeth Nickell <seth@src.gnome.org>2002-06-05 00:36:57 +0000
commit03f10ccb0ce7c7ef9b946d1d208d23b4479f88f3 (patch)
tree0fd699af571ab299c520c24943503ce45985119e /capplets/windows/gnome-window-properties.c
parent51f9aad29a0ed367f776bd54a06c22cbb711815d (diff)
downloadgnome-control-center-03f10ccb0ce7c7ef9b946d1d208d23b4479f88f3.tar.gz
Remove unused CFLAGS;
2002-06-04 Seth Nickell <snickell@stanford.edu> * Makefile.am: Remove unused CFLAGS; * gnome-window-properties.c: (wm_widget_add_wm), (setup_appearance_option_menu): Improve handling of option menus, set the default item. * metacity-window-manager.c: (metacity_set_theme), (add_themes_from_dir), (metacity_get_theme_list), (metacity_set_font), (metacity_set_focus_follows_mouse), (metacity_window_manager_class_init): Actually do things when the "set" calls are made, improve intelligence of loading the theme list. Eventually we should probably do validation on the XML files.
Diffstat (limited to 'capplets/windows/gnome-window-properties.c')
-rw-r--r--capplets/windows/gnome-window-properties.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/capplets/windows/gnome-window-properties.c b/capplets/windows/gnome-window-properties.c
index 782ab6e3c..dd68f5529 100644
--- a/capplets/windows/gnome-window-properties.c
+++ b/capplets/windows/gnome-window-properties.c
@@ -116,11 +116,11 @@ wm_widget_add_wm (GnomeWindowManager *wm)
gtk_widget_show_all (menu_item);
gtk_menu_shell_prepend (GTK_MENU_SHELL (wm_menu), menu_item);
- wm_menu_window_managers = g_list_prepend (wm_menu_window_managers, wm);
+ wm_menu_window_managers = g_list_append (wm_menu_window_managers, wm);
/* If this is supposed to be the selected window manager, do so */
if (gnome_wm_manager_same_wm (wm, selected_wm))
- gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu), 0);
+ gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu), g_list_length (wm_menu_window_managers) - 1);
}
static void
@@ -192,7 +192,9 @@ setup_appearance_option_menu (GtkWidget *appearance_option_menu, GnomeWindowMana
{
GtkWidget *menu, *menu_item;
GList *themes, *node;
- char *theme_name;
+ const char *theme_name;
+ char *current_theme_name;
+ int index = 0;
menu = gtk_menu_new ();
gtk_widget_show_all (menu);
@@ -200,6 +202,8 @@ setup_appearance_option_menu (GtkWidget *appearance_option_menu, GnomeWindowMana
themes = gnome_window_manager_get_theme_list (wm);
+ current_theme_name = gconf_client_get_string (gconf_client, THEME_KEY, NULL);
+
for (node = themes; node != NULL; node = node->next) {
theme_name = (char *)node->data;
@@ -207,8 +211,15 @@ setup_appearance_option_menu (GtkWidget *appearance_option_menu, GnomeWindowMana
gtk_widget_show_all (menu_item);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
+
+ if (strcmp (theme_name, current_theme_name) == 0)
+ gtk_option_menu_set_history (GTK_OPTION_MENU (appearance_option_menu), index);
+
+ index++;
}
+ g_free (current_theme_name);
+
theme_list = themes;
}