diff --git a/capplets/common/ChangeLog b/capplets/common/ChangeLog index a6da1cae7..d1f456011 100644 --- a/capplets/common/ChangeLog +++ b/capplets/common/ChangeLog @@ -1,3 +1,8 @@ +Tue May 14 12:08:17 2002 Jonathan Blandford + + * theme-common.c (theme_common_init): confirm that the ~/.themes/ + directory exists. + 2002-04-29 Rachel Hestilow * file-transfer-dialog.c (file_transfer_dialog_update_cb): diff --git a/capplets/common/theme-common.c b/capplets/common/theme-common.c index f21efff1d..76481e352 100644 --- a/capplets/common/theme-common.c +++ b/capplets/common/theme-common.c @@ -175,12 +175,21 @@ theme_common_init (void) { static gboolean initted = FALSE; gchar *dir; + GnomeVFSURI *uri; if (initted) return; initted = TRUE; dir = g_build_filename (g_get_home_dir (), ".themes", NULL); + + /* Make sure it exists */ + uri = gnome_vfs_uri_new (dir); + if (!gnome_vfs_uri_exists (uri)) + gnome_vfs_make_directory_for_uri (uri, 0775); + + gnome_vfs_uri_unref (uri); + themes_common_list_add_dir (dir); g_free (dir); diff --git a/capplets/mouse/gnome-mouse-properties.c b/capplets/mouse/gnome-mouse-properties.c index 37fd93086..ef09963be 100644 --- a/capplets/mouse/gnome-mouse-properties.c +++ b/capplets/mouse/gnome-mouse-properties.c @@ -377,7 +377,7 @@ read_cursor_font (void) gchar *dir_name; struct dirent *file_dirent; - dir_name = g_build_path (G_DIR_SEPARATOR_S, g_get_home_dir (), ".gnome/share/cursor-fonts", NULL); + dir_name = g_build_path (G_DIR_SEPARATOR_S, g_get_home_dir (), ".gnome2/share/cursor-fonts", NULL); if (! g_file_test (dir_name, G_FILE_TEST_EXISTS)) return NULL; diff --git a/capplets/theme-switcher/ChangeLog b/capplets/theme-switcher/ChangeLog index f6624309f..0c87c5aa0 100644 --- a/capplets/theme-switcher/ChangeLog +++ b/capplets/theme-switcher/ChangeLog @@ -1,3 +1,10 @@ +Tue May 14 12:29:35 2002 Jonathan Blandford + + * theme-switcher.c (read_themes): try to scroll to theme. + Currently appears to be a little broken somewhere. + + * theme-properties.glade: clean up, and add an atk relation, #76416 + 2002-05-10 Anders Carlsson * theme-properties.glade: diff --git a/capplets/theme-switcher/theme-properties.glade b/capplets/theme-switcher/theme-properties.glade index 9ab2f1872..0670048e6 100644 --- a/capplets/theme-switcher/theme-properties.glade +++ b/capplets/theme-switcher/theme-properties.glade @@ -6,7 +6,7 @@ True - Theme Properties + Gtk+ Theme Preferences GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False @@ -104,6 +104,9 @@ False False True + + List of available GTK+ themes + diff --git a/capplets/theme-switcher/theme-switcher.c b/capplets/theme-switcher/theme-switcher.c index 214340770..432b7eaf8 100644 --- a/capplets/theme-switcher/theme-switcher.c +++ b/capplets/theme-switcher/theme-switcher.c @@ -103,14 +103,17 @@ read_themes (GladeXML *dialog) GList *gtk_theme_list; GList *list; GtkTreeModel *model; + GtkTreeView *tree_view; gchar *current_theme; gint i = 0; gboolean current_theme_found = FALSE; + GtkTreeRowReference *row_ref = NULL; client = gconf_client_get_default (); gtk_theme_list = theme_common_get_list (); - model = gtk_tree_view_get_model (GTK_TREE_VIEW (WID ("theme_treeview"))); + tree_view = GTK_TREE_VIEW (WID ("theme_treeview")); + model = gtk_tree_view_get_model (tree_view); setting_model = TRUE; gtk_list_store_clear (GTK_LIST_STORE (model)); @@ -137,15 +140,21 @@ read_themes (GladeXML *dialog) if (strcmp (current_theme, info->name) == 0) { - GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (WID ("theme_treeview"))); + GtkTreeSelection *selection; + GtkTreePath *path; + + selection = gtk_tree_view_get_selection (tree_view); gtk_tree_selection_select_iter (selection, &iter); + path = gtk_tree_model_get_path (model, &iter); + row_ref = gtk_tree_row_reference_new (model, path); + gtk_tree_path_free (path); current_theme_found = TRUE; } if (i == MAX_ELEMENTS_BEFORE_SCROLLING) { GtkRequisition rectangle; - gtk_widget_size_request (WID ("theme_treeview"), &rectangle); + gtk_widget_size_request (GTK_WIDGET (tree_view), &rectangle); gtk_widget_set_usize (WID ("theme_swindow"), -1, rectangle.height); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (WID ("theme_swindow")), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); @@ -155,14 +164,29 @@ read_themes (GladeXML *dialog) if (! current_theme_found) { - GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (WID ("theme_treeview"))); + GtkTreeSelection *selection = gtk_tree_view_get_selection (tree_view); GtkTreeIter iter; + GtkTreePath *path; gtk_list_store_prepend (GTK_LIST_STORE (model), &iter); gtk_list_store_set (GTK_LIST_STORE (model), &iter, THEME_NAME_COLUMN, current_theme, -1); gtk_tree_selection_select_iter (selection, &iter); + path = gtk_tree_model_get_path (model, &iter); + row_ref = gtk_tree_row_reference_new (model, path); + gtk_tree_path_free (path); + } + + + if (row_ref) + { + GtkTreePath *path; + + path = gtk_tree_row_reference_get_path (row_ref); + gtk_tree_view_scroll_to_cell (tree_view, path, NULL, TRUE, 0.5, 0.0); + gtk_tree_path_free (path); + gtk_tree_row_reference_free (row_ref); } setting_model = FALSE; @@ -276,7 +300,7 @@ show_manage_themes (GtkWidget *button, gpointer data) if (!gnome_vfs_uri_exists (uri)) { /* Create the directory */ - gnome_vfs_make_directory_for_uri (uri, 775); + gnome_vfs_make_directory_for_uri (uri, 0775); } gnome_vfs_uri_unref (uri); diff --git a/capplets/ui-properties/gnome-ui-properties.glade b/capplets/ui-properties/gnome-ui-properties.glade index 0ce7886d2..324e9373c 100644 --- a/capplets/ui-properties/gnome-ui-properties.glade +++ b/capplets/ui-properties/gnome-ui-properties.glade @@ -4,10 +4,11 @@ - Toolbar and Menu Properties + Toolbar and Menu Preferences GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False + 400 True False True @@ -37,6 +38,7 @@ -11 + True @@ -73,10 +75,10 @@ - 4 + 8 True False - 4 + 8 @@ -191,7 +193,7 @@ True 0 0.5 - GTK_SHADOW_ETCHED_IN + GTK_SHADOW_NONE A preview of what a toolbar looks like with these settings. @@ -308,10 +310,10 @@ - 4 + 8 True False - 4 + 8 @@ -336,7 +338,7 @@ True 0 0.5 - GTK_SHADOW_ETCHED_IN + GTK_SHADOW_NONE A preview of what a menubar looks like with these settings.