[evolution-mapi] Adapt to API change in ESourceSelector



commit 9644f1526819c58ae9f7e0d4b1687e273508b2e5
Author: Milan Crha <mcrha redhat com>
Date:   Mon Apr 23 08:03:46 2012 +0200

    Adapt to API change in ESourceSelector

 .../e-mapi-account-settings.c                      |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/account-setup-eplugin/e-mapi-account-settings.c b/src/account-setup-eplugin/e-mapi-account-settings.c
index 3c94afc..ffc9eb3 100644
--- a/src/account-setup-eplugin/e-mapi-account-settings.c
+++ b/src/account-setup-eplugin/e-mapi-account-settings.c
@@ -609,12 +609,14 @@ get_selected_mapi_source (EShellView *shell_view,
 	g_object_get (shell_sidebar, "selector", &selector, NULL);
 	g_return_val_if_fail (selector != NULL, FALSE);
 
-	source = e_source_selector_peek_primary_selection (selector);
+	source = e_source_selector_ref_primary_selection (selector);
 	uri = source ? e_source_get_uri (source) : NULL;
-	if (uri && g_str_has_prefix (uri, "mapi://"))
-		source = g_object_ref (source);
-	else
-		source = NULL;
+	if (!uri || !g_str_has_prefix (uri, "mapi://")) {
+		if (source) {
+			g_object_unref (source);
+			source = NULL;
+		}
+	}
 
 	g_free (uri);
 	g_object_unref (selector);



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