diff options
author | Dan Winship <danw@src.gnome.org> | 2000-07-02 07:07:18 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-07-02 07:07:18 +0800 |
commit | 98753e92d2b6bb52978c2ac9d38d29b8d2372978 (patch) | |
tree | 89bb98c0ad5d252931f0e65c9db1d904c8324d96 /camel/providers/mbox | |
parent | 6dabd2bd964e2e6692fa01261104fe4a510a0fa8 (diff) | |
download | gsoc2013-evolution-98753e92d2b6bb52978c2ac9d38d29b8d2372978.tar.gz gsoc2013-evolution-98753e92d2b6bb52978c2ac9d38d29b8d2372978.tar.zst gsoc2013-evolution-98753e92d2b6bb52978c2ac9d38d29b8d2372978.zip |
New method, to return an end-user-friendly name corresponding to a
* camel-service.c (camel_service_get_name): New method, to return
an end-user-friendly name corresponding to a service. (eg, "POP
service for danw on trna.helixcode.com").
* providers/imap/camel-imap-store.c,
providers/mbox/camel-mbox-store.c,
providers/nntp/camel-nntp-store.c,
providers/pop3/camel-pop3-store.c,
providers/sendmail/camel-sendmail-transport.c,
providers/smtp/camel-smtp-transport.c: Implement.
svn path=/trunk/; revision=3851
Diffstat (limited to 'camel/providers/mbox')
-rw-r--r-- | camel/providers/mbox/camel-mbox-store.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/camel/providers/mbox/camel-mbox-store.c b/camel/providers/mbox/camel-mbox-store.c index 42cb931927..19b7c54612 100644 --- a/camel/providers/mbox/camel-mbox-store.c +++ b/camel/providers/mbox/camel-mbox-store.c @@ -39,6 +39,7 @@ #define CF_CLASS(so) CAMEL_FOLDER_CLASS (GTK_OBJECT(so)->klass) #define CMBOXF_CLASS(so) CAMEL_MBOX_FOLDER_CLASS (GTK_OBJECT(so)->klass) +static char *get_name (CamelService *service, gboolean brief); static CamelFolder *get_folder (CamelStore *store, const char *folder_name, gboolean create, CamelException *ex); static void delete_folder (CamelStore *store, const char *folder_name, @@ -50,8 +51,11 @@ static void camel_mbox_store_class_init (CamelMboxStoreClass *camel_mbox_store_class) { CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS (camel_mbox_store_class); + CamelServiceClass *camel_service_class = CAMEL_SERVICE_CLASS (camel_mbox_store_class); /* virtual method overload */ + camel_service_class->get_name = get_name; + camel_store_class->get_folder = get_folder; camel_store_class->delete_folder = delete_folder; camel_store_class->get_folder_name = get_folder_name; @@ -229,3 +233,12 @@ get_folder_name (CamelStore *store, const char *folder_name, CamelException *ex) return *folder_name == '/' ? g_strdup (folder_name) : g_strdup_printf ("/%s", folder_name); } + +static char * +get_name (CamelService *service, gboolean brief) +{ + if (brief) + return g_strdup (service->url->path); + else + return g_strdup_printf ("Local mail file %s", service->url->path); +} |