[evolution-data-server] Nudge ESource toward its new API.



commit 90eb7da3ab9b00f504f5fed1f740c59485356f41
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat Apr 21 13:20:23 2012 -0400

    Nudge ESource toward its new API.
    
    Rename e_source_peek_uid() to e_source_get_uid(), and
    e_source_peek_name() to e_source_get_display_name().
    
    The old names are retained for now as deprecated aliases.

 addressbook/backends/file/e-book-backend-file.c    |    2 +-
 addressbook/libebook/e-book-client.c               |    2 +-
 addressbook/libebook/e-book.c                      |    2 +-
 addressbook/libebook/e-destination.c               |    4 ++--
 .../backends/contacts/e-cal-backend-contacts.c     |   18 +++++++++---------
 calendar/backends/file/e-cal-backend-file.c        |    2 +-
 calendar/libecal/e-cal-client.c                    |    2 +-
 calendar/libecal/e-cal.c                           |    6 +++---
 .../libedataserver/libedataserver-sections.txt     |    6 ++++--
 libebackend/e-data-factory.c                       |    2 +-
 libedataserver/e-client.c                          |    2 +-
 libedataserver/e-source-group.c                    |   12 ++++++------
 libedataserver/e-source.c                          |   16 ++++++++--------
 libedataserver/e-source.h                          |    9 +++++++--
 libedataserverui/e-book-auth-util.c                |    4 ++--
 libedataserverui/e-client-utils.c                  |    2 +-
 libedataserverui/e-name-selector-entry.c           |    2 +-
 libedataserverui/e-name-selector.c                 |    2 +-
 libedataserverui/e-source-combo-box.c              |   12 ++++++------
 libedataserverui/e-source-selector-dialog.c        |    4 ++--
 libedataserverui/e-source-selector.c               |   16 ++++++++--------
 tests/libebook/client/test-client-examine.c        |    2 +-
 tests/libecal/client/test-client-examine.c         |    2 +-
 tests/libedataserver/test-source-list.c            |   10 +++++-----
 tests/libedataserverui/test-client-examine-auth.c  |    2 +-
 tests/libedataserverui/test-source-combo-box.c     |    2 +-
 tests/libedataserverui/test-source-selector.c      |    2 +-
 27 files changed, 77 insertions(+), 70 deletions(-)
---
diff --git a/addressbook/backends/file/e-book-backend-file.c b/addressbook/backends/file/e-book-backend-file.c
index 824e65f..d001d3e 100644
--- a/addressbook/backends/file/e-book-backend-file.c
+++ b/addressbook/backends/file/e-book-backend-file.c
@@ -335,7 +335,7 @@ e_book_backend_file_extract_path_from_source (ESource *source,
 	source_dir = e_source_peek_relative_uri (source);
 
 	if (!source_dir || !g_str_equal (source_dir, "system"))
-		source_dir = e_source_peek_uid (source);
+		source_dir = e_source_get_uid (source);
 
 	/* Mangle the URI to not contain invalid characters. */
 	mangled_source_dir = g_strdelimit (g_strdup (source_dir), ":/", '_');
diff --git a/addressbook/libebook/e-book-client.c b/addressbook/libebook/e-book-client.c
index 2d1a67d..729f191 100644
--- a/addressbook/libebook/e-book-client.c
+++ b/addressbook/libebook/e-book-client.c
@@ -761,7 +761,7 @@ e_book_client_set_default_source (ESource *source,
 		res = e_source_list_sync (source_list, error);
 	else
 		g_set_error (error, E_CLIENT_ERROR, E_CLIENT_ERROR_INVALID_ARG,
-			_("There was no source for UID '%s' stored in a source list."), e_source_peek_uid (source));
+			_("There was no source for UID '%s' stored in a source list."), e_source_get_uid (source));
 
 	g_object_unref (source_list);
 
diff --git a/addressbook/libebook/e-book.c b/addressbook/libebook/e-book.c
index d36b394..7b51b1c 100644
--- a/addressbook/libebook/e-book.c
+++ b/addressbook/libebook/e-book.c
@@ -3182,7 +3182,7 @@ e_book_set_default_source (ESource *source,
 
 	g_return_val_if_fail (E_IS_SOURCE (source), FALSE);
 
-	uid = e_source_peek_uid (source);
+	uid = e_source_get_uid (source);
 
 	if (!e_book_get_addressbooks (&sources, &err)) {
 		if (error)
diff --git a/addressbook/libebook/e-destination.c b/addressbook/libebook/e-destination.c
index 28ed6a7..c9f2536 100644
--- a/addressbook/libebook/e-destination.c
+++ b/addressbook/libebook/e-destination.c
@@ -560,7 +560,7 @@ e_destination_set_book (EDestination *dest,
 	g_return_if_fail (book && E_IS_BOOK (book));
 
 	source = e_book_get_source (book);
-	uid = e_source_peek_uid (source);
+	uid = e_source_get_uid (source);
 	g_return_if_fail (uid != NULL);
 
 	if (!dest->priv->source_uid || strcmp (uid, dest->priv->source_uid)) {
@@ -592,7 +592,7 @@ e_destination_set_client (EDestination *dest,
 	g_return_if_fail (client && E_IS_BOOK_CLIENT (client));
 
 	source = e_client_get_source (E_CLIENT (client));
-	uid = e_source_peek_uid (source);
+	uid = e_source_get_uid (source);
 	g_return_if_fail (uid != NULL);
 
 	if (!dest->priv->source_uid || strcmp (uid, dest->priv->source_uid)) {
diff --git a/calendar/backends/contacts/e-cal-backend-contacts.c b/calendar/backends/contacts/e-cal-backend-contacts.c
index d0e19d7..33a58e9 100644
--- a/calendar/backends/contacts/e-cal-backend-contacts.c
+++ b/calendar/backends/contacts/e-cal-backend-contacts.c
@@ -134,7 +134,7 @@ book_client_authenticate_cb (EClient *client,
 
 	source = e_client_get_source (client);
 
-	source_uid = e_source_peek_uid (source);
+	source_uid = e_source_get_uid (source);
 	g_return_val_if_fail (source_uid != NULL, FALSE);
 
 	use_credentials = g_hash_table_lookup (cbc->priv->credentials, source_uid);
@@ -213,7 +213,7 @@ book_client_authenticate_cb (EClient *client,
 
 		reason = e_credentials_get (credentials, E_CREDENTIALS_KEY_PROMPT_REASON);
 		username_markup = g_markup_printf_escaped ("<b>%s</b>", e_credentials_peek (credentials, E_CREDENTIALS_KEY_USERNAME));
-		source_name_markup = g_markup_printf_escaped ("<b>%s</b>", e_source_peek_name (source));
+		source_name_markup = g_markup_printf_escaped ("<b>%s</b>", e_source_get_display_name (source));
 
 		if (reason && *reason)
 			prompt = g_strdup_printf (_("Enter password for address book %s (user %s)\nReason: %s"), source_name_markup, username_markup, reason);
@@ -229,7 +229,7 @@ book_client_authenticate_cb (EClient *client,
 	}
 
 	e_credentials_set (credentials, E_CREDENTIALS_KEY_FOREIGN_REQUEST, "1");
-	e_credentials_set (credentials, CBC_CREDENTIALS_KEY_SOURCE_UID, e_source_peek_uid (source));
+	e_credentials_set (credentials, CBC_CREDENTIALS_KEY_SOURCE_UID, e_source_get_uid (source));
 
 	/* this is a reprompt, set proper flags */
 	if (use_credentials) {
@@ -330,7 +330,7 @@ book_client_opened_cb (EBookClient *book_client,
 	g_signal_handlers_disconnect_by_func (book_client, G_CALLBACK (book_client_opened_cb), cbc);
 
 	source = e_client_get_source (E_CLIENT (book_client));
-	source_uid = e_source_peek_uid (source);
+	source_uid = e_source_get_uid (source);
 	g_return_if_fail (source_uid != NULL);
 
 	if (source_uid) {
@@ -372,7 +372,7 @@ book_client_opened_cb (EBookClient *book_client,
 		e_book_query_unref (query);
 
 		if (!e_book_client_get_view_sync (book_client, query_sexp, &book_view, NULL, &error))
-			g_warning ("%s: Failed to get book view on '%s': %s", G_STRFUNC, e_source_peek_name (source), error ? error->message : "Unknown error");
+			g_warning ("%s: Failed to get book view on '%s': %s", G_STRFUNC, e_source_get_display_name (source), error ? error->message : "Unknown error");
 		g_free (query_sexp);
 		g_clear_error (&error);
 
@@ -622,7 +622,7 @@ add_source (ECalBackendContacts *cbc,
             ESource *source)
 {
 	BookRecord *br = book_record_new (cbc, source);
-	const gchar *uid = e_source_peek_uid (source);
+	const gchar *uid = e_source_get_uid (source);
 
 	if (!br)
 		return;
@@ -649,7 +649,7 @@ source_removed_cb (ESourceGroup *group,
                    gpointer user_data)
 {
 	ECalBackendContacts *cbc = E_CAL_BACKEND_CONTACTS (user_data);
-	const gchar          *uid = e_source_peek_uid (source);
+	const gchar          *uid = e_source_get_uid (source);
 
 	g_return_if_fail (cbc);
 
@@ -679,7 +679,7 @@ source_list_changed_cb (ESourceList *source_list,
 			if (!source)
 				continue;
 
-			uid = e_source_peek_uid (source);
+			uid = e_source_get_uid (source);
 			if (!uid)
 				continue;
 
@@ -726,7 +726,7 @@ source_group_removed_cb (ESourceList *source_list,
         /* Unload all address books from this group */
 	for (i = e_source_group_peek_sources (group); i; i = i->next) {
 		ESource *source = E_SOURCE (i->data);
-		const gchar *uid = e_source_peek_uid (source);
+		const gchar *uid = e_source_get_uid (source);
 
 		g_hash_table_remove (cbc->priv->addressbooks, uid);
 		g_hash_table_remove (cbc->priv->credentials, uid);
diff --git a/calendar/backends/file/e-cal-backend-file.c b/calendar/backends/file/e-cal-backend-file.c
index 48b7212..54eaf6f 100644
--- a/calendar/backends/file/e-cal-backend-file.c
+++ b/calendar/backends/file/e-cal-backend-file.c
@@ -3484,7 +3484,7 @@ cal_backend_file_constructed (GObject *object)
 
 	source_dir = e_source_peek_relative_uri (source);
 	if (!source_dir || !g_str_equal (source_dir, "system"))
-		source_dir = e_source_peek_uid (source);
+		source_dir = e_source_get_uid (source);
 
 	/* Mangle the URI to not contain invalid characters. */
 	mangled_source_dir = g_strdelimit (g_strdup (source_dir), ":/", '_');
diff --git a/calendar/libecal/e-cal-client.c b/calendar/libecal/e-cal-client.c
index bb8151f..38bd24f 100644
--- a/calendar/libecal/e-cal-client.c
+++ b/calendar/libecal/e-cal-client.c
@@ -902,7 +902,7 @@ e_cal_client_set_default_source (ESource *source,
 		res = e_source_list_sync (source_list, error);
 	else
 		g_set_error (error, E_CLIENT_ERROR, E_CLIENT_ERROR_INVALID_ARG,
-			_("There was no source for UID '%s' stored in a source list."), e_source_peek_uid (source));
+			_("There was no source for UID '%s' stored in a source list."), e_source_get_uid (source));
 
 	g_object_unref (source_list);
 
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index 2a9bca1..9d99dd6 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -889,7 +889,7 @@ call_authenticate_user (ECal *cal,
 		}
 
 		prompt = g_strdup_printf (_("Enter password for %s (user %s)"),
-				e_source_peek_name (priv->source), username);
+				e_source_get_display_name (priv->source), username);
 
 		auth_type = e_source_get_duped_property (priv->source, "auth-type");
 		if (auth_type)
@@ -902,7 +902,7 @@ call_authenticate_user (ECal *cal,
 				 * This password prompt will be prompted rarely. Since the key that is passed to
 				 * the auth_func corresponds to the parent user.
 				 */
-				prompt = g_strdup_printf (_("Enter password for %s to enable proxy for user %s"), e_source_peek_name (priv->source), parent_user);
+				prompt = g_strdup_printf (_("Enter password for %s to enable proxy for user %s"), e_source_get_display_name (priv->source), parent_user);
 				g_free (parent_user);
 			} else
 				key = g_strdup (e_cal_get_uri (cal));
@@ -4723,7 +4723,7 @@ set_default_source (ESourceList *sources,
 	GError *err = NULL;
 	GSList *g;
 
-	uid = e_source_peek_uid (source);
+	uid = e_source_get_uid (source);
 
 	/* make sure the source is actually in the ESourceList.  if
 	 * it's not we don't bother adding it, just return an error */
diff --git a/docs/reference/libedataserver/libedataserver-sections.txt b/docs/reference/libedataserver/libedataserver-sections.txt
index aa5cbbb..8d981b7 100644
--- a/docs/reference/libedataserver/libedataserver-sections.txt
+++ b/docs/reference/libedataserver/libedataserver-sections.txt
@@ -397,8 +397,8 @@ e_source_set_absolute_uri
 e_source_set_color_spec
 e_source_set_readonly
 e_source_peek_group
-e_source_peek_uid
-e_source_peek_name
+e_source_get_uid
+e_source_get_display_name
 e_source_peek_relative_uri
 e_source_peek_absolute_uri
 e_source_peek_color_spec
@@ -413,6 +413,8 @@ e_source_get_duped_property
 e_source_build_absolute_uri
 e_source_equal
 e_source_xmlstr_equal
+e_source_peek_uid
+e_source_peek_name
 <SUBSECTION Standard>
 E_SOURCE
 E_IS_SOURCE
diff --git a/libebackend/e-data-factory.c b/libebackend/e-data-factory.c
index 8f5dfe7d..dded87f 100644
--- a/libebackend/e-data-factory.c
+++ b/libebackend/e-data-factory.c
@@ -224,7 +224,7 @@ e_data_factory_ref_backend (EDataFactory *data_factory,
 	g_return_val_if_fail (hash_key != NULL, NULL);
 	g_return_val_if_fail (E_IS_SOURCE (source), NULL);
 
-	uid = e_source_peek_uid (source);
+	uid = e_source_get_uid (source);
 	g_return_val_if_fail (uid != NULL, NULL);
 
 	g_mutex_lock (data_factory->priv->mutex);
diff --git a/libedataserver/e-client.c b/libedataserver/e-client.c
index 278fbcd..f2d7bc5 100644
--- a/libedataserver/e-client.c
+++ b/libedataserver/e-client.c
@@ -1875,7 +1875,7 @@ e_client_util_set_default (ESourceList *source_list,
 	g_return_val_if_fail (source != NULL, FALSE);
 	g_return_val_if_fail (E_IS_SOURCE (source), FALSE);
 
-	uid = e_source_peek_uid (source);
+	uid = e_source_get_uid (source);
 
 	/* make sure the source is actually in the ESourceList.  If
 	 * it's not we don't bother adding it, just return an error */
diff --git a/libedataserver/e-source-group.c b/libedataserver/e-source-group.c
index c16d264..99fcb8a 100644
--- a/libedataserver/e-source-group.c
+++ b/libedataserver/e-source-group.c
@@ -703,7 +703,7 @@ e_source_group_peek_source_by_uid (ESourceGroup *group,
 	GSList *p;
 
 	for (p = group->priv->sources; p != NULL; p = p->next) {
-		if (strcmp (e_source_peek_uid (E_SOURCE (p->data)), uid) == 0)
+		if (strcmp (e_source_get_uid (E_SOURCE (p->data)), uid) == 0)
 			return E_SOURCE (p->data);
 	}
 
@@ -722,7 +722,7 @@ e_source_group_peek_source_by_name (ESourceGroup *group,
 	GSList *p;
 
 	for (p = group->priv->sources; p != NULL; p = p->next) {
-		if (strcmp (e_source_peek_name (E_SOURCE (p->data)), name) == 0)
+		if (strcmp (e_source_get_display_name (E_SOURCE (p->data)), name) == 0)
 			return E_SOURCE (p->data);
 	}
 
@@ -739,7 +739,7 @@ e_source_group_add_source (ESourceGroup *group,
 	if (group->priv->readonly)
 		return FALSE;
 
-	if (e_source_group_peek_source_by_uid (group, e_source_peek_uid (source)) != NULL)
+	if (e_source_group_peek_source_by_uid (group, e_source_get_uid (source)) != NULL)
 		return FALSE;
 
 	e_source_set_group (source, group);
@@ -798,7 +798,7 @@ e_source_group_remove_source_by_uid (ESourceGroup *group,
 	for (p = group->priv->sources; p != NULL; p = p->next) {
 		ESource *source = E_SOURCE (p->data);
 
-		if (strcmp (e_source_peek_uid (source), uid) == 0) {
+		if (strcmp (e_source_get_uid (source), uid) == 0) {
 			group->priv->sources = g_slist_remove_link (group->priv->sources, p);
 			g_signal_handlers_disconnect_by_func (source,
 							      G_CALLBACK (source_changed_callback),
@@ -858,7 +858,7 @@ static gint
 find_esource_from_uid (gconstpointer a,
                        gconstpointer b)
 {
-	return g_ascii_strcasecmp (e_source_peek_uid ((ESource *)(a)), (gchar *)(b));
+	return g_ascii_strcasecmp (e_source_get_uid ((ESource *)(a)), (gchar *)(b));
 }
 
 static gboolean
@@ -872,7 +872,7 @@ compare_source_lists (GSList *a,
 		return FALSE;
 
 	for (l = a; l != NULL && retval; l = l->next) {
-		GSList *elem = g_slist_find_custom (b, e_source_peek_uid ((ESource *)(l->data)), (GCompareFunc) find_esource_from_uid);
+		GSList *elem = g_slist_find_custom (b, e_source_get_uid ((ESource *)(l->data)), (GCompareFunc) find_esource_from_uid);
 
 		if (!elem || !e_source_equal ((ESource *)(l->data), (ESource *)(elem->data)))
 			retval = FALSE;
diff --git a/libedataserver/e-source.c b/libedataserver/e-source.c
index f7d1ab7..d33d10b 100644
--- a/libedataserver/e-source.c
+++ b/libedataserver/e-source.c
@@ -740,7 +740,7 @@ e_source_peek_group (ESource *source)
 }
 
 /**
- * e_source_peek_uid:
+ * e_source_get_uid:
  * @source: an #ESource
  *
  * Returns the unique identifier string for @source.
@@ -748,7 +748,7 @@ e_source_peek_group (ESource *source)
  * Returns: the source's unique ID
  **/
 const gchar *
-e_source_peek_uid (ESource *source)
+e_source_get_uid (ESource *source)
 {
 	g_return_val_if_fail (E_IS_SOURCE (source), NULL);
 
@@ -756,7 +756,7 @@ e_source_peek_uid (ESource *source)
 }
 
 /**
- * e_source_peek_name:
+ * e_source_get_display_name:
  * @source: an #ESource
  *
  * Returns the display name for @source.
@@ -764,7 +764,7 @@ e_source_peek_uid (ESource *source)
  * Returns: the source's display name
  **/
 const gchar *
-e_source_peek_name (ESource *source)
+e_source_get_display_name (ESource *source)
 {
 	g_return_val_if_fail (E_IS_SOURCE (source), NULL);
 
@@ -895,8 +895,8 @@ dump_common_to_xml_node (ESource *source,
 	else
 		node = xmlNewNode (NULL, (xmlChar *)"source");
 
-	xmlSetProp (node, (xmlChar *)"uid", (xmlChar *)e_source_peek_uid (source));
-	xmlSetProp (node, (xmlChar *)"name", (xmlChar *)e_source_peek_name (source));
+	xmlSetProp (node, (xmlChar *)"uid", (xmlChar *)e_source_get_uid (source));
+	xmlSetProp (node, (xmlChar *)"name", (xmlChar *)e_source_get_display_name (source));
 	abs_uri = e_source_peek_absolute_uri (source);
 	/* do not store absolute uris for local:system sources */
 	relative_uri = e_source_peek_relative_uri (source);
@@ -1230,9 +1230,9 @@ e_source_copy (ESource *source)
 	g_return_val_if_fail (E_IS_SOURCE (source), NULL);
 
 	new_source = g_object_new (E_TYPE_SOURCE, NULL);
-	new_source->priv->uid = g_strdup (e_source_peek_uid (source));
+	new_source->priv->uid = g_strdup (e_source_get_uid (source));
 
-	e_source_set_name (new_source, e_source_peek_name (source));
+	e_source_set_name (new_source, e_source_get_display_name (source));
 
 	new_source->priv->color_spec =
 		g_strdup (source->priv->color_spec);
diff --git a/libedataserver/e-source.h b/libedataserver/e-source.h
index bcfea16..5dbf056 100644
--- a/libedataserver/e-source.h
+++ b/libedataserver/e-source.h
@@ -99,8 +99,8 @@ void		e_source_set_readonly		(ESource *source,
 						 gboolean readonly);
 struct _ESourceGroup *
 		e_source_peek_group		(ESource *source);
-const gchar *	e_source_peek_uid		(ESource *source);
-const gchar *	e_source_peek_name		(ESource *source);
+const gchar *	e_source_get_uid		(ESource *source);
+const gchar *	e_source_get_display_name	(ESource *source);
 const gchar *	e_source_peek_relative_uri	(ESource *source);
 const gchar *	e_source_peek_absolute_uri	(ESource *source);
 const gchar *	e_source_peek_color_spec	(ESource *source);
@@ -125,6 +125,11 @@ gboolean	e_source_equal			(ESource *a,
 gboolean	e_source_xmlstr_equal		(const gchar *a,
 						 const gchar *b);
 
+#ifndef EDS_DISABLE_DEPRECATED
+#define e_source_peek_uid		e_source_get_uid
+#define e_source_peek_name		e_source_get_display_name
+#endif /* EDS_DISABLE_DEPRECATED */
+
 G_END_DECLS
 
 #endif /* E_SOURCE_H */
diff --git a/libedataserverui/e-book-auth-util.c b/libedataserverui/e-book-auth-util.c
index 3a29148..03e0e14 100644
--- a/libedataserverui/e-book-auth-util.c
+++ b/libedataserverui/e-book-auth-util.c
@@ -202,7 +202,7 @@ addressbook_authenticate (EBook *book,
 		}
 
 		password_prompt = g_strdup_printf (_("Enter password for %s (user %s)"),
-						   e_source_peek_name (source), user);
+						   e_source_get_display_name (source), user);
 
 		prompt = g_strconcat (failed_auth, password_prompt, NULL);
 		g_free (password_prompt);
@@ -426,7 +426,7 @@ load_book_source_password_prompt (EBook *book,
 
 	g_string_append_printf (
 		string, _("Enter password for %s (user %s)"),
-		e_source_peek_name (source), context->auth_username);
+		e_source_get_display_name (source), context->auth_username);
 
 	/* XXX Dialog windows should not have titles. */
 	title = "";
diff --git a/libedataserverui/e-client-utils.c b/libedataserverui/e-client-utils.c
index 0fb44ae..603aa3d 100644
--- a/libedataserverui/e-client-utils.c
+++ b/libedataserverui/e-client-utils.c
@@ -855,7 +855,7 @@ e_client_utils_authenticate_handler (EClient *client,
 
 		reason = e_credentials_get (credentials, E_CREDENTIALS_KEY_PROMPT_REASON);
 		username_markup = g_markup_printf_escaped ("<b>%s</b>", e_credentials_peek (credentials, E_CREDENTIALS_KEY_USERNAME));
-		source_name_markup = g_markup_printf_escaped ("<b>%s</b>", e_source_peek_name (source));
+		source_name_markup = g_markup_printf_escaped ("<b>%s</b>", e_source_get_display_name (source));
 
 		if (is_cal) {
 			switch (e_cal_client_get_source_type (E_CAL_CLIENT (client))) {
diff --git a/libedataserverui/e-name-selector-entry.c b/libedataserverui/e-name-selector-entry.c
index 7826d8f..62e5df1 100644
--- a/libedataserverui/e-name-selector-entry.c
+++ b/libedataserverui/e-name-selector-entry.c
@@ -2398,7 +2398,7 @@ find_client_by_contact (GSList *clients,
 			if (!source)
 				continue;
 
-			if (g_strcmp0 (source_uid, e_source_peek_uid (source)) == 0)
+			if (g_strcmp0 (source_uid, e_source_get_uid (source)) == 0)
 				return client;
 		}
 	}
diff --git a/libedataserverui/e-name-selector.c b/libedataserverui/e-name-selector.c
index 82280e3..7f1362d 100644
--- a/libedataserverui/e-name-selector.c
+++ b/libedataserverui/e-name-selector.c
@@ -107,7 +107,7 @@ name_selector_book_loaded_cb (GObject *source_object,
 		    && !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
 			g_warning (
 				"ENameSelector: Could not load \"%s\": %s",
-				e_source_peek_name (source), error->message);
+				e_source_get_display_name (source), error->message);
 		g_error_free (error);
 		goto exit;
 	}
diff --git a/libedataserverui/e-source-combo-box.c b/libedataserverui/e-source-combo-box.c
index 0e632a5..996aa37 100644
--- a/libedataserverui/e-source-combo-box.c
+++ b/libedataserverui/e-source-combo-box.c
@@ -63,8 +63,8 @@ compare_source_names (ESource *source_a,
 	g_return_val_if_fail (E_IS_SOURCE (source_a), -1);
 	g_return_val_if_fail (E_IS_SOURCE (source_b),  1);
 
-	name_a = e_source_peek_name (source_a);
-	name_b = e_source_peek_name (source_b);
+	name_a = e_source_get_display_name (source_a);
+	name_b = e_source_get_display_name (source_b);
 
 	return g_utf8_collate (name_a, name_b);
 }
@@ -136,7 +136,7 @@ source_list_changed_cb (ESourceList *source_list,
 			const gchar *color_spec;
 			GdkColor color;
 
-			name = e_source_peek_name (s->data);
+			name = e_source_get_display_name (s->data);
 			indented_name = g_strconcat ("    ", name, NULL);
 
 			color_spec = e_source_peek_color_spec (s->data);
@@ -155,7 +155,7 @@ source_list_changed_cb (ESourceList *source_list,
 				COLUMN_SOURCE, s->data,
 				-1);
 
-			uid = e_source_peek_uid (s->data);
+			uid = e_source_get_uid (s->data);
 			path = gtk_tree_model_get_path (model, &iter);
 			g_hash_table_replace (
 				priv->uid_index, g_strdup (uid),
@@ -466,7 +466,7 @@ e_source_combo_box_set_active (ESourceComboBox *combo_box,
 	g_return_if_fail (E_IS_SOURCE (source));
 
 	e_source_combo_box_set_active_uid (
-		combo_box, e_source_peek_uid (source));
+		combo_box, e_source_get_uid (source));
 }
 
 /**
@@ -491,7 +491,7 @@ e_source_combo_box_get_active_uid (ESourceComboBox *combo_box)
 	if (source == NULL)
 		return NULL;
 
-	return e_source_peek_uid (source);
+	return e_source_get_uid (source);
 }
 
 /**
diff --git a/libedataserverui/e-source-selector-dialog.c b/libedataserverui/e-source-selector-dialog.c
index a3c20a0..34c47ff 100644
--- a/libedataserverui/e-source-selector-dialog.c
+++ b/libedataserverui/e-source-selector-dialog.c
@@ -75,8 +75,8 @@ primary_selection_changed_cb (ESourceSelector *selector,
 		if (except_source != NULL) {
 			const gchar *except_uid, *selected_uid;
 
-			except_uid = e_source_peek_uid (except_source);
-			selected_uid = e_source_peek_uid (priv->selected_source);
+			except_uid = e_source_get_uid (except_source);
+			selected_uid = e_source_get_uid (priv->selected_source);
 
 			if (except_uid && selected_uid && g_str_equal (except_uid, selected_uid))
 				priv->selected_source = NULL;
diff --git a/libedataserverui/e-source-selector.c b/libedataserverui/e-source-selector.c
index 374e56d..b827f2a 100644
--- a/libedataserverui/e-source-selector.c
+++ b/libedataserverui/e-source-selector.c
@@ -272,7 +272,7 @@ rebuild_existing_cb (GtkTreeModel *model,
 			rebuild_data->deleted_uids = g_slist_append (
 				rebuild_data->deleted_uids, reference);
 	} else {
-		uid = e_source_peek_uid (E_SOURCE (node));
+		uid = e_source_get_uid (E_SOURCE (node));
 
 		if (e_source_list_peek_source_by_uid (source_list, uid)) {
 			g_hash_table_insert (
@@ -332,8 +332,8 @@ compare_source_names (gconstpointer a,
 	g_return_val_if_fail (E_IS_SOURCE (a), -1);
 	g_return_val_if_fail (E_IS_SOURCE (b),  1);
 
-	name_a = e_source_peek_name (E_SOURCE (a));
-	name_b = e_source_peek_name (E_SOURCE (b));
+	name_a = e_source_get_display_name (E_SOURCE (a));
+	name_b = e_source_get_display_name (E_SOURCE (b));
 
 	return g_utf8_collate (name_a, name_b);
 }
@@ -431,7 +431,7 @@ rebuild_model (ESourceSelector *selector)
 
 			reference = g_hash_table_lookup (
 				rebuild_data->remaining_uids,
-				e_source_peek_uid (source));
+				e_source_get_uid (source));
 
 			if (reference == NULL) {
 				if (selector->priv->select_new) {
@@ -493,7 +493,7 @@ same_source_name_exists (ESourceSelector *selector,
 					gtk_tree_model_get (model, &source_iter, 0, &data, -1);
 					g_assert (E_IS_SOURCE (data));
 
-					source_name = e_source_peek_name (E_SOURCE (data));
+					source_name = e_source_get_display_name (E_SOURCE (data));
 					if (source_name && g_str_equal (name, source_name)) {
 						g_object_unref (data);
 
@@ -589,7 +589,7 @@ text_cell_data_func (GtkTreeViewColumn *column,
 		source = E_SOURCE (data);
 
 		g_object_set (renderer,
-			      "text", e_source_peek_name (source),
+			      "text", e_source_get_display_name (source),
 			      "weight", PANGO_WEIGHT_NORMAL,
 			      "foreground_set", FALSE,
 			      NULL);
@@ -778,7 +778,7 @@ group_search_function (GtkTreeModel *model,
 	else {
 		g_assert (E_IS_SOURCE (data));
 
-		name = e_source_peek_name (E_SOURCE (data));
+		name = e_source_get_display_name (E_SOURCE (data));
 	}
 
 	if (name)
@@ -1913,7 +1913,7 @@ e_source_selector_set_primary_selection (ESourceSelector *selector,
 		gtk_tree_path_free (path);
 	} else {
 		g_warning (G_STRLOC ": Cannot find source %p (%s) in selector %p",
-			   (gpointer) source, e_source_peek_name (source),
+			   (gpointer) source, e_source_get_display_name (source),
 			   (gpointer) selector);
 	}
 }
diff --git a/tests/libebook/client/test-client-examine.c b/tests/libebook/client/test-client-examine.c
index 1124d50..e394bbe 100644
--- a/tests/libebook/client/test-client-examine.c
+++ b/tests/libebook/client/test-client-examine.c
@@ -123,7 +123,7 @@ identify_source (ESource *source)
 
 	g_return_if_fail (source != NULL);
 
-	name = e_source_peek_name (source);
+	name = e_source_get_display_name (source);
 	if (!name)
 		name = "Unknown name";
 
diff --git a/tests/libecal/client/test-client-examine.c b/tests/libecal/client/test-client-examine.c
index 8151ffe..8ca0803 100644
--- a/tests/libecal/client/test-client-examine.c
+++ b/tests/libecal/client/test-client-examine.c
@@ -169,7 +169,7 @@ identify_source (ESource *source,
 		break;
 	}
 
-	name = e_source_peek_name (source);
+	name = e_source_get_display_name (source);
 	if (!name)
 		name = "Unknown name";
 
diff --git a/tests/libedataserver/test-source-list.c b/tests/libedataserver/test-source-list.c
index 20d324d..68f171f 100644
--- a/tests/libedataserver/test-source-list.c
+++ b/tests/libedataserver/test-source-list.c
@@ -89,8 +89,8 @@ dump_source (ESource *source)
 	gchar *uri = e_source_get_uri (source);
 	const gchar *color_spec;
 
-	g_print ("\tSource %s\n", e_source_peek_uid (source));
-	g_print ("\t\tname: %s\n", e_source_peek_name (source));
+	g_print ("\tSource %s\n", e_source_get_uid (source));
+	g_print ("\t\tname: %s\n", e_source_get_display_name (source));
 	g_print ("\t\trelative_uri: %s\n", e_source_peek_relative_uri (source));
 	g_print ("\t\tabsolute_uri: %s\n", uri);
 
@@ -162,7 +162,7 @@ source_changed_callback (ESource *source)
 {
 	static gint count = 0;
 
-	g_print ("** Event: source \"%s\" changed (%d)\n", e_source_peek_name (source), ++count);
+	g_print ("** Event: source \"%s\" changed (%d)\n", e_source_get_display_name (source), ++count);
 
 	dump_on_idle ();
 }
@@ -246,7 +246,7 @@ source_added_callback (ESourceGroup *group,
 {
 	static gint count = 0;
 
-	g_print ("** Event: source \"%s\" added (%d)\n", e_source_peek_name (source), ++count);
+	g_print ("** Event: source \"%s\" added (%d)\n", e_source_get_display_name (source), ++count);
 
 	connect_source (source);
 	dump_on_idle ();
@@ -258,7 +258,7 @@ source_removed_callback (ESourceGroup *group,
 {
 	static gint count = 0;
 
-	g_print ("** Event: source \"%s\" removed (%d)\n", e_source_peek_name (source), ++count);
+	g_print ("** Event: source \"%s\" removed (%d)\n", e_source_get_display_name (source), ++count);
 
 	disconnect_source (source);
 	dump_on_idle ();
diff --git a/tests/libedataserverui/test-client-examine-auth.c b/tests/libedataserverui/test-client-examine-auth.c
index 3efee31..5c8bc26 100644
--- a/tests/libedataserverui/test-client-examine-auth.c
+++ b/tests/libedataserverui/test-client-examine-auth.c
@@ -122,7 +122,7 @@ identify_source (ESource *source)
 
 	g_return_if_fail (source != NULL);
 
-	name = e_source_peek_name (source);
+	name = e_source_get_display_name (source);
 	if (!name)
 		name = "Unknown name";
 
diff --git a/tests/libedataserverui/test-source-combo-box.c b/tests/libedataserverui/test-source-combo-box.c
index b144549..348d001 100644
--- a/tests/libedataserverui/test-source-combo-box.c
+++ b/tests/libedataserverui/test-source-combo-box.c
@@ -28,7 +28,7 @@ source_changed_cb (ESourceComboBox *combo_box)
 	ESource *source;
 
 	source = e_source_combo_box_get_active (combo_box);
-	g_print ("source selected: \"%s\"\n", e_source_peek_name (source));
+	g_print ("source selected: \"%s\"\n", e_source_get_display_name (source));
 }
 
 static gint
diff --git a/tests/libedataserverui/test-source-selector.c b/tests/libedataserverui/test-source-selector.c
index ae899c7..93dc577 100644
--- a/tests/libedataserverui/test-source-selector.c
+++ b/tests/libedataserverui/test-source-selector.c
@@ -38,7 +38,7 @@ dump_selection (ESourceSelector *selector)
 			ESource *source = E_SOURCE (p->data);
 
 			g_print ("\tSource %s (group %s)\n",
-				 e_source_peek_name (source),
+				 e_source_get_display_name (source),
 				 e_source_group_peek_name (e_source_peek_group (source)));
 		}
 	}



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