aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/google-account-setup
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/google-account-setup')
-rw-r--r--plugins/google-account-setup/ChangeLog170
-rw-r--r--plugins/google-account-setup/Makefile.am6
-rw-r--r--plugins/google-account-setup/google-contacts-source.c5
-rw-r--r--plugins/google-account-setup/google-source.c77
4 files changed, 48 insertions, 210 deletions
diff --git a/plugins/google-account-setup/ChangeLog b/plugins/google-account-setup/ChangeLog
deleted file mode 100644
index 43513257b7..0000000000
--- a/plugins/google-account-setup/ChangeLog
+++ /dev/null
@@ -1,170 +0,0 @@
-2009-04-24 Milan Crha <mcrha@redhat.com>
-
- ** Part of fix for bug #569652
-
- * google-contacts-source.h: (manage_google_group):
- * google-contacts-source.c: (manage_google_group):
- Removed.
-
- * google-contacts-source.c: (ensure_google_contacts_source_group),
- (remove_google_contacts_source_group):
- * google-source.c: (ensure_google_source_group):
- Use new ESourceList API (simplifies code).
-
-2009-04-24 Milan Crha <mcrha@redhat.com>
-
- ** Fix for bug #572348
-
- * google-source.c: Remove deprecated Gtk+ symbols.
-
-2009-04-09 Milan Crha <mcrha@redhat.com>
-
- ** Fix for bug #574248
-
- * google-contacts-source.c: (plugin_google_contacts):
- * google-source.c: (plugin_google):
- Compare base URI case insensitively.
-
-2009-04-07 Tobias Mueller <tobiasmue@gnome.org>
-
- ** Fixes bug #578034
-
- * google-source.c (claim_error):
- Call gtk_message_dialog_new with a proper format string.
-
-2009-02-26 Matthew Barnes <mbarnes@redhat.com>
-
- ** Fixes part of bug #572950
-
- * Makefile.am:
- Fix ordering of -I compiler directives. Patch by Daniel Macks.
-
-2009-02-25 Milan Crha <mcrha@redhat.com>
-
- ** Part of fix for bug #559719
-
- * google-contacts-source.c: (struct ui_data), (destroy_ui_data),
- (plugin_google_contacts): Use it's own/unique name for the property
- on the 'epl' and free the widget only if it wasn't freed yet.
-
-2009-01-29 Milan Crha <mcrha@redhat.com>
-
- ** Fix for bug #539467
-
- * google-contacts-source.h: (manage_google_group):
- * google-contacts-source.c: (manage_google_group),
- (ensure_google_contacts_source_group),
- (remove_google_contacts_source_group):
- * google-source.c: (ensure_google_source_group):
- Find group by its base uri, not by a localized name.
-
-2008-11-07 Matthew Barnes <mbarnes@redhat.com>
-
- ** Fix for bug #559518
-
- * google-source.c: (retrieve_list_clicked),
- (retrieve_list_sensitize), (plugin_google): Desensitizes the button
- when the username field is blank.
-
-2008-11-06 Bharath Acharya <abharath@novell.com>
-
- ** Fix for bug #557726
-
- * google-contacts-source.c: (destroy_ui_data),
- (plugin_google_contacts): Destroy the widgets created by this group.
-
-2008-09-24 Philip Withnall <philip@tecnocode.co.uk>
-
- ** Fixes bug #553479
-
- * org-gnome-evolution-google.eplug.xml: String capitalisation
- improvements.
-
-2008-08-27 Sankar P <psankar@novell.com>
-
-License Changes
-
- * google-source.c:
-
-2008-08-20 Milan Crha <mcrha@redhat.com>
-
- ** Fix for bug #525555
-
- * google-source.c: (print_uri_noproto): Removed.
- * google-source.c: (user_changed): Do not leak.
- * google-source.c: (plugin_google): Get username from source, not URL.
-
-2008-08-14 Jörgen Scheibengruber <mfcn@gmx.de>
-
- * google-contacts-source.c (on_ssl_cb_toggled),
- (seconds_to_interval), (interval_to_seconds),
- (on_interval_sb_value_changed), (on_interval_combo_changed),
- (plugin_google_contacts):
-
- Add ssl toggle; synch UI for refreshin with the google calendar plugin
-
-2008-08-07 Milan Crha <mcrha@redhat.com>
-
- ** Fix for bug #535745
-
- * google-source.c: (sanitize_user_mail), (construct_default_uri),
- (is_default_uri), (init_combo_values), (user_changed),
- (cal_combo_changed), (claim_error), (retrieve_list_clicked),
- (plugin_google): New widgets and functionality to retrieve list
- of subscribed calendars from the Google account and let user choose
- which one would be shown.
-
-2008-08-01 Matthew Barnes <mbarnes@redhat.com>
-
- ** Fixes bug #544860
-
- * google-contacts-source.c (plugin_google_contacts):
- Add translator comments for split "update every" sentence.
-
-2008-07-31 Matthew Barnes <mbarnes@redhat.com>
-
- ** Fixes part of bug #545568
-
- * org-gnome-evolution-google.eplug.xml:
- Add "system_plugin=true" so it's not shown in the Plugin Manager.
- This plugin is not designed to be disabled by the user.
-
-2008-05-24 Jörgen Scheibengruber <mfcn@gmx.de>
-
- * Makefile.am:
- * google-contacts-source.c (ensure_google_contacts_source_group),
- (remove_google_contacts_source_group), (on_username_entry_changed),
- (on_update_cb_toggled), (on_interval_sb_value_changed),
- (plugin_google_contacts):
- * google-contacts-source.h:
- * google-source.c (e_plugin_lib_enable):
- * org-gnome-evolution-google.eplug.xml:
- Added a UI for the addressbook part
-
-2008-03-31 Suman Manjunath <msuman@novell.com>
-
- ** Fix for bug #346555
-
- * google-source.c: (plugin_google):
- Fixed a mnemonic conflict.
-
-2008-01-25 Tor Lillqvist <tml@novell.com>
-
- * Makefile.am (liborg_gnome_evolution_google_la_LIBADD): Fix typo:
- s/EVOLUTION_CALENDAR_LIB1S/EVOLUTION_CALENDAR_LIBS/.
-
-2007-12-23 Nyall Dawson <nyall@zombiepigs.net>
-
- ** Fix for bug #503954
-
- * google-source.c: (is_email), (user_changed): Accept custom domain
- names while setting up account.
-
-2007-10-30 Sankar P <psankar@novell.com>
-
- * ChangeLog:
- Every plugin should have a ChangeLog. Added.
-
- * google-source.c:
- Commented an unused function.
- Marked Debug statements conditional.
diff --git a/plugins/google-account-setup/Makefile.am b/plugins/google-account-setup/Makefile.am
index 07f41510e4..ed3ab93d5d 100644
--- a/plugins/google-account-setup/Makefile.am
+++ b/plugins/google-account-setup/Makefile.am
@@ -12,7 +12,8 @@ liborg_gnome_evolution_google_la_CPPFLAGS = \
-DCALDAV_UIDIR=\""$(uidir)"\" \
$(GNOME_PLATFORM_CFLAGS) \
$(EVOLUTION_CALENDAR_CFLAGS) \
- $(EVOLUTION_ADDRESSBOOK_CFLAGS)
+ $(EVOLUTION_ADDRESSBOOK_CFLAGS) \
+ $(GDATA_CFLAGS)
liborg_gnome_evolution_google_la_SOURCES = \
google-source.c \
@@ -24,7 +25,8 @@ liborg_gnome_evolution_google_la_LIBADD = \
$(top_builddir)/e-util/libeutil.la \
$(EVOLUTION_CALENDAR_LIBS) \
$(EPLUGIN_LIBS) \
- $(GNOME_PLATFORM_LIBS)
+ $(GNOME_PLATFORM_LIBS) \
+ $(GDATA_LIBS)
liborg_gnome_evolution_google_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
diff --git a/plugins/google-account-setup/google-contacts-source.c b/plugins/google-account-setup/google-contacts-source.c
index d7554ebe10..289a939dec 100644
--- a/plugins/google-account-setup/google-contacts-source.c
+++ b/plugins/google-account-setup/google-contacts-source.c
@@ -231,6 +231,7 @@ plugin_google_contacts (EPlugin *epl,
const gchar *refresh_interval_str;
guint refresh_interval;
const gchar *use_ssl_str;
+ gchar *buff;
gboolean use_ssl;
GtkWidget *parent;
GtkWidget *vbox;
@@ -270,7 +271,9 @@ plugin_google_contacts (EPlugin *epl,
gtk_box_pack_start (GTK_BOX (vbox), vbox2, FALSE, FALSE, 0);
section = gtk_label_new (NULL);
- gtk_label_set_markup (GTK_LABEL (section), _("<b>Server</b>"));
+ buff = g_strconcat ("<b>", _("Server"), "</b>", NULL);
+ gtk_label_set_markup (GTK_LABEL (section), buff);
+ g_free (buff);
gtk_misc_set_alignment (GTK_MISC (section), 0.0, 0.0);
gtk_box_pack_start (GTK_BOX (vbox2), section, FALSE, FALSE, 0);
diff --git a/plugins/google-account-setup/google-source.c b/plugins/google-account-setup/google-source.c
index 26b80f0ec8..2f6dfdc12e 100644
--- a/plugins/google-account-setup/google-source.c
+++ b/plugins/google-account-setup/google-source.c
@@ -16,6 +16,7 @@
*
* Authors:
* Ebby Wiselyn <ebbywiselyn@gmail.com>
+ * Philip Withnall <philip@tecnocode.co.uk>
*
* Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*
@@ -46,9 +47,7 @@
#include <libedataserverui/e-cell-renderer-color.h>
#include <libedataserverui/e-passwords.h>
-#include <google/libgdata/gdata-service-iface.h>
-#include <google/libgdata/gdata-feed.h>
-#include <google/libgdata-google/gdata-google-service.h>
+#include <gdata/gdata.h>
#include "google-contacts-source.h"
@@ -408,7 +407,7 @@ update_proxy_settings (GDataService *service, const gchar *uri)
proxy_uri = e_proxy_peek_uri_for (proxy, uri);
}
- gdata_service_set_proxy (service, proxy_uri);
+ gdata_service_set_proxy_uri (service, proxy_uri);
g_object_unref (proxy);
}
@@ -416,11 +415,10 @@ static void
retrieve_list_clicked (GtkButton *button, GtkComboBox *combo)
{
ESource *source;
- GDataGoogleService *service;
+ GDataCalendarService *service;
GDataFeed *feed;
gchar *user, *password, *tmp;
- const gchar *username, *ssl;
- gchar *get_subscribed_url;
+ const gchar *username;
GError *error = NULL;
GtkWindow *parent;
@@ -447,20 +445,26 @@ retrieve_list_clicked (GtkButton *button, GtkComboBox *combo)
return;
}
- service = gdata_google_service_new ("cl", "evolution-client-0.0.1");
- gdata_service_set_credentials (GDATA_SERVICE (service), user, password);
+ service = gdata_calendar_service_new ("evolution-client-0.1.0");
+ if (!gdata_service_authenticate (GDATA_SERVICE (service), user, password, NULL, &error)) {
+ /* Error! */
+ claim_error (parent, error->message);
+ g_error_free (error);
+ g_free (password);
+ g_free (user);
+ g_object_unref (service);
+ return;
+ }
+
/* privacy... maybe... */
memset (password, 0, strlen (password));
g_free (password);
- ssl = e_source_get_property (source, "ssl");
- get_subscribed_url = g_strconcat ((!ssl || g_str_equal (ssl, "1")) ? "https" : "http", URL_GET_SUBSCRIBED_CALENDARS, NULL);
- update_proxy_settings (GDATA_SERVICE (service), get_subscribed_url);
- feed = gdata_service_get_feed (GDATA_SERVICE (service), get_subscribed_url, &error);
- g_free (get_subscribed_url);
+ update_proxy_settings (GDATA_SERVICE (service), URL_GET_SUBSCRIBED_CALENDARS);
+ feed = gdata_calendar_service_query_all_calendars (service, NULL, NULL, NULL, NULL, &error);
if (feed) {
- GSList *l;
+ GList *l;
gchar *old_selected = NULL;
gint idx, active = -1, default_idx = -1;
GtkListStore *store = GTK_LIST_STORE (gtk_combo_box_get_model (combo));
@@ -472,31 +476,27 @@ retrieve_list_clicked (GtkButton *button, GtkComboBox *combo)
gtk_list_store_clear (store);
for (l = gdata_feed_get_entries (feed), idx = 1; l != NULL; l = l->next) {
- const gchar *uri, *title, *color, *access;
- GSList *links;
- GDataEntry *entry = (GDataEntry *) l->data;
+ const gchar *uri, *title, *access;
+ GDataLink *link;
+ GDataColor color;
+ GDataEntry *entry = GDATA_ENTRY (l->data);
if (!entry || !GDATA_IS_ENTRY (entry))
continue;
/* skip hidden entries */
- if (gdata_entry_get_custom (entry, "hidden") && g_ascii_strcasecmp (gdata_entry_get_custom (entry, "hidden"), "true") == 0)
+ if (gdata_calendar_calendar_is_hidden (GDATA_CALENDAR_CALENDAR (entry)))
continue;
- uri = NULL;
- for (links = gdata_entry_get_links (entry); links && !uri; links = links->next) {
- GDataEntryLink *link = (GDataEntryLink *)links->data;
-
- if (!link || !link->href || !link->rel)
- continue;
-
- if (g_ascii_strcasecmp (link->rel, "alternate") == 0)
- uri = link->href;
- }
+ /* Find the alternate link; skip the entry if one doesn't exist */
+ link = gdata_entry_look_up_link (entry, GDATA_LINK_ALTERNATE);
+ if (!link)
+ continue;
+ uri = gdata_link_get_uri (link);
title = gdata_entry_get_title (entry);
- color = gdata_entry_get_custom (entry, "color");
- access = gdata_entry_get_custom (entry, "accesslevel");
+ gdata_calendar_calendar_get_color (GDATA_CALENDAR_CALENDAR (entry), &color);
+ access = gdata_calendar_calendar_get_access_level (GDATA_CALENDAR_CALENDAR (entry));
if (uri && title) {
GdkColor gdkcolor;
@@ -504,8 +504,11 @@ retrieve_list_clicked (GtkButton *button, GtkComboBox *combo)
if (old_selected && g_str_equal (old_selected, uri))
active = idx;
- if (color)
- gdk_color_parse (color, &gdkcolor);
+ /* Convert the GDataColor to a GdkColor */
+ gdkcolor.pixel = 0;
+ gdkcolor.red = color.red * 256;
+ gdkcolor.green = color.green * 256;
+ gdkcolor.blue = color.blue * 256;
if (default_idx == -1 && is_default_uri (uri, user)) {
/* have the default uri always NULL and first in the combo */
@@ -517,7 +520,7 @@ retrieve_list_clicked (GtkButton *button, GtkComboBox *combo)
}
gtk_list_store_set (store, &iter,
- COL_COLOR, color ? &gdkcolor : NULL,
+ COL_COLOR, &gdkcolor,
COL_TITLE, title,
COL_URL_PATH, uri,
COL_READ_ONLY, access && !g_str_equal (access, "owner") && !g_str_equal (access, "contributor"),
@@ -583,7 +586,7 @@ plugin_google (EPlugin *epl,
GtkWidget *combo;
gchar *uri;
const gchar *username;
- gint row;
+ guint row;
GtkCellRenderer *renderer;
GtkListStore *store;
@@ -626,7 +629,7 @@ plugin_google (EPlugin *epl,
e_plugin_util_add_refresh (parent, _("Re_fresh:"), source, "refresh");
- row = GTK_TABLE (parent)->nrows;
+ g_object_get (parent, "n-rows", &row, NULL);
label = gtk_label_new_with_mnemonic (_("Cal_endar:"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
@@ -663,7 +666,7 @@ plugin_google (EPlugin *epl,
hbox = gtk_hbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
- label = gtk_button_new_with_mnemonic (_("Retrieve _list"));
+ label = gtk_button_new_with_mnemonic (_("Retrieve _List"));
g_signal_connect (label, "clicked", G_CALLBACK (retrieve_list_clicked), combo);
g_signal_connect (user, "changed", G_CALLBACK (retrieve_list_sensitize), label);
g_object_set_data (G_OBJECT (label), "ESource", source);