aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution/e-summary.c
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2001-07-01 06:59:34 +0800
committerIain Holmes <iain@src.gnome.org>2001-07-01 06:59:34 +0800
commit730ceece38016a382888d5a9958eca004f65acf0 (patch)
treee16a9a0feaa6ba76b7d74216095e48c64c4481f7 /my-evolution/e-summary.c
parentba225d83afd4d6b444553a79b3fa224d5a47e98b (diff)
downloadgsoc2013-evolution-730ceece38016a382888d5a9958eca004f65acf0.tar.gz
gsoc2013-evolution-730ceece38016a382888d5a9958eca004f65acf0.tar.zst
gsoc2013-evolution-730ceece38016a382888d5a9958eca004f65acf0.zip
Handle the online/offline stuff
svn path=/trunk/; revision=10639
Diffstat (limited to 'my-evolution/e-summary.c')
-rw-r--r--my-evolution/e-summary.c71
1 files changed, 70 insertions, 1 deletions
diff --git a/my-evolution/e-summary.c b/my-evolution/e-summary.c
index 8504fdaf64..830cad4220 100644
--- a/my-evolution/e-summary.c
+++ b/my-evolution/e-summary.c
@@ -70,6 +70,8 @@ struct _ESummaryPrivate {
GtkWidget *html;
GHashTable *protocol_hash;
+
+ GList *connections;
};
typedef struct _ProtocolListener {
@@ -139,7 +141,7 @@ e_summary_draw (ESummary *summary)
g_string_append (string, HTML_5);
stream = gtk_html_begin (GTK_HTML (summary->priv->html));
- GTK_HTML (summary->priv->html)->engine->newPage = FALSE;
+/* GTK_HTML (summary->priv->html)->engine->newPage = FALSE; */
gtk_html_write (GTK_HTML (summary->priv->html), stream, string->str, strlen (string->str));
gtk_html_end (GTK_HTML (summary->priv->html), stream, GTK_HTML_STREAM_OK);
@@ -364,6 +366,7 @@ e_summary_init (ESummary *summary)
TRUE, TRUE, 0);
priv->protocol_hash = NULL;
+ priv->connections = NULL;
summary->prefs_window = NULL;
e_summary_preferences_init (summary);
@@ -576,3 +579,69 @@ e_summary_reconfigure (ESummary *summary)
e_summary_calendar_reconfigure (summary);
}
}
+
+int
+e_summary_count_connections (ESummary *summary)
+{
+ GList *p;
+ int count = 0;
+
+ for (p = summary->priv->connections; p; p = p->next) {
+ ESummaryConnection *c;
+
+ c = p->data;
+ count += c->count (summary, c->closure);
+ }
+
+ return count;
+}
+
+GList *
+e_summary_add_connections (ESummary *summary)
+{
+ GList *p;
+ GList *connections = NULL;
+
+ for (p = summary->priv->connections; p; p = p->next) {
+ ESummaryConnection *c;
+ GList *r;
+
+ c = p->data;
+ r = c->add (summary, c->closure);
+
+ connections = g_list_concat (connections, r);
+ }
+
+ return connections;
+}
+
+void
+e_summary_set_online (ESummary *summary,
+ gboolean online,
+ ESummaryOnlineCallback callback,
+ void *closure)
+{
+ GList *p;
+
+ for (p = summary->priv->connections; p; p = p->next) {
+ ESummaryConnection *c;
+
+ c = p->data;
+ c->callback = callback;
+ c->callback_closure = closure;
+
+ c->set_online (summary, online, c->closure);
+ }
+}
+
+void
+e_summary_add_online_connection (ESummary *summary,
+ ESummaryConnection *connection)
+{
+ g_return_if_fail (summary != NULL);
+ g_return_if_fail (IS_E_SUMMARY (summary));
+ g_return_if_fail (connection != NULL);
+
+ summary->priv->connections = g_list_prepend (summary->priv->connections,
+ connection);
+}