aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorChris Toshok <toshok@helixcode.com>2000-10-03 13:06:11 +0800
committerChris Toshok <toshok@src.gnome.org>2000-10-03 13:06:11 +0800
commitd697b27b4d9b396d3e27621ba0220564d6d3d013 (patch)
tree75fea62298c87482cce904fe93c89d6f7e4fb215 /mail
parent1c1638efa621c06cfc0ba0d592a4dfe555fc7eb1 (diff)
downloadgsoc2013-evolution-d697b27b4d9b396d3e27621ba0220564d6d3d013.tar.gz
gsoc2013-evolution-d697b27b4d9b396d3e27621ba0220564d6d3d013.tar.zst
gsoc2013-evolution-d697b27b4d9b396d3e27621ba0220564d6d3d013.zip
destroy our tree_model and remove the root node. also, release_unref our
2000-10-02 Chris Toshok <toshok@helixcode.com> * subscribe-dialog.c (subscribe_dialog_destroy): destroy our tree_model and remove the root node. also, release_unref our control and view, and unref the listener. * mail-tools.c (mail_tool_uri_to_folder): news url's contain host names too, now. svn path=/trunk/; revision=5690
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/mail-tools.c19
-rw-r--r--mail/subscribe-dialog.c12
3 files changed, 34 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 722aa5abba..5b020c59aa 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,14 @@
2000-10-02 Chris Toshok <toshok@helixcode.com>
+ * subscribe-dialog.c (subscribe_dialog_destroy): destroy our
+ tree_model and remove the root node. also, release_unref our
+ control and view, and unref the listener.
+
+ * mail-tools.c (mail_tool_uri_to_folder): news url's contain host
+ names too, now.
+
+2000-10-02 Chris Toshok <toshok@helixcode.com>
+
* subscribe-dialog.c, subscribe-dialog.h: add a
storage-set-view-listener, and add a little printf saying what
storage was selected.
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index 6c28372541..0c89fb4cdd 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -459,9 +459,16 @@ mail_tool_get_root_of_store (const char *source_uri, CamelException *ex)
CamelStore *store;
CamelFolder *folder;
+ mail_tool_camel_lock_up();
+
+ if (!strncmp (source_uri, "news://", 7))
+ store = (CamelStore*)camel_session_get_service (session, source_uri,
+ CAMEL_PROVIDER_STORE, ex);
+ else
+ store = camel_session_get_store (session, source_uri, ex);
+
mail_tool_camel_lock_up ();
- store = camel_session_get_store (session, source_uri, ex);
if (!store) {
mail_tool_camel_lock_down ();
return NULL;
@@ -530,10 +537,14 @@ mail_tool_uri_to_folder (const char *uri, CamelException *ex)
mail_tool_camel_lock_up();
store = camel_session_get_store (session, uri, ex);
if (store) {
- const char *folder_path;
+ const char *folder_path, *ptr;
- folder_path = uri + 5;
- folder = camel_store_get_folder (store, folder_path, FALSE, ex);
+ for (ptr = (char *)(uri + 7); *ptr && *ptr != '/'; ptr++);
+ if (*ptr == '/') {
+ ptr++;
+ folder_path = ptr;
+ folder = camel_store_get_folder (store, folder_path, FALSE, ex);
+ }
}
mail_tool_camel_lock_down();
diff --git a/mail/subscribe-dialog.c b/mail/subscribe-dialog.c
index 496a9f4c1d..ef1daa72f6 100644
--- a/mail/subscribe-dialog.c
+++ b/mail/subscribe-dialog.c
@@ -581,9 +581,17 @@ subscribe_dialog_gui_init (SubscribeDialog *sc)
static void
subscribe_dialog_destroy (GtkObject *object)
{
- SubscribeDialog *subscribe_dialog;
+ SubscribeDialog *sc;
+
+ sc = SUBSCRIBE_DIALOG (object);
+
+ gtk_object_unref (GTK_OBJECT (sc->listener));
+
+ bonobo_object_release_unref (sc->storage_set_control, NULL);
+ bonobo_object_release_unref (sc->storage_set_view, NULL);
- subscribe_dialog = SUBSCRIBE_DIALOG (object);
+ e_tree_model_node_remove (sc->model, sc->root);
+ gtk_object_unref (GTK_OBJECT (sc->model));
subscribe_dialog_parent_class->destroy (object);
}