Use an empty string to pass the test in set_app_info.

2006-06-09  Emmanuele Bassi  <ebassi@cvs.gnome.org>

	* glib/gbookmarkfile.c (g_bookmark_file_remove_application): Use
	an empty string to pass the test in set_app_info.

	(g_bookmark_file_move_item): Remove the old item from the
	look up table; return success in case of empty target.
This commit is contained in:
Emmanuele Bassi
2006-06-09 18:09:22 +00:00
committed by Emmanuele Bassi
parent ded0ea6cd1
commit 99e40c9bfa
3 changed files with 25 additions and 5 deletions

View File

@@ -1,3 +1,11 @@
2006-06-09 Emmanuele Bassi <ebassi@cvs.gnome.org>
* glib/gbookmarkfile.c (g_bookmark_file_remove_application): Use
an empty string to pass the test in set_app_info.
(g_bookmark_file_move_item): Remove the old item from the
look up table; return success in case of empty target.
2006-06-08 Tor Lillqvist <tml@novell.com> 2006-06-08 Tor Lillqvist <tml@novell.com>
* glib/gunicollate.c (msc_strxfrm_wrapper): Workaround for bug in * glib/gunicollate.c (msc_strxfrm_wrapper): Workaround for bug in

View File

@@ -1,3 +1,11 @@
2006-06-09 Emmanuele Bassi <ebassi@cvs.gnome.org>
* glib/gbookmarkfile.c (g_bookmark_file_remove_application): Use
an empty string to pass the test in set_app_info.
(g_bookmark_file_move_item): Remove the old item from the
look up table; return success in case of empty target.
2006-06-08 Tor Lillqvist <tml@novell.com> 2006-06-08 Tor Lillqvist <tml@novell.com>
* glib/gunicollate.c (msc_strxfrm_wrapper): Workaround for bug in * glib/gunicollate.c (msc_strxfrm_wrapper): Workaround for bug in

View File

@@ -3084,7 +3084,7 @@ g_bookmark_file_remove_application (GBookmarkFile *bookmark,
set_error = NULL; set_error = NULL;
retval = g_bookmark_file_set_app_info (bookmark, uri, retval = g_bookmark_file_set_app_info (bookmark, uri,
name, name,
NULL, "",
0, 0,
(time_t) -1, (time_t) -1,
&set_error); &set_error);
@@ -3534,10 +3534,14 @@ g_bookmark_file_move_item (GBookmarkFile *bookmark,
} }
} }
g_hash_table_steal (bookmark->items_by_uri, item->uri);
g_free (item->uri); g_free (item->uri);
item->uri = g_strdup (new_uri); item->uri = g_strdup (new_uri);
item->modified = time (NULL); item->modified = time (NULL);
g_hash_table_replace (bookmark->items_by_uri, item->uri, item);
return TRUE; return TRUE;
} }
else else
@@ -3550,9 +3554,9 @@ g_bookmark_file_move_item (GBookmarkFile *bookmark,
return FALSE; return FALSE;
} }
}
return FALSE; return TRUE;
}
} }
/** /**