Implement saving of the cursor theme name in metathemes, and add a
2007-07-25 Denis Washington <denisw@svn.gnome.org> * appearance-style.c: (prepare_list): * appearance-themes.c: (theme_load_from_gconf): * theme-save.c: (write_theme_to_disk): Implement saving of the cursor theme name in metathemes, and add a "Default Pointer" option to the cursor theme list in Theme Details. svn path=/trunk/; revision=7885
This commit is contained in:
parent
2126b49c6e
commit
016dabda52
4 changed files with 35 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
|||
2007-07-25 Denis Washington <denisw@svn.gnome.org>
|
||||
|
||||
* appearance-style.c: (prepare_list):
|
||||
* appearance-themes.c: (theme_load_from_gconf):
|
||||
* theme-save.c: (write_theme_to_disk):
|
||||
Implement saving of the cursor theme name in metathemes, and add a
|
||||
"Default Pointer" option to the cursor theme list in Theme Details.
|
||||
|
||||
2007-07-24 Jens Granseuer <jensgr@gmx.net>
|
||||
|
||||
* appearance-themes.c: (theme_load_from_gconf): when reading current
|
||||
|
|
|
@ -803,6 +803,15 @@ prepare_list (AppearanceData *data, GtkWidget *list, ThemeType type, GCallback c
|
|||
}
|
||||
g_list_free (themes);
|
||||
|
||||
if (type == THEME_TYPE_CURSOR) {
|
||||
GtkTreeIter i;
|
||||
gtk_list_store_insert_with_values (store, &i, 0,
|
||||
COL_LABEL, _("Default Pointer"),
|
||||
COL_NAME, "default",
|
||||
COL_THUMBNAIL, NULL,
|
||||
-1);
|
||||
}
|
||||
|
||||
sort_model = gtk_tree_model_sort_new_with_model (GTK_TREE_MODEL (store));
|
||||
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sort_model),
|
||||
COL_LABEL, GTK_SORT_ASCENDING);
|
||||
|
|
|
@ -137,6 +137,11 @@ theme_load_from_gconf (GConfClient *client, GnomeThemeMetaInfo *theme)
|
|||
|
||||
g_free (theme->icon_theme_name);
|
||||
theme->icon_theme_name = gconf_client_get_string (client, ICON_THEME_KEY, NULL);
|
||||
|
||||
g_free (theme->cursor_theme_name);
|
||||
theme->cursor_theme_name = gconf_client_get_string (client, CURSOR_THEME_KEY, NULL);
|
||||
|
||||
theme->cursor_size = gconf_client_get_int (client, CURSOR_SIZE_KEY, NULL);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
@ -223,6 +228,10 @@ theme_is_equal (const GnomeThemeMetaInfo *a, const GnomeThemeMetaInfo *b)
|
|||
strcmp (a->metacity_theme_name, b->metacity_theme_name))
|
||||
return FALSE;
|
||||
|
||||
if (!(a->cursor_theme_name && b->cursor_theme_name) ||
|
||||
strcmp (a->cursor_theme_name, b->cursor_theme_name))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -230,6 +230,15 @@ write_theme_to_disk (GnomeThemeMetaInfo *theme_info,
|
|||
g_free (tmp);
|
||||
}
|
||||
|
||||
if (theme_info->cursor_theme_name) {
|
||||
str = g_strdup_printf ("CursorTheme=%s\n"
|
||||
"CursorSize=%i\n",
|
||||
theme_info->cursor_theme_name,
|
||||
theme_info->cursor_size);
|
||||
gnome_vfs_write (handle, str, strlen (str), &bytes_written);
|
||||
g_free (str);
|
||||
}
|
||||
|
||||
if (save_background) {
|
||||
client = gconf_client_get_default ();
|
||||
current_background = gconf_client_get_string (client, BACKGROUND_KEY, NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue