summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorAndy Hertzfeld <andy@src.gnome.org>2001-05-02 01:48:12 +0000
committerAndy Hertzfeld <andy@src.gnome.org>2001-05-02 01:48:12 +0000
commit4311663349e657946f666684ce791e5496affa64 (patch)
treef9ada9feee498e0d6c55d1ab05200656a4abdb67 /components
parentfeebc194e685018d98d0ae9f3b173670a6237687 (diff)
downloadnautilus-4311663349e657946f666684ce791e5496affa64.tar.gz
fixed bug 8216, removing the news panel when loading channels hangs
* components/news/nautilus-news.c: (do_destroy), (rss_read_done_callback), (nautilus_news_load_channel), (check_for_updates): fixed bug 8216, removing the news panel when loading channels hangs Nautilus. Fixed by making sure we don't launch multiple I/O request for a single channel. I suspect there are still some problems lurking, but the reported bug is no longer reproducible.
Diffstat (limited to 'components')
-rw-r--r--components/news/nautilus-news.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/components/news/nautilus-news.c b/components/news/nautilus-news.c
index 92a9eabd2..e9095b511 100644
--- a/components/news/nautilus-news.c
+++ b/components/news/nautilus-news.c
@@ -290,17 +290,6 @@ set_bonobo_properties (BonoboPropertyBag *bag,
static void
do_destroy (GtkObject *obj, News *news)
{
- /* If the widget is being destroyed first, make sure the bonobo object
- * that owns it is not destroyed half-way through the widget destroy
- * process by reffing the bonobo object and only unreffing it at idle
- * time. If the bonobo object is being destroyed first, then don't do
- * this because it exposes a bonobo bug.
- */
- if (!GTK_OBJECT_DESTROYED (GTK_OBJECT (news->view))) {
- bonobo_object_ref (BONOBO_OBJECT (news->view));
- bonobo_object_idle_unref (BONOBO_OBJECT (news->view));
- }
-
g_free (news->uri);
if (news->font) {
@@ -342,7 +331,7 @@ do_destroy (GtkObject *obj, News *news)
/* free all the channel data */
nautilus_news_free_channel_list (news);
-
+
nautilus_preferences_remove_callback (NAUTILUS_PREFERENCES_NEWS_MAX_ITEMS,
max_items_changed,
news);
@@ -1447,7 +1436,7 @@ rss_read_done_callback (GnomeVFSResult result,
}
/* extract the image uri and, if found, load it asynchronously; don't refetch if we already have one */
- if (channel_data->logo_image == NULL) {
+ if (channel_data->logo_image == NULL && channel_data->load_image_handle == NULL) {
if (!extract_rss_image (channel_data, rss_document)) {
extract_scripting_news_image (channel_data, rss_document);
}
@@ -1487,7 +1476,8 @@ nautilus_news_load_channel (News *news_data, RSSChannelData *channel_data)
{
char *title;
/* don't load if it's not showing, or it's already loading */
- if (!channel_data->is_showing || channel_data->update_in_progress) {
+ if (!channel_data->is_showing || channel_data->update_in_progress ||
+ channel_data->load_file_handle != NULL) {
return;
}
@@ -1648,7 +1638,6 @@ check_for_updates (gpointer callback_data)
if (current_time > next_update_time && !channel_data->update_in_progress && channel_data->is_showing) {
nautilus_news_load_channel (news_data, channel_data);
}
-
current_item = current_item->next;
}