Hiroyuki Ikezoe
ikezo****@users*****
Fri Jun 9 19:55:42 JST 2006
Index: kazehakase/src/kz-downloader-group.c diff -u kazehakase/src/kz-downloader-group.c:1.20 kazehakase/src/kz-downloader-group.c:1.21 --- kazehakase/src/kz-downloader-group.c:1.20 Fri Jun 9 19:31:39 2006 +++ kazehakase/src/kz-downloader-group.c Fri Jun 9 19:55:42 2006 @@ -295,6 +295,7 @@ { KzDownloader *dl; gchar *basename; + GSList *list; g_return_if_fail(KZ_IS_DOWNLOADER_GROUP(dlgrp)); g_return_if_fail(uri); @@ -304,9 +305,10 @@ if (!dl) return; - dlgrp->items = g_slist_append(dlgrp->items, dl); + list = g_slist_append(dlgrp->items, dl); + g_object_set(G_OBJECT(dlgrp), "kz-downloader-items", list, NULL); connect_signals(dlgrp, dl); - + kz_downloader_to_file(dl); g_free(basename); @@ -319,6 +321,7 @@ const gchar *filename) { KzDownloader *dl; + GSList *list; g_return_if_fail(KZ_IS_DOWNLOADER_GROUP(dlgrp)); g_return_if_fail(uri); @@ -327,7 +330,8 @@ if (!dl) return; - dlgrp->items = g_slist_append(dlgrp->items, dl); + list = g_slist_append(dlgrp->items, dl); + g_object_set(G_OBJECT(dlgrp), "kz-downloader-items", list, NULL); connect_signals(dlgrp, dl); kz_downloader_to_file(dl); @@ -338,11 +342,13 @@ kz_downloader_group_add_downloader (KzDownloaderGroup *dlgrp, KzDownloader *dl) { + GSList *list; g_return_if_fail(KZ_IS_DOWNLOADER_GROUP(dlgrp)); g_return_if_fail(KZ_IS_DOWNLOADER(dl)); g_object_ref(G_OBJECT(dl)); - dlgrp->items = g_slist_append(dlgrp->items, KZ_DOWNLOADER(dl)); + list = g_slist_append(dlgrp->items, KZ_DOWNLOADER(dl)); + g_object_set(G_OBJECT(dlgrp), "kz-downloader-items", list, NULL); connect_signals(dlgrp, KZ_DOWNLOADER(dl)); } @@ -362,11 +368,13 @@ void kz_downloader_group_remove_item (KzDownloaderGroup *dlgrp, KzDownloader *dl) { + GSList *list; g_return_if_fail(KZ_IS_DOWNLOADER_GROUP(dlgrp)); g_return_if_fail(KZ_IS_DOWNLOADER(dl)); g_signal_emit(dlgrp, kz_downloader_group_signals[REMOVE_SIGNAL], 0, dl); - dlgrp->items = g_slist_remove(dlgrp->items, dl); + list = g_slist_remove(dlgrp->items, dl); + g_object_set(G_OBJECT(dlgrp), "kz-downloader-items", list, NULL); g_idle_add(idle_remove_item, dl); }