From 98753e92d2b6bb52978c2ac9d38d29b8d2372978 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Sat, 1 Jul 2000 23:07:18 +0000 Subject: 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 --- camel/providers/nntp/camel-nntp-store.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'camel/providers/nntp') diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c index 765cd8796b..03ab14ccdb 100644 --- a/camel/providers/nntp/camel-nntp-store.c +++ b/camel/providers/nntp/camel-nntp-store.c @@ -58,7 +58,6 @@ static CamelServiceClass *service_class = NULL; static gboolean nntp_connect (CamelService *service, CamelException *ex); static gboolean nntp_disconnect (CamelService *service, CamelException *ex); - static CamelFolder * nntp_store_get_folder (CamelStore *store, const gchar *folder_name, gboolean get_folder, CamelException *ex) @@ -96,15 +95,25 @@ nntp_store_get_folder_name (CamelStore *store, const char *folder_name, return g_strdup (folder_name); } +static char * +nntp_store_get_name (CamelService *service, gboolean brief) +{ + /* Same info for long and brief... */ + return g_strdup_sprintf ("USENET news via %s", service->url->host); +} + static void camel_nntp_store_class_init (CamelNNTPStoreClass *camel_nntp_store_class) { CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS (camel_nntp_store_class); + CamelServiceClass *camel_store_class = CAMEL_SERVICE_CLASS (camel_nntp_store_class); service_class = gtk_type_class (camel_service_get_type ()); /* virtual method overload */ + camel_service_class->get_name = nntp_store_get_name; + camel_store_class->get_folder = nntp_store_get_folder; camel_store_class->get_folder_name = nntp_store_get_folder_name; } -- cgit v1.2.3