aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/save-calendar/ical-format.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-09-04 01:27:31 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-09-04 01:27:31 +0800
commit643db1689446521b73c589ef61c82c9536f24f46 (patch)
tree99b64d882e907c5467fed3c94f29dc8c521507f4 /plugins/save-calendar/ical-format.c
parentd0841e7c2490436c664cfec87099b86d54d4127d (diff)
downloadgsoc2013-evolution-643db1689446521b73c589ef61c82c9536f24f46.tar
gsoc2013-evolution-643db1689446521b73c589ef61c82c9536f24f46.tar.gz
gsoc2013-evolution-643db1689446521b73c589ef61c82c9536f24f46.tar.bz2
gsoc2013-evolution-643db1689446521b73c589ef61c82c9536f24f46.tar.lz
gsoc2013-evolution-643db1689446521b73c589ef61c82c9536f24f46.tar.xz
gsoc2013-evolution-643db1689446521b73c589ef61c82c9536f24f46.tar.zst
gsoc2013-evolution-643db1689446521b73c589ef61c82c9536f24f46.zip
Get the "save-calendar" plugin working.
Based on initial work by Milan Crha.
Diffstat (limited to 'plugins/save-calendar/ical-format.c')
-rw-r--r--plugins/save-calendar/ical-format.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/save-calendar/ical-format.c b/plugins/save-calendar/ical-format.c
index 3b54176284..7888ecc4c1 100644
--- a/plugins/save-calendar/ical-format.c
+++ b/plugins/save-calendar/ical-format.c
@@ -31,7 +31,6 @@
#include <libedataserverui/e-source-selector.h>
#include <libecal/e-cal.h>
#include <libecal/e-cal-util.h>
-#include <calendar/gui/e-cal-popup.h>
#include <calendar/common/authentication.h>
#include <string.h>
@@ -84,7 +83,7 @@ append_tz_to_comp (gpointer key, gpointer value, icalcomponent *toplevel)
}
static void
-do_save_calendar_ical (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type, gchar *dest_uri)
+do_save_calendar_ical (FormatHandler *handler, ESourceSelector *selector, ECalSourceType type, gchar *dest_uri)
{
ESource *primary_source;
ECal *source_client;
@@ -92,7 +91,7 @@ do_save_calendar_ical (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSourc
GList *objects;
icalcomponent *top_level = NULL;
- primary_source = e_source_selector_peek_primary_selection (target->selector);
+ primary_source = e_source_selector_peek_primary_selection (selector);
if (!dest_uri)
return;
@@ -100,7 +99,7 @@ do_save_calendar_ical (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSourc
/* open source client */
source_client = (ECal*) auth_new_cal_from_source (primary_source, type);
if (!e_cal_open (source_client, TRUE, &error)) {
- display_error_message (gtk_widget_get_toplevel (GTK_WIDGET (target->selector)), error->message);
+ display_error_message (gtk_widget_get_toplevel (GTK_WIDGET (selector)), error->message);
g_object_unref (source_client);
g_error_free (error);
return;
@@ -133,7 +132,7 @@ do_save_calendar_ical (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSourc
tdata.zones = NULL;
/* save the file */
- stream = open_for_writing (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (target->selector))), dest_uri, &error);
+ stream = open_for_writing (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (selector))), dest_uri, &error);
if (stream) {
gchar *ical_str = icalcomponent_as_ical_string_r (top_level);
@@ -147,7 +146,7 @@ do_save_calendar_ical (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSourc
}
if (error) {
- display_error_message (gtk_widget_get_toplevel (GTK_WIDGET (target->selector)), error->message);
+ display_error_message (gtk_widget_get_toplevel (GTK_WIDGET (selector)), error->message);
g_error_free (error);
}