[evolution-rss] remove calls to mainloop iteration
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-rss] remove calls to mainloop iteration
- Date: Wed, 2 Mar 2011 21:23:06 +0000 (UTC)
commit 17b9722066f71545ba0fda7d45556b2613d5d619
Author: Lucian Langa <lucilanga gnome org>
Date: Wed Mar 2 22:09:01 2011 +0200
remove calls to mainloop iteration
src/parser.c | 3 ---
src/rss-config-factory.c | 20 ++------------------
src/rss.c | 19 -------------------
3 files changed, 2 insertions(+), 40 deletions(-)
---
diff --git a/src/parser.c b/src/parser.c
index 776e42d..f940b51 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -1272,9 +1272,6 @@ update_channel(RDF *r)
subj = g_strdup(CF->subj);
- while (gtk_events_pending())
- gtk_main_iteration ();
-
ftotal++;
if (gconf_client_get_bool(rss_gconf, GCONF_KEY_DOWNLOAD_ENCLOSURES, NULL)) {
if (CF->encl) {
diff --git a/src/rss-config-factory.c b/src/rss-config-factory.c
index 33196ab..5914348 100644
--- a/src/rss-config-factory.c
+++ b/src/rss-config-factory.c
@@ -942,8 +942,6 @@ store_redraw(GtkTreeView *data)
static void
msg_feeds_response(GtkWidget *selector, guint response, gpointer user_data)
{
- while (gtk_events_pending ())
- gtk_main_iteration ();
if (response == GTK_RESPONSE_CANCEL)
rf->cancel = 1;
gtk_widget_destroy(selector);
@@ -1004,8 +1002,6 @@ feeds_dialog_add(GtkDialog *d, gpointer data)
G_CALLBACK(msg_feeds_response),
NULL);
gtk_widget_show_all(msg_feeds);
- while (gtk_events_pending ())
- gtk_main_iteration ();
if (feed->feed_url && strlen(feed->feed_url)) {
text = feed->feed_url;
feed->feed_url = sanitize_url(feed->feed_url);
@@ -1536,8 +1532,6 @@ process_dialog_edit(add_feed *feed, gchar *url, gchar *feed_name)
G_CALLBACK(msg_feeds_response),
NULL);
gtk_widget_show_all(msg_feeds);
- while (gtk_events_pending ())
- gtk_main_iteration ();
if (!feed->add)
goto out;
text = feed->feed_url;
@@ -1684,8 +1678,6 @@ import_dialog_response(
{
if (response == GTK_RESPONSE_CANCEL) {
gtk_widget_destroy(rf->progress_dialog);
- while (gtk_events_pending ())
- gtk_main_iteration ();
rf->import_cancel = 1;
rf->display_cancel = 1;
progress = 0;
@@ -1727,8 +1719,6 @@ import_one_feed(gchar *url, gchar *title, gchar *prefix)
* it is very convenient to be able to cancel importing
* of a few hundred feeds
*/
- while (gtk_events_pending())
- gtk_main_iteration();
}
/*
@@ -1876,8 +1866,6 @@ error: rss_error(NULL,
g_object_set_data((GObject *)import_progress, "label", import_label);
src = doc;
name = NULL;
- while (gtk_events_pending ())
- gtk_main_iteration ();
if (type == 1) {
src=src->children;
d("my cont:%s\n", src->content);
@@ -1999,8 +1987,8 @@ error: rss_error(NULL,
rssurl, rsstitle);
rf->import++;
if (rf->import == 10) {
- while(gtk_events_pending())
- gtk_main_iteration();
+// while(gtk_events_pending())
+// gtk_main_iteration();
}
import_one_feed(
rssurl,
@@ -2049,8 +2037,6 @@ fail: g_free(rssprefix);
}
}
- while (gtk_events_pending ())
- gtk_main_iteration ();
out: g_hash_table_destroy(tmphash);
tmphash=NULL;
//prevent reseting queue before its time dues do async operations
@@ -2805,8 +2791,6 @@ inject_cookie(SoupCookie *cookie, GtkProgressBar *progress)
gtk_progress_bar_set_text(progress, text);
g_free(text);
soup_cookie_jar_add_cookie(rss_soup_jar, cookie);
- while (gtk_events_pending ())
- gtk_main_iteration ();
}
}
diff --git a/src/rss.c b/src/rss.c
index 56bf3ec..e6b416b 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -346,9 +346,6 @@ statuscb(NetStatusType status, gpointer statusdata, gpointer data)
if (progress->current > 0 && progress->total > 0) {
fraction = (float)progress->current / progress->total;
- while (gtk_events_pending ())
- gtk_main_iteration ();
-
if (rf->cancel_all) break;
if ((key = lookup_key(data)))
@@ -562,8 +559,6 @@ textcb(NetStatusType status, gpointer statusdata, gpointer data)
fraction = (float)progress->current / progress->total;
d("%.2f%% ", fraction);
}
- while (gtk_events_pending())
- gtk_main_iteration ();
break;
default:
g_warning("unhandled network status %d\n", status);
@@ -971,8 +966,6 @@ summary_cb (GtkWidget *button, EMFormatHTMLPObject *pobject)
#else
em_format_redraw((EMFormat *)pobject);
#endif
-// while (gtk_events_pending ())
-// gtk_main_iteration ();
}
@@ -3453,9 +3446,6 @@ generic_finish_feed(rfMessage *msg, gpointer user_data)
g_print("feed %s\n", (gchar *)user_data);
- while (gtk_events_pending ())
- gtk_main_iteration ();
-
r = g_new0 (RDF, 1);
r->shown = TRUE;
xmlSubstituteEntitiesDefaultValue = 1;
@@ -3747,9 +3737,6 @@ finish_comments (SoupSession *soup_sess, SoupMessage *msg, EMFormatHTML *user_da
em_format_redraw((EMFormat *)user_data);
#endif
}
-
- while (gtk_events_pending ())
- gtk_main_iteration ();
}
static void
@@ -5717,8 +5704,6 @@ delete_oldest_article(CamelFolder *folder, guint unread)
// d("uid:%d j:%d/%d, absdate:%d, date:%s, imax:%d\n",
// i, j, q, min_date, ctime(&min_date), imax);
out: camel_message_info_free(info);
- while (gtk_events_pending())
- gtk_main_iteration ();
}
camel_folder_freeze(folder);
if (min_date) {
@@ -5821,8 +5806,6 @@ get_feed_age(RDF *r, gpointer name)
#else
camel_object_unref (message);
#endif
- while (gtk_events_pending())
- gtk_main_iteration ();
}
camel_folder_free_uids (folder, uids);
#if (DATASERVER_VERSION >= 2033001)
@@ -5856,8 +5839,6 @@ get_feed_age(RDF *r, gpointer name)
}
}
camel_folder_free_message_info(folder, info);
- while (gtk_events_pending())
- gtk_main_iteration ();
}
camel_folder_free_uids (folder, uids);
#if (DATASERVER_VERSION >= 2033001)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]