gnome-control-center r8724 - in trunk/capplets: appearance common
- From: jensg svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-control-center r8724 - in trunk/capplets: appearance common
- Date: Sat, 24 May 2008 17:19:26 +0000 (UTC)
Author: jensg
Date: Sat May 24 17:19:26 2008
New Revision: 8724
URL: http://svn.gnome.org/viewvc/gnome-control-center?rev=8724&view=rev
Log:
2008-05-24 Jens Granseuer <jensgr gmx net>
* gnome-theme-info.c: (gnome_theme_read_meta_theme),
(read_icon_theme), (read_cursor_theme), (read_cursor_fonts),
(update_theme_index): return to using paths instead of URIs since
most of the code using them expects paths
2008-05-24 Jens Granseuer <jensgr gmx net>
* theme-util.c: (theme_is_writable), (theme_delete): expect
a path instead of an URI in theme_info->path
Modified:
trunk/capplets/appearance/ChangeLog
trunk/capplets/appearance/theme-util.c
trunk/capplets/common/ChangeLog
trunk/capplets/common/gnome-theme-info.c
Modified: trunk/capplets/appearance/theme-util.c
==============================================================================
--- trunk/capplets/appearance/theme-util.c (original)
+++ trunk/capplets/appearance/theme-util.c Sat May 24 17:19:26 2008
@@ -100,7 +100,7 @@
if (info == NULL || info->path == NULL)
return FALSE;
- file = g_file_new_for_uri (info->path);
+ file = g_file_new_for_path (info->path);
file_info = g_file_query_info (file,
G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE,
G_FILE_QUERY_INFO_NONE,
@@ -168,7 +168,7 @@
return FALSE;
}
- dir = g_file_new_for_uri (theme_dir);
+ dir = g_file_new_for_path (theme_dir);
g_free (theme_dir);
if (!file_delete_recursive (dir, NULL)) {
Modified: trunk/capplets/common/gnome-theme-info.c
==============================================================================
--- trunk/capplets/common/gnome-theme-info.c (original)
+++ trunk/capplets/common/gnome-theme-info.c Sat May 24 17:19:26 2008
@@ -269,14 +269,14 @@
meta_theme_file = g_file_get_uri (meta_theme_uri);
meta_theme_ditem = gnome_desktop_item_new_from_uri (meta_theme_file, 0, NULL);
- if (meta_theme_ditem == NULL) {
- g_free (meta_theme_file);
+ g_free (meta_theme_file);
+
+ if (meta_theme_ditem == NULL)
return NULL;
- }
common_theme_dir_uri = g_file_get_parent (meta_theme_uri);
meta_theme_info = gnome_theme_meta_info_new ();
- meta_theme_info->path = meta_theme_file;
+ meta_theme_info->path = g_file_get_path (meta_theme_uri);
meta_theme_info->name = g_file_get_basename (common_theme_dir_uri);
g_object_unref (common_theme_dir_uri);
@@ -390,15 +390,14 @@
icon_theme_file = g_file_get_uri (icon_theme_uri);
icon_theme_ditem = gnome_desktop_item_new_from_uri (icon_theme_file, 0, NULL);
- if (icon_theme_ditem == NULL) {
- g_free (icon_theme_file);
+ g_free (icon_theme_file);
+
+ if (icon_theme_ditem == NULL)
return NULL;
- }
name = gnome_desktop_item_get_string (icon_theme_ditem, "Icon Theme/Name");
if (name == NULL) {
gnome_desktop_item_unref (icon_theme_ditem);
- g_free (icon_theme_file);
return NULL;
}
@@ -406,7 +405,6 @@
directories = gnome_desktop_item_get_string (icon_theme_ditem, "Icon Theme/Directories");
if (directories == NULL) {
gnome_desktop_item_unref (icon_theme_ditem);
- g_free (icon_theme_file);
return NULL;
}
@@ -416,13 +414,12 @@
gchar *dir_name;
icon_theme_info = gnome_theme_icon_info_new ();
icon_theme_info->readable_name = g_strdup (name);
- icon_theme_info->path = icon_theme_file;
- dir_name = g_path_get_dirname (icon_theme_file);
+ icon_theme_info->path = g_file_get_path (icon_theme_uri);
+ dir_name = g_path_get_dirname (icon_theme_info->path);
icon_theme_info->name = g_path_get_basename (dir_name);
g_free (dir_name);
} else {
icon_theme_info = NULL;
- g_free (icon_theme_file);
}
gnome_desktop_item_unref (icon_theme_ditem);
@@ -538,7 +535,7 @@
}
cursor_theme_info = gnome_theme_cursor_info_new ();
- cursor_theme_info->path = g_file_get_uri (parent_uri);
+ cursor_theme_info->path = g_file_get_path (parent_uri);
cursor_theme_info->name = name;
cursor_theme_info->sizes = sizes;
cursor_theme_info->thumbnail = thumbnail;
@@ -664,7 +661,7 @@
theme_info->thumbnail = gdk_pixbuf_new_from_file (filename, NULL);
g_free (filename);
- theme_info->path = g_build_filename ("file://" GNOMECC_DATA_DIR, builtins[i][0], NULL);
+ theme_info->path = g_build_filename (GNOMECC_DATA_DIR, builtins[i][0], NULL);
theme_info->name = g_strdup (theme_info->path);
if (!strcmp (theme_info->path, cursor_font))
@@ -759,7 +756,7 @@
/* Next, we see what currently exists */
parent = g_file_get_parent (index_uri);
common_theme_dir_uri = g_file_get_parent (parent);
- common_theme_dir = g_file_get_uri (common_theme_dir_uri);
+ common_theme_dir = g_file_get_path (common_theme_dir_uri);
theme_info = g_hash_table_lookup (theme_hash_by_uri, common_theme_dir);
if (theme_info == NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]