From 7c1ec3723ad7367449c93e8559c27158b24a51dd Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 20 Aug 2010 13:25:21 -0400 Subject: Add e_load_cal_source_async(). Similar to e_load_book_source_async() in libedataserverui (and may wind up there eventually). This replaces e_auth_new_cal_from_source(). void e_load_cal_source_async (ESource *source, ECalSourceType source_type, icaltimezone *default_zone, GtkWindow *parent, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); ECal * e_load_cal_source_finish (ESource *source, GAsyncResult *result, GError **error); --- modules/addressbook/e-book-shell-backend.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'modules/addressbook/e-book-shell-backend.c') diff --git a/modules/addressbook/e-book-shell-backend.c b/modules/addressbook/e-book-shell-backend.c index 5036796c93..aecc93efb7 100644 --- a/modules/addressbook/e-book-shell-backend.c +++ b/modules/addressbook/e-book-shell-backend.c @@ -228,15 +228,13 @@ action_contact_new_cb (GtkAction *action, /* This callback is used for both contacts and contact lists. */ - /* Dig out the EBookShellBackend's source list. */ shell = e_shell_window_get_shell (shell_window); shell_backend = e_shell_get_backend_by_name (shell, "addressbook"); + g_object_get (shell_backend, "source-list", &source_list, NULL); g_return_if_fail (E_IS_SOURCE_LIST (source_list)); client = e_shell_get_gconf_client (shell); - action_name = gtk_action_get_name (action); - key = "/apps/evolution/addressbook/display/primary_addressbook"; uid = gconf_client_get_string (client, key, NULL); @@ -250,13 +248,14 @@ action_contact_new_cb (GtkAction *action, g_return_if_fail (E_IS_SOURCE (source)); + /* Use a callback function appropriate for the action. */ + action_name = gtk_action_get_name (action); if (strcmp (action_name, "contact-new") == 0) e_load_book_source_async ( source, GTK_WINDOW (shell_window), NULL, (GAsyncReadyCallback) book_shell_backend_new_contact_cb, g_object_ref (shell)); - if (strcmp (action_name, "contact-new-list") == 0) e_load_book_source_async ( source, GTK_WINDOW (shell_window), -- cgit