[evolution-kolab/ek-wip-porting] CamelKolabIMAPXStore: applied upstream fixes to code dupe



commit 7f1e51ae97f154c73e8fe4a01a0d4d39ec322765
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Tue Jan 17 18:59:32 2012 +0100

    CamelKolabIMAPXStore: applied upstream fixes to code dupe
    
    * applied the fixes to CamelIMAPXStore::get_name()
      to the locally duped function

 src/camel/camel-kolab-imapx-store.c |   32 ++++++++++++++++++++------------
 1 files changed, 20 insertions(+), 12 deletions(-)
---
diff --git a/src/camel/camel-kolab-imapx-store.c b/src/camel/camel-kolab-imapx-store.c
index 0a0f95b..a2962ab 100644
--- a/src/camel/camel-kolab-imapx-store.c
+++ b/src/camel/camel-kolab-imapx-store.c
@@ -270,25 +270,33 @@ static gchar*
 kolab_imapx_store_get_name (CamelService *service,
                             gboolean brief)
 {
-	CamelNetworkSettings *network_settings = NULL;
-	CamelSettings *settings = NULL;
-	const gchar *host = NULL;
-	const gchar *user = NULL;
-	gchar *name = NULL;
+	/* This is an adjusted dupe of the CamelIMAPXStore
+	 * imapx_get_name() function. Upstream fixes need
+	 * to be applied here, too
+	 */
+
+	CamelNetworkSettings *network_settings;
+	CamelSettings *settings;
+	gchar *host;
+	gchar *user;
+	gchar *name;
 
-	g_assert (CAMEL_IS_SERVICE (service));
 	settings = camel_service_get_settings (service);
 
 	network_settings = CAMEL_NETWORK_SETTINGS (settings);
-	host = camel_network_settings_get_host (network_settings);
-	user = camel_network_settings_get_user (network_settings);
+	host = camel_network_settings_dup_host (network_settings);
+	user = camel_network_settings_dup_user (network_settings);
 
 	if (brief)
-		name = g_strdup_printf (_("Kolab server %s"),
-		                        host);
+		name = g_strdup_printf (
+			_("Kolab server %s"), host);
 	else
-		name = g_strdup_printf (_("Kolab service for user %s on host %s"),
-		                        user, host);
+		name = g_strdup_printf (
+			_("Kolab service for %s on %s"), user, host);
+
+	g_free (host);
+	g_free (user);
+
 	return name;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]