aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/pop3
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-09-20 01:27:09 +0800
committerDan Winship <danw@src.gnome.org>2000-09-20 01:27:09 +0800
commit7dcc0325454ed6c71c2532befbb6aadb32391766 (patch)
tree744535557a2ab1e23278778ac464dcab718e03c1 /camel/providers/pop3
parent053af645da6e5f74474d13c19ce73d236d9b76a9 (diff)
downloadgsoc2013-evolution-7dcc0325454ed6c71c2532befbb6aadb32391766.tar.gz
gsoc2013-evolution-7dcc0325454ed6c71c2532befbb6aadb32391766.tar.zst
gsoc2013-evolution-7dcc0325454ed6c71c2532befbb6aadb32391766.zip
Removed (camel_folder_init, camel_folder_construct): New object init
* camel-folder.c: (init): Removed (camel_folder_init, camel_folder_construct): New object init function and public object constructor to replace the old init method in a more Gtk-like fashion. (get_parent_folder, camel_folder_get_parent_folder): Removed. No CamelFolder subclass was ever setting the parent_folder member, no code has ever needed to look at it, and fixing it would actually be pretty hard. (get_subfolder_info, camel_folder_get_subfolder_info): Renamed from ..._names. Deals in CamelFolderInfo now. (free_subfolder_info, camel_folder_free_subfolder_info): Likewise. (get_subfolder, camel_folder_get_subfolder): Removed. CamelFolderInfo contains the subfolder's full name, so this is unnecessary now, and removing it lets us get rid of the CamelFolder separator member, which is needed for the default implementation of this function, but not otherwise needed for most providers. Also, lots of code style fixes. * providers/*: Update CamelFolder subclasses for changes, although none of them fill in the message counts in the CamelFolderInfo yet. svn path=/trunk/; revision=5503
Diffstat (limited to 'camel/providers/pop3')
-rw-r--r--camel/providers/pop3/camel-pop3-folder.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c
index f7a86a741c..d367cac1ab 100644
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ b/camel/providers/pop3/camel-pop3-folder.c
@@ -76,11 +76,15 @@ static void
camel_pop3_folder_init (gpointer object)
{
CamelFolder *folder = CAMEL_FOLDER (object);
+ CamelPop3Folder *pop3_folder = CAMEL_POP3_FOLDER (object);
folder->can_hold_messages = TRUE;
folder->can_hold_folders = FALSE;
folder->has_summary_capability = FALSE;
folder->has_search_capability = FALSE;
+
+ pop3_folder->uids = NULL;
+ pop3_folder->flags = NULL;
}
CamelType
@@ -113,16 +117,18 @@ pop3_finalize (CamelObject *object)
CamelFolder *
camel_pop3_folder_new (CamelStore *parent, CamelException *ex)
{
- CamelPop3Folder *pop3_folder;
+ CamelFolder *folder;
- pop3_folder = CAMEL_POP3_FOLDER(camel_object_new (CAMEL_POP3_FOLDER_TYPE));
- CF_CLASS (pop3_folder)->init ((CamelFolder *)pop3_folder, parent,
- NULL, "inbox", "/", TRUE, ex);
- pop3_folder->uids = NULL;
- pop3_folder->flags = NULL;
- CF_CLASS (pop3_folder)->refresh_info ((CamelFolder *)pop3_folder, ex);
+ folder = CAMEL_FOLDER (camel_object_new (CAMEL_POP3_FOLDER_TYPE));
+ camel_folder_construct (folder, parent, "inbox", "inbox");
+
+ camel_folder_refresh_info (folder, ex);
+ if (camel_exception_is_set (ex)) {
+ camel_object_unref (CAMEL_OBJECT (folder));
+ folder = NULL;
+ }
- return (CamelFolder *)pop3_folder;
+ return folder;
}
static void