diff options
author | Not Zed <NotZed@Ximian.com> | 2002-06-03 10:52:32 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2002-06-03 10:52:32 +0800 |
commit | aa3bfbe4224ff1c99d358aeac464ce7e9f0963a8 (patch) | |
tree | e5e16e67b4fdf2e67aad5ebc04dbbc328d0eb5bc /mail/mail-local.c | |
parent | 81ae35a505ec589bc5c59f5e5ae8d034c2aa9169 (diff) | |
download | gsoc2013-evolution-aa3bfbe4224ff1c99d358aeac464ce7e9f0963a8.tar gsoc2013-evolution-aa3bfbe4224ff1c99d358aeac464ce7e9f0963a8.tar.gz gsoc2013-evolution-aa3bfbe4224ff1c99d358aeac464ce7e9f0963a8.tar.bz2 gsoc2013-evolution-aa3bfbe4224ff1c99d358aeac464ce7e9f0963a8.tar.lz gsoc2013-evolution-aa3bfbe4224ff1c99d358aeac464ce7e9f0963a8.tar.xz gsoc2013-evolution-aa3bfbe4224ff1c99d358aeac464ce7e9f0963a8.tar.zst gsoc2013-evolution-aa3bfbe4224ff1c99d358aeac464ce7e9f0963a8.zip |
Implement, return a text description of the localfolder.
2002-06-01 Not Zed <NotZed@Ximian.com>
* mail-local.c (mlf_getv): Implement, return a text description of
the localfolder.
* message-list.c (ml_duplicate_value):
(ml_free_value):
(ml_initialize_value):
(ml_value_is_empty):
(ml_value_to_string):
(ml_tree_value_at): Implement COL_LOCATION, original location of
message (useful for vfolder).
svn path=/trunk/; revision=17072
Diffstat (limited to 'mail/mail-local.c')
-rw-r--r-- | mail/mail-local.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/mail/mail-local.c b/mail/mail-local.c index 5e1c4ee579..bf28a8defe 100644 --- a/mail/mail-local.c +++ b/mail/mail-local.c @@ -111,6 +111,7 @@ typedef struct { CamelFolder *real_folder; CamelStore *real_store; + char *description; char *real_path; struct _local_meta *meta; @@ -512,6 +513,48 @@ mlf_set_folder(MailLocalFolder *mlf, guint32 flags, CamelException *ex) return TRUE; } +static int +mlf_getv(CamelObject *object, CamelException *ex, CamelArgGetV *args) +{ + CamelFolder *folder = (CamelFolder *)object; + MailLocalFolder *mlf = (MailLocalFolder *)object; + int i, count=args->argc; + guint32 tag; + + for (i=0;i<args->argc;i++) { + CamelArgGet *arg = &args->argv[i]; + + tag = arg->tag; + + switch (tag & CAMEL_ARG_TAG) { + /* CamelObject args */ + case CAMEL_OBJECT_ARG_DESCRIPTION: + if (mlf->description == NULL) { + int pathlen; + + /* string to describe a local folder as the location of a message */ + pathlen = strlen(evolution_dir) + strlen("local") + 1; + if (strlen(folder->full_name) > pathlen) + mlf->description = g_strdup_printf(U_("Local folders/%s"), folder->full_name+pathlen); + else + mlf->description = g_strdup_printf(U_("Local folders/%s"), folder->name); + } + *arg->ca_str = mlf->description; + break; + default: + count--; + continue; + } + + arg->tag = (tag & CAMEL_ARG_TYPE) | CAMEL_ARG_IGNORE; + } + + if (count) + return ((CamelObjectClass *)mlf_parent_class)->getv(object, ex, args); + + return 0; +} + static void mlf_class_init (CamelObjectClass *camel_object_class) { @@ -533,6 +576,8 @@ mlf_class_init (CamelObjectClass *camel_object_class) camel_folder_class->set_message_user_tag = mlf_set_message_user_tag; camel_folder_class->rename = mlf_rename; + + camel_object_class->getv = mlf_getv; } static void |