svnno****@sourc*****
svnno****@sourc*****
Thu Feb 12 14:05:30 JST 2009
Revision: 3638 http://svn.sourceforge.jp/view?root=kazehakase&view=rev&rev=3638 Author: ikezoe Date: 2009-02-12 14:05:30 +0900 (Thu, 12 Feb 2009) Log Message: ----------- * src/bookmarks/kz-proxy-folder.c: Use kz_bookmark_folder_get_child_index. Modified Paths: -------------- kazehakase/trunk/ChangeLog kazehakase/trunk/src/bookmarks/kz-proxy-folder.c Modified: kazehakase/trunk/ChangeLog =================================================================== --- kazehakase/trunk/ChangeLog 2009-02-12 04:58:57 UTC (rev 3637) +++ kazehakase/trunk/ChangeLog 2009-02-12 05:05:30 UTC (rev 3638) @@ -14,6 +14,8 @@ kz_bookmark_folder_get_nth_child and kz_bookmark_folder_foreach_child. * src/bookmarks/kz-bookmark-folder.[ch]: Added kz_bookmark_folder_get_child_index. + * src/bookmarks/kz-proxy-folder.c: Use + kz_bookmark_folder_get_child_index. 2009-02-11 Hiroyuki Ikezoe <poinc****@ikezo*****> Modified: kazehakase/trunk/src/bookmarks/kz-proxy-folder.c =================================================================== --- kazehakase/trunk/src/bookmarks/kz-proxy-folder.c 2009-02-12 04:58:57 UTC (rev 3637) +++ kazehakase/trunk/src/bookmarks/kz-proxy-folder.c 2009-02-12 05:05:30 UTC (rev 3638) @@ -244,11 +244,9 @@ if (sibling) { - GList *list; gint index; - list = kz_bookmark_folder_get_children(priv->folder); - index = g_list_index(list, sibling); + index = kz_bookmark_folder_get_child_index(priv->folder, sibling); if (index >= 0) { KzBookmark *sib; @@ -257,7 +255,6 @@ kz_bookmark_folder_insert_before(KZ_BOOKMARK_FOLDER(proxy), new, sib); } - g_list_free(list); } else { @@ -272,13 +269,10 @@ KzBookmark *child, KzProxyFolder *proxy) { - GList *list; gint index; KzProxyFolderPriv *priv = KZ_PROXY_FOLDER_GET_PRIVATE(proxy); - list = kz_bookmark_folder_get_children(priv->folder); - index = g_list_index(list, child); - g_list_free(list); + index = kz_bookmark_folder_get_child_index(priv->folder, child); if (index >= 0) { @@ -294,13 +288,10 @@ kz_proxy_folder_get_original_bookmark (KzProxyFolder *proxy, KzBookmark *bookmark) { - GList *list; gint index; KzProxyFolderPriv *priv = KZ_PROXY_FOLDER_GET_PRIVATE(proxy); - list = kz_bookmark_folder_get_children(KZ_BOOKMARK_FOLDER(proxy)); - index = g_list_index(list, bookmark); - g_list_free(list); + index = kz_bookmark_folder_get_child_index(KZ_BOOKMARK_FOLDER(proxy), bookmark); return (index >= 0) ? kz_bookmark_folder_get_nth_child(priv->folder, index) : NULL; }