aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution
diff options
context:
space:
mode:
Diffstat (limited to 'my-evolution')
-rw-r--r--my-evolution/ChangeLog21
-rw-r--r--my-evolution/e-summary-mail.c18
-rw-r--r--my-evolution/e-summary-offline-handler.c15
-rw-r--r--my-evolution/e-summary-offline-handler.h2
-rw-r--r--my-evolution/e-summary-rdf.c53
-rw-r--r--my-evolution/e-summary-weather.c1
-rw-r--r--my-evolution/e-summary.c3
-rw-r--r--my-evolution/e-summary.h2
8 files changed, 75 insertions, 40 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog
index c08095188f..03d9033a1d 100644
--- a/my-evolution/ChangeLog
+++ b/my-evolution/ChangeLog
@@ -1,3 +1,24 @@
+2001-08-22 Iain Holmes <iain@ximian.com>
+
+ * e-summary-mail.c (make_pretty_foldername): If show_full_path is TRUE
+ then return the full path. Take in the ESummary as well.
+ (folder_gen_html): Pass ESummary to make_pretty_foldername.
+ (e_summary_mail_generate_html): Pass the ESummary to folder_gen_html.
+
+ * e-summary-rdf.c (e_summary_rdf_set_online): Take in a
+ GNOME_Evolution_OfflineProgressListener in case we want to do
+ individual reporting of rdf's being destroyed.
+ (make_connection): Call the RDF Feed a News Feed instead.
+
+ * e-summary-weather.c (e_summary_weather_set_online): Same.
+
+ * e-summary.c (e_summary_set_online): Pass in the
+ GNOME_Evolution_OfflineProgressListener to the set_online callback.
+
+ * e-summary-offline-handler.c (impl_goOffline): Pass the listener to the
+ callback.
+ (impl_goOnline): Pass NULL for the listener.
+
2001-08-21 Iain Holmes <iain@ximian.com>
* my-evolution-html.h: Set the text colour to black.
diff --git a/my-evolution/e-summary-mail.c b/my-evolution/e-summary-mail.c
index 81397e6498..05fe7cfc6b 100644
--- a/my-evolution/e-summary-mail.c
+++ b/my-evolution/e-summary-mail.c
@@ -60,24 +60,30 @@ e_summary_mail_get_html (ESummary *summary)
/* Work out what to do with folder names */
static char *
-make_pretty_foldername (const char *foldername)
+make_pretty_foldername (ESummary *summary,
+ const char *foldername)
{
char *pretty;
- if ((pretty = strrchr (foldername, '/'))) {
- return g_strdup (pretty + 1);
+ if (summary->preferences->show_full_path == FALSE) {
+ if ((pretty = strrchr (foldername, '/'))) {
+ return g_strdup (pretty + 1);
+ } else {
+ return g_strdup (foldername);
+ }
} else {
return g_strdup (foldername);
}
}
static void
-folder_gen_html (ESummaryMailFolder *folder,
+folder_gen_html (ESummary *summary,
+ ESummaryMailFolder *folder,
GString *string)
{
char *str, *pretty_name, *uri;
- pretty_name = make_pretty_foldername (folder->name);
+ pretty_name = make_pretty_foldername (summary, folder->name);
uri = g_strconcat ("evolution:/local", folder->name, NULL);
str = g_strdup_printf ("<tr><td><a href=\"%s\"><pre>%s</pre></a></td><td align=\"Left\"><pre>%d/%d</pre></td></tr>",
uri, pretty_name, folder->unread, folder->count);
@@ -108,7 +114,7 @@ e_summary_mail_generate_html (ESummary *summary)
g_string_append (string, "</a></b></dt><dd><table numcols=\"2\" width=\"100%\">");
for (p = mail->shown; p; p = p->next) {
- folder_gen_html (p->data, string);
+ folder_gen_html (summary, p->data, string);
}
g_string_append (string, "</table></dd></dl>");
diff --git a/my-evolution/e-summary-offline-handler.c b/my-evolution/e-summary-offline-handler.c
index 8feaec10c1..efe9701bdf 100644
--- a/my-evolution/e-summary-offline-handler.c
+++ b/my-evolution/e-summary-offline-handler.c
@@ -27,8 +27,8 @@ struct _ESummaryOfflineHandlerPriv {
GNOME_Evolution_OfflineProgressListener listener_interface;
};
-static GNOME_Evolution_ConnectionList *
-create_connection_list (ESummary *summary)
+GNOME_Evolution_ConnectionList *
+e_summary_offline_handler_create_connection_list (ESummary *summary)
{
GNOME_Evolution_ConnectionList *list;
GList *connections, *p;
@@ -78,7 +78,7 @@ impl_prepareForOffline (PortableServer_Servant servant,
offline_handler = E_SUMMARY_OFFLINE_HANDLER (bonobo_object_from_servant (servant));
priv = offline_handler->priv;
- *active_connection_list = create_connection_list (priv->summary);
+ *active_connection_list = e_summary_offline_handler_create_connection_list (priv->summary);
}
static void
@@ -95,14 +95,15 @@ went_offline (ESummary *summary,
g_return_if_fail (offline_handler != NULL);
priv = offline_handler->priv;
- connection_list = create_connection_list (summary);
+ connection_list = e_summary_offline_handler_create_connection_list (summary);
CORBA_exception_init (&ev);
g_warning ("Went offline");
GNOME_Evolution_OfflineProgressListener_updateProgress (priv->listener_interface, connection_list, &ev);
if (BONOBO_EX (&ev)) {
- g_warning ("Error updating offline progress");
+ g_warning ("Error updating offline progress: %s",
+ CORBA_exception_id (&ev));
}
CORBA_exception_free (&ev);
@@ -121,7 +122,7 @@ impl_goOffline (PortableServer_Servant servant,
priv->listener_interface = CORBA_Object_duplicate (progress_listener, ev);
- e_summary_set_online (priv->summary, FALSE, went_offline, offline_handler);
+ e_summary_set_online (priv->summary, progress_listener, FALSE, went_offline, offline_handler);
}
static void
@@ -131,7 +132,7 @@ impl_goOnline (PortableServer_Servant servant,
ESummaryOfflineHandler *offline_handler;
offline_handler = E_SUMMARY_OFFLINE_HANDLER (bonobo_object_from_servant (servant));
- e_summary_set_online (offline_handler->priv->summary, TRUE, NULL, NULL);
+ e_summary_set_online (offline_handler->priv->summary, NULL, TRUE, NULL, NULL);
}
/* GtkObject methods */
diff --git a/my-evolution/e-summary-offline-handler.h b/my-evolution/e-summary-offline-handler.h
index a8c242afbf..9a88fa2c3e 100644
--- a/my-evolution/e-summary-offline-handler.h
+++ b/my-evolution/e-summary-offline-handler.h
@@ -48,6 +48,8 @@ GtkType e_summary_offline_handler_get_type (void);
ESummaryOfflineHandler *e_summary_offline_handler_new (void);
void e_summary_offline_handler_set_summary (ESummaryOfflineHandler *handler,
ESummary *summary);
+GNOME_Evolution_ConnectionList *e_summary_offline_handler_create_connection_list (ESummary *summary);
+
#ifdef __cplusplus
}
#endif
diff --git a/my-evolution/e-summary-rdf.c b/my-evolution/e-summary-rdf.c
index 3ab6fe2816..24c8de3cc6 100644
--- a/my-evolution/e-summary-rdf.c
+++ b/my-evolution/e-summary-rdf.c
@@ -476,7 +476,7 @@ make_connection (RDF *r)
d = g_new (ESummaryConnectionData, 1);
d->hostname = g_strdup (r->uri);
- d->type = g_strdup (_("RDF Summary"));
+ d->type = g_strdup (_("News Feed"));
return d;
}
@@ -504,7 +504,33 @@ e_summary_rdf_add (ESummary *summary,
}
static void
+rdf_free (RDF *r)
+{
+ /* Stop the download */
+ if (r->handle) {
+ gnome_vfs_async_cancel (r->handle);
+ }
+ if (r->uri) {
+ g_free (r->uri);
+ }
+ if (r->html) {
+ g_free (r->html);
+ }
+ if (r->string) {
+ g_string_free (r->string, TRUE);
+ }
+ if (r->buffer) {
+ g_free (r->buffer);
+ }
+ if (r->cache) {
+ xmlFreeDoc (r->cache);
+ }
+ g_free (r);
+}
+
+static void
e_summary_rdf_set_online (ESummary *summary,
+ GNOME_Evolution_OfflineProgressListener progress,
gboolean online,
void *data)
{
@@ -574,31 +600,6 @@ e_summary_rdf_init (ESummary *summary)
return;
}
-static void
-rdf_free (RDF *r)
-{
- /* Stop the download */
- if (r->handle) {
- gnome_vfs_async_cancel (r->handle);
- }
- if (r->uri) {
- g_free (r->uri);
- }
- if (r->html) {
- g_free (r->html);
- }
- if (r->string) {
- g_string_free (r->string, TRUE);
- }
- if (r->buffer) {
- g_free (r->buffer);
- }
- if (r->cache) {
- xmlFreeDoc (r->cache);
- }
- g_free (r);
-}
-
void
e_summary_rdf_reconfigure (ESummary *summary)
{
diff --git a/my-evolution/e-summary-weather.c b/my-evolution/e-summary-weather.c
index cd349d8710..990e0f8b8e 100644
--- a/my-evolution/e-summary-weather.c
+++ b/my-evolution/e-summary-weather.c
@@ -538,6 +538,7 @@ e_summary_weather_add (ESummary *summary,
static void
e_summary_weather_set_online (ESummary *summary,
+ GNOME_Evolution_OfflineProgressListener listener,
gboolean online,
void *data)
{
diff --git a/my-evolution/e-summary.c b/my-evolution/e-summary.c
index 1ea6534d1b..788945be73 100644
--- a/my-evolution/e-summary.c
+++ b/my-evolution/e-summary.c
@@ -697,6 +697,7 @@ e_summary_add_connections (ESummary *summary)
void
e_summary_set_online (ESummary *summary,
+ GNOME_Evolution_OfflineProgressListener progress,
gboolean online,
ESummaryOnlineCallback callback,
void *closure)
@@ -714,7 +715,7 @@ e_summary_set_online (ESummary *summary,
c->callback = callback;
c->callback_closure = closure;
- c->set_online (summary, online, c->closure);
+ c->set_online (summary, progress, online, c->closure);
}
}
diff --git a/my-evolution/e-summary.h b/my-evolution/e-summary.h
index 64d1918dd4..9a19a6d20c 100644
--- a/my-evolution/e-summary.h
+++ b/my-evolution/e-summary.h
@@ -39,6 +39,7 @@ typedef int (* ESummaryConnectionCount) (ESummary *summary,
typedef GList *(* ESummaryConnectionAdd) (ESummary *summary,
void *closure);
typedef void (* ESummaryConnectionSetOnline) (ESummary *summary,
+ GNOME_Evolution_OfflineProgressListener progress,
gboolean online,
void *closure);
typedef void (*ESummaryOnlineCallback) (ESummary *summary,
@@ -125,6 +126,7 @@ void e_summary_reconfigure (ESummary *summary);
int e_summary_count_connections (ESummary *summary);
GList *e_summary_add_connections (ESummary *summary);
void e_summary_set_online (ESummary *summary,
+ GNOME_Evolution_OfflineProgressListener listener,
gboolean online,
ESummaryOnlineCallback callback,
void *closure);