diff options
author | Milan Crha <mcrha@redhat.com> | 2012-03-02 18:46:51 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2012-03-02 18:47:34 +0800 |
commit | 123c91f2412a0937ce1f55c4c7dda96fb0de5f5a (patch) | |
tree | 0d16eac9697452a211a1a03f383e2f0a53dd05cd /plugins/google-account-setup/google-source.c | |
parent | 89f5daa12878d33fecfd059c384a8b8ed6b08826 (diff) | |
download | gsoc2013-evolution-123c91f2412a0937ce1f55c4c7dda96fb0de5f5a.tar gsoc2013-evolution-123c91f2412a0937ce1f55c4c7dda96fb0de5f5a.tar.gz gsoc2013-evolution-123c91f2412a0937ce1f55c4c7dda96fb0de5f5a.tar.bz2 gsoc2013-evolution-123c91f2412a0937ce1f55c4c7dda96fb0de5f5a.tar.lz gsoc2013-evolution-123c91f2412a0937ce1f55c4c7dda96fb0de5f5a.tar.xz gsoc2013-evolution-123c91f2412a0937ce1f55c4c7dda96fb0de5f5a.tar.zst gsoc2013-evolution-123c91f2412a0937ce1f55c4c7dda96fb0de5f5a.zip |
Bug #663745 - Option to create Google Calendar not available
Diffstat (limited to 'plugins/google-account-setup/google-source.c')
-rw-r--r-- | plugins/google-account-setup/google-source.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/plugins/google-account-setup/google-source.c b/plugins/google-account-setup/google-source.c index 76dd8ae2c4..b6dde02bd5 100644 --- a/plugins/google-account-setup/google-source.c +++ b/plugins/google-account-setup/google-source.c @@ -35,6 +35,7 @@ #include <e-util/e-config.h> #include <e-util/e-plugin.h> #include <e-util/e-plugin-util.h> +#include <shell/e-shell.h> #include <calendar/gui/e-cal-config.h> #include <calendar/gui/e-cal-event.h> @@ -70,29 +71,23 @@ void e_calendar_google_migrate (EPlugin *epl, ECalEventTargetBackend *data); static void ensure_google_source_group (void) { - ESourceList *slist; - GError *error = NULL; + EShellBackend *backend; + ESourceList *source_list = NULL; - e_cal_client_get_sources ( - &slist, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, &error); + backend = e_shell_get_backend_by_name (e_shell_get_default (), "calendar"); + g_return_if_fail (backend != NULL); - if (error != NULL) { - g_warning ( - "%s: Could not get calendar source list: %s", - G_STRFUNC, error->message); - g_error_free (error); - return; - } + g_object_get (G_OBJECT (backend), "source-list", &source_list, NULL); + g_return_if_fail (source_list != NULL); - e_source_list_ensure_group (slist, _("Google"), GOOGLE_BASE_URI, FALSE); - g_object_unref (slist); + e_source_list_ensure_group (source_list, _("Google"), GOOGLE_BASE_URI, FALSE); + g_object_unref (source_list); } gint e_plugin_lib_enable (EPlugin *ep, gint enable) { - if (enable) { d(printf ("\n Google Eplugin starting up ...\n")); ensure_google_source_group (); |