diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-08-21 01:25:21 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-08-24 03:21:59 +0800 |
commit | 7c1ec3723ad7367449c93e8559c27158b24a51dd (patch) | |
tree | 643be187abc027398868d87a8befe88db5bc330e /modules/addressbook | |
parent | bd5e9031b9dc61669723f7ec6e0de3d7138a43d6 (diff) | |
download | gsoc2013-evolution-7c1ec3723ad7367449c93e8559c27158b24a51dd.tar gsoc2013-evolution-7c1ec3723ad7367449c93e8559c27158b24a51dd.tar.gz gsoc2013-evolution-7c1ec3723ad7367449c93e8559c27158b24a51dd.tar.bz2 gsoc2013-evolution-7c1ec3723ad7367449c93e8559c27158b24a51dd.tar.lz gsoc2013-evolution-7c1ec3723ad7367449c93e8559c27158b24a51dd.tar.xz gsoc2013-evolution-7c1ec3723ad7367449c93e8559c27158b24a51dd.tar.zst gsoc2013-evolution-7c1ec3723ad7367449c93e8559c27158b24a51dd.zip |
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);
Diffstat (limited to 'modules/addressbook')
-rw-r--r-- | modules/addressbook/e-book-shell-backend.c | 7 |
1 files changed, 3 insertions, 4 deletions
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), |