aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/Makefile.am14
-rw-r--r--calendar/gui/alarm-notify/Makefile.am10
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.c33
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.h3
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c1
-rw-r--r--calendar/gui/alarm-notify/alarm.c5
-rw-r--r--calendar/gui/alarm-notify/alarm.h3
-rw-r--r--calendar/gui/alarm-notify/config-data.c28
-rw-r--r--calendar/gui/alarm-notify/notify-main.c10
-rw-r--r--calendar/gui/calendar-view-factory.c7
-rw-r--r--calendar/gui/calendar-view-factory.h4
-rw-r--r--calendar/gui/calendar-view.c7
-rw-r--r--calendar/gui/calendar-view.h4
-rw-r--r--calendar/gui/caltypes.xml19
-rw-r--r--calendar/gui/comp-util.c1
-rw-r--r--calendar/gui/dialogs/Makefile.am9
-rw-r--r--calendar/gui/dialogs/alarm-dialog.c1
-rw-r--r--calendar/gui/dialogs/alarm-dialog.h4
-rw-r--r--calendar/gui/dialogs/alarm-list-dialog.c1
-rw-r--r--calendar/gui/dialogs/alarm-list-dialog.h10
-rw-r--r--calendar/gui/dialogs/cancel-comp.c1
-rw-r--r--calendar/gui/dialogs/changed-comp.c1
-rw-r--r--calendar/gui/dialogs/comp-editor-util.c1
-rw-r--r--calendar/gui/dialogs/comp-editor.c8
-rw-r--r--calendar/gui/dialogs/copy-source-dialog.h10
-rw-r--r--calendar/gui/dialogs/delete-comp.c1
-rw-r--r--calendar/gui/dialogs/delete-error.c1
-rw-r--r--calendar/gui/dialogs/e-delegate-dialog.c7
-rw-r--r--calendar/gui/dialogs/e-delegate-dialog.h81
-rw-r--r--calendar/gui/dialogs/e-send-options-utils.c1
-rw-r--r--calendar/gui/dialogs/event-editor.c5
-rw-r--r--calendar/gui/dialogs/event-page.c16
-rw-r--r--calendar/gui/dialogs/recur-comp.c1
-rw-r--r--calendar/gui/dialogs/recurrence-page.c4
-rw-r--r--calendar/gui/dialogs/select-source-dialog.h4
-rw-r--r--calendar/gui/dialogs/send-comp.c1
-rw-r--r--calendar/gui/dialogs/task-editor.c5
-rw-r--r--calendar/gui/dialogs/task-page.c13
-rw-r--r--calendar/gui/e-cal-model-calendar.c6
-rw-r--r--calendar/gui/e-cal-model.c113
-rw-r--r--calendar/gui/e-cal-model.h4
-rw-r--r--calendar/gui/e-calendar-selector.c41
-rw-r--r--calendar/gui/e-calendar-view.c158
-rw-r--r--calendar/gui/e-calendar-view.h12
-rw-r--r--calendar/gui/e-day-view-main-item.c2
-rw-r--r--calendar/gui/e-day-view.c66
-rw-r--r--calendar/gui/e-meeting-attendee.c1
-rw-r--r--calendar/gui/e-meeting-attendee.h1
-rw-r--r--calendar/gui/e-meeting-store.c6
-rw-r--r--calendar/gui/e-meeting-time-sel.c6
-rw-r--r--calendar/gui/e-meeting-types.h2
-rw-r--r--calendar/gui/e-memo-list-selector.c37
-rw-r--r--calendar/gui/e-task-list-selector.c37
-rw-r--r--calendar/gui/e-task-table.c5
-rw-r--r--calendar/gui/e-week-view.c10
-rw-r--r--calendar/gui/gnome-cal.c52
-rw-r--r--calendar/gui/misc.c2
-rw-r--r--calendar/gui/print.c2
-rw-r--r--calendar/gui/weekday-picker.c2
-rw-r--r--calendar/gui/weekday-picker.h4
-rw-r--r--calendar/importers/Makefile.am16
-rw-r--r--calendar/importers/icalendar-importer.c5
62 files changed, 488 insertions, 437 deletions
diff --git a/calendar/gui/Makefile.am b/calendar/gui/Makefile.am
index 1531bb8d60..ce1f832ba3 100644
--- a/calendar/gui/Makefile.am
+++ b/calendar/gui/Makefile.am
@@ -67,10 +67,10 @@ libevolution_calendar_la_CPPFLAGS = \
-DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \
-DEVOLUTION_UIDIR=\""$(uidir)"\" \
-DPREFIX=\""$(prefix)"\" \
+ $(EVOLUTION_DATA_SERVER_CFLAGS) \
$(GNOME_PLATFORM_CFLAGS) \
- $(LIBSOUP_CFLAGS) \
- $(EVOLUTION_CALENDAR_CFLAGS) \
- $(CAMEL_CFLAGS)
+ $(GTKHTML_CFLAGS) \
+ $(LIBSOUP_CFLAGS)
etspec_DATA = \
e-calendar-table.etspec \
@@ -213,10 +213,10 @@ libevolution_calendar_la_LIBADD = \
$(top_builddir)/widgets/table/libetable.la \
$(top_builddir)/filter/libfilter.la \
$(top_builddir)/e-util/libeutil.la \
- $(CAMEL_LIBS) \
- $(LIBSOUP_LIBS) \
- $(EVOLUTION_CALENDAR_LIBS) \
- $(GNOME_PLATFORM_LIBS)
+ $(EVOLUTION_DATA_SERVER_LIBS) \
+ $(GNOME_PLATFORM_LIBS) \
+ $(GTKHTML_LIBS) \
+ $(LIBSOUP_LIBS)
libevolution_calendar_la_LDFLAGS = $(NO_UNDEFINED)
diff --git a/calendar/gui/alarm-notify/Makefile.am b/calendar/gui/alarm-notify/Makefile.am
index c15181ad9c..82fdeeb77e 100644
--- a/calendar/gui/alarm-notify/Makefile.am
+++ b/calendar/gui/alarm-notify/Makefile.am
@@ -18,9 +18,9 @@ evolution_alarm_notify_CPPFLAGS = \
-DEVOLUTION_ICONDIR=\""$(icondir)"\" \
-DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \
-DEVOLUTION_LIBEXECDIR=\""$(privlibexecdir)"\" \
+ $(EVOLUTION_DATA_SERVER_CFLAGS) \
$(GNOME_PLATFORM_CFLAGS) \
- $(CAMEL_CFLAGS) \
- $(EVOLUTION_CALENDAR_CFLAGS) \
+ $(LIBNOTIFY_CFLAGS) \
$(CANBERRA_CFLAGS)
ui_DATA = \
@@ -44,10 +44,10 @@ evolution_alarm_notify_SOURCES = \
evolution_alarm_notify_LDADD = \
$(top_builddir)/e-util/libeutil.la \
$(top_builddir)/widgets/misc/libemiscwidgets.la \
- $(CAMEL_LIBS) \
- $(EVOLUTION_CALENDAR_LIBS) \
- $(CANBERRA_LIBS) \
+ $(EVOLUTION_DATA_SERVER_LIBS) \
$(GNOME_PLATFORM_LIBS) \
+ $(LIBNOTIFY_LIBS) \
+ $(CANBERRA_LIBS) \
$(EVOLUTIONALARMNOTIFYICON)
if OS_WIN32
diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c
index 3256e39780..3b5402b4a6 100644
--- a/calendar/gui/alarm-notify/alarm-notify.c
+++ b/calendar/gui/alarm-notify/alarm-notify.c
@@ -39,6 +39,8 @@
#define APPLICATION_ID "org.gnome.EvolutionAlarmNotify"
+#define APPLICATION_ID "org.gnome.EvolutionAlarmNotify"
+
struct _AlarmNotifyPrivate {
/* Mapping from EUri's to LoadedClient structures */
/* FIXME do we need per source type uri hashes? or perhaps we
@@ -55,7 +57,13 @@ typedef struct {
GList *removals;
} ProcessRemovalsData;
-G_DEFINE_TYPE (AlarmNotify, alarm_notify, GTK_TYPE_APPLICATION)
+/* Forward Declarations */
+static void alarm_notify_initable_init (GInitableIface *interface);
+
+G_DEFINE_TYPE_WITH_CODE (
+ AlarmNotify, alarm_notify, GTK_TYPE_APPLICATION,
+ G_IMPLEMENT_INTERFACE (
+ G_TYPE_INITABLE, alarm_notify_initable_init))
static void
process_removal_in_hash (const gchar *uri,
@@ -264,6 +272,15 @@ alarm_notify_activate (GApplication *application)
* if there are no handlers connected to this signal. */
}
+static gboolean
+alarm_notify_initable (GInitable *initable,
+ GCancellable *cancellable,
+ GError **error)
+{
+ /* XXX Just return TRUE for now. We'll have use for this soon. */
+ return TRUE;
+}
+
static void
alarm_notify_class_init (AlarmNotifyClass *class)
{
@@ -281,6 +298,13 @@ alarm_notify_class_init (AlarmNotifyClass *class)
}
static void
+alarm_notify_initable_init (GInitableIface *interface)
+{
+ /* XXX Awkward name since we're missing an 'E' prefix. */
+ interface->init = alarm_notify_initable;
+}
+
+static void
alarm_notify_init (AlarmNotify *an)
{
gint ii;
@@ -317,10 +341,11 @@ alarm_notify_get_selected_calendars (AlarmNotify *an)
* Returns: a newly-created #AlarmNotify
**/
AlarmNotify *
-alarm_notify_new (void)
+alarm_notify_new (GCancellable *cancellable,
+ GError **error)
{
- return g_object_new (
- TYPE_ALARM_NOTIFY,
+ return g_initable_new (
+ TYPE_ALARM_NOTIFY, cancellable, error,
"application-id", APPLICATION_ID, NULL);
}
diff --git a/calendar/gui/alarm-notify/alarm-notify.h b/calendar/gui/alarm-notify/alarm-notify.h
index 51837d21d5..f95a4d6b33 100644
--- a/calendar/gui/alarm-notify/alarm-notify.h
+++ b/calendar/gui/alarm-notify/alarm-notify.h
@@ -65,7 +65,8 @@ struct _AlarmNotifyClass {
};
GType alarm_notify_get_type (void);
-AlarmNotify * alarm_notify_new (void);
+AlarmNotify * alarm_notify_new (GCancellable *cancellable,
+ GError **error);
void alarm_notify_add_calendar (AlarmNotify *an,
ECalClientSourceType source_type,
ESource *source,
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index d7a1346a8e..8a4ae2face 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -970,7 +970,6 @@ query_objects_removed_cb (ECalClientView *view,
message_push ((Message *) msg);
}
-
/* Notification functions */
diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c
index 968eb95959..a05498532b 100644
--- a/calendar/gui/alarm-notify/alarm.c
+++ b/calendar/gui/alarm-notify/alarm.c
@@ -36,7 +36,6 @@
#include "alarm.h"
#include "config-data.h"
-
/* Our glib timeout */
static guint timeout_id;
@@ -54,8 +53,6 @@ typedef struct {
static void setup_timeout (void);
-
-
/* Removes the head alarm from the queue. Does not touch the timeout_id. */
static void
pop_alarm (void)
@@ -199,8 +196,6 @@ queue_alarm (AlarmRecord *ar)
setup_timeout ();
}
-
-
/**
* alarm_add:
* @trigger: Time at which alarm will trigger.
diff --git a/calendar/gui/alarm-notify/alarm.h b/calendar/gui/alarm-notify/alarm.h
index 7a14db5d03..54a6e4c720 100644
--- a/calendar/gui/alarm-notify/alarm.h
+++ b/calendar/gui/alarm-notify/alarm.h
@@ -29,7 +29,6 @@
#include <time.h>
#include <glib.h>
-
typedef void (* AlarmFunction) (gpointer alarm_id, time_t trigger, gpointer data);
typedef void (* AlarmDestroyNotify) (gpointer alarm_id, gpointer data);
@@ -40,6 +39,4 @@ gpointer alarm_add (time_t trigger, AlarmFunction alarm_fn, gpointer data,
AlarmDestroyNotify destroy_notify_fn);
void alarm_remove (gpointer alarm);
-
-
#endif
diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c
index aa8755973a..4f30a4e4f3 100644
--- a/calendar/gui/alarm-notify/config-data.c
+++ b/calendar/gui/alarm-notify/config-data.c
@@ -37,8 +37,6 @@ static GConfClient *conf_client = NULL;
static GSetting *calendar_settings = NULL;
static ESourceList *calendar_source_list = NULL, *tasks_source_list = NULL;
-
-
/* Copied from ../calendar-config.c; returns whether the locale has 'am' and
* 'pm' strings defined.
*/
@@ -261,16 +259,25 @@ config_data_set_last_notification_time (ECalClient *cal,
if (cal) {
ESource *source = e_client_get_source (E_CLIENT (cal));
if (source) {
- GTimeVal tmval = {0};
- gchar *as_text;
+ const gchar *prop_str;
+ GTimeVal curr_tv = {0};
+
+ prop_str = e_source_get_property (source, "last-notified");
+ if (!prop_str || !g_time_val_from_iso8601 (prop_str, &curr_tv))
+ curr_tv.tv_sec = 0;
- tmval.tv_sec = (glong) t;
- as_text = g_time_val_to_iso8601 (&tmval);
+ if (t > (time_t) curr_tv.tv_sec || (time_t) curr_tv.tv_sec > now) {
+ GTimeVal tmval = {0};
+ gchar *as_text;
- if (as_text) {
- e_source_set_property (source, "last-notified", as_text);
- g_free (as_text);
- return;
+ tmval.tv_sec = (glong) t;
+ as_text = g_time_val_to_iso8601 (&tmval);
+
+ if (as_text) {
+ e_source_set_property (source, "last-notified", as_text);
+ g_free (as_text);
+ /* pass through, thus the global last notification time is also changed */
+ }
}
}
}
@@ -317,7 +324,6 @@ config_data_get_last_notification_time (ECalClient *cal)
value = g_settings_get_int (calendar_settings, "last-notification-time");
now = time (NULL);
-
if (val > now)
val = now;
diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c
index 225dde4c26..b1775d8d23 100644
--- a/calendar/gui/alarm-notify/notify-main.c
+++ b/calendar/gui/alarm-notify/notify-main.c
@@ -27,6 +27,7 @@
#include <config.h>
#endif
+#include <stdlib.h>
#include <glib/gi18n.h>
#include "alarm-notify.h"
@@ -50,6 +51,7 @@ main (gint argc,
{
AlarmNotify *alarm_notify_service;
gint exit_status;
+ GError *error = NULL;
#ifdef G_OS_WIN32
gchar *path;
@@ -87,7 +89,13 @@ main (gint argc,
g_warning ("Could not set PATH for Evolution Alarm Notifier");
#endif
- alarm_notify_service = alarm_notify_new ();
+ alarm_notify_service = alarm_notify_new (NULL, &error);
+
+ if (error != NULL) {
+ g_printerr ("%s\n", error->message);
+ g_error_free (error);
+ exit (EXIT_FAILURE);
+ }
exit_status = g_application_run (
G_APPLICATION (alarm_notify_service), argc, argv);
diff --git a/calendar/gui/calendar-view-factory.c b/calendar/gui/calendar-view-factory.c
index b1d4a4fd72..4c92d6d8fc 100644
--- a/calendar/gui/calendar-view-factory.c
+++ b/calendar/gui/calendar-view-factory.c
@@ -30,7 +30,6 @@
#include "calendar-view-factory.h"
#include "calendar-view.h"
-
/* Private part of the CalendarViewFactory structure */
struct _CalendarViewFactoryPrivate {
@@ -38,8 +37,6 @@ struct _CalendarViewFactoryPrivate {
GnomeCalendarViewType view_type;
};
-
-
static void calendar_view_factory_finalize (GObject *object);
static const gchar *
calendar_view_factory_get_title (GalViewFactory *factory);
@@ -99,8 +96,6 @@ calendar_view_factory_finalize (GObject *object)
G_OBJECT_CLASS (calendar_view_factory_parent_class)->finalize (object);
}
-
-
/* get_title method for the calendar view factory */
static const gchar *
calendar_view_factory_get_title (GalViewFactory *factory)
@@ -173,8 +168,6 @@ calendar_view_factory_new_view (GalViewFactory *factory,
return GAL_VIEW (cal_view);
}
-
-
/**
* calendar_view_factory_construct:
* @cal_view_factory: A calendar view factory.
diff --git a/calendar/gui/calendar-view-factory.h b/calendar/gui/calendar-view-factory.h
index c6022ae657..bad3dcfd1f 100644
--- a/calendar/gui/calendar-view-factory.h
+++ b/calendar/gui/calendar-view-factory.h
@@ -31,8 +31,6 @@
G_BEGIN_DECLS
-
-
#define TYPE_CALENDAR_VIEW_FACTORY (calendar_view_factory_get_type ())
#define CALENDAR_VIEW_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CALENDAR_VIEW_FACTORY, \
CalendarViewFactory))
@@ -62,8 +60,6 @@ GalViewFactory *calendar_view_factory_construct (CalendarViewFactory *cal_view_f
GalViewFactory *calendar_view_factory_new (GnomeCalendarViewType view_type);
-
-
G_END_DECLS
#endif
diff --git a/calendar/gui/calendar-view.c b/calendar/gui/calendar-view.c
index 0931a4b189..d238daf3df 100644
--- a/calendar/gui/calendar-view.c
+++ b/calendar/gui/calendar-view.c
@@ -28,7 +28,6 @@
#include "calendar-view.h"
-
/* Private part of the CalendarView structure */
struct _CalendarViewPrivate {
@@ -39,8 +38,6 @@ struct _CalendarViewPrivate {
gchar *title;
};
-
-
static void calendar_view_finalize (GObject *object);
static void calendar_view_load (GalView *view, const gchar *filename);
@@ -110,8 +107,6 @@ calendar_view_finalize (GObject *object)
G_OBJECT_CLASS (calendar_view_parent_class)->finalize (object);
}
-
-
/* load method of the calendar view */
static void
calendar_view_load (GalView *view,
@@ -207,8 +202,6 @@ calendar_view_clone (GalView *view)
return GAL_VIEW (new_view);
}
-
-
/**
* calendar_view_construct:
* @cal_view: A calendar view.
diff --git a/calendar/gui/calendar-view.h b/calendar/gui/calendar-view.h
index d2e9a7d649..f3a2a3103b 100644
--- a/calendar/gui/calendar-view.h
+++ b/calendar/gui/calendar-view.h
@@ -31,8 +31,6 @@
G_BEGIN_DECLS
-
-
#define TYPE_CALENDAR_VIEW (calendar_view_get_type ())
#define CALENDAR_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CALENDAR_VIEW, CalendarView))
#define CALENDAR_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CALENDAR_VIEW, \
@@ -64,8 +62,6 @@ CalendarView *calendar_view_new (GnomeCalendarViewType view_type,
GnomeCalendarViewType calendar_view_get_view_type (CalendarView *cal_view);
-
-
G_END_DECLS
#endif
diff --git a/calendar/gui/caltypes.xml b/calendar/gui/caltypes.xml
index c1997a4fb0..964b623a3e 100644
--- a/calendar/gui/caltypes.xml
+++ b/calendar/gui/caltypes.xml
@@ -168,6 +168,25 @@
</option>
</input>
</part>
+
+ <part name="count-occurrences">
+ <_title>Occurs</_title>
+ <input type="optionlist" name="match-type">
+ <option value="less-than">
+ <_title>Less Than</_title>
+ <code>((or (= (occurrences-count?) (- 1)) (&lt; (occurrences-count?) ${count}))</code>
+ </option>
+ <option value="exactly">
+ <_title>Exactly</_title>
+ <code>((or (= (occurrences-count?) (- 1)) (= (occurrences-count?) ${count}))</code>
+ </option>
+ <option value="more-than">
+ <_title>More Than</_title>
+ <code>((or (= (occurrences-count?) (- 1)) (&gt; (occurrences-count?) ${count}))</code>
+ </option>
+ </input>
+ <input type="integer" name="count"/>
+ </part>
</partset>
<ruleset>
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c
index 9405f24b5a..8bb5500f23 100644
--- a/calendar/gui/comp-util.c
+++ b/calendar/gui/comp-util.c
@@ -39,7 +39,6 @@
#include "shell/e-shell-window.h"
#include "shell/e-shell-view.h"
-
/**
* cal_comp_util_add_exdate:
diff --git a/calendar/gui/dialogs/Makefile.am b/calendar/gui/dialogs/Makefile.am
index 684550990b..b7235ede2a 100644
--- a/calendar/gui/dialogs/Makefile.am
+++ b/calendar/gui/dialogs/Makefile.am
@@ -12,11 +12,10 @@ libcal_dialogs_la_CPPFLAGS = \
-I$(top_srcdir)/widgets/misc \
-DEVOLUTION_UIDIR=\""$(uidir)"\" \
-DEVOLUTION_ICONDIR=\""$(icondir)"\" \
- -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
+ -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
-DPREFIX=\""$(prefix)"\" \
- $(GNOME_PLATFORM_CFLAGS) \
- $(EVOLUTION_CALENDAR_CFLAGS) \
- $(CAMEL_CFLAGS)
+ $(EVOLUTION_DATA_SERVER_CFLAGS) \
+ $(GNOME_PLATFORM_CFLAGS)
ecalendarincludedir = $(privincludedir)/calendar/gui/dialogs
@@ -51,7 +50,7 @@ ecalendarinclude_HEADERS = \
libcal_dialogs_la_LIBADD = \
$(top_builddir)/addressbook/util/libeabutil.la \
- $(CAMEL_LIBS) \
+ $(EVOLUTION_DATA_SERVER_LIBS) \
$(GNOME_PLATFORM_LIBS)
libcal_dialogs_la_SOURCES = \
diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c
index 59cdb4515b..4576f3df6f 100644
--- a/calendar/gui/dialogs/alarm-dialog.c
+++ b/calendar/gui/dialogs/alarm-dialog.c
@@ -45,7 +45,6 @@
#include "comp-editor-util.h"
#include "alarm-dialog.h"
-
typedef struct {
GtkBuilder *builder;
diff --git a/calendar/gui/dialogs/alarm-dialog.h b/calendar/gui/dialogs/alarm-dialog.h
index d99d47f15f..42c72d685a 100644
--- a/calendar/gui/dialogs/alarm-dialog.h
+++ b/calendar/gui/dialogs/alarm-dialog.h
@@ -35,7 +35,9 @@
G_BEGIN_DECLS
-gboolean alarm_dialog_run (GtkWidget *parent, ECalClient *cal_client, ECalComponentAlarm *alarm);
+gboolean alarm_dialog_run (GtkWidget *parent,
+ ECalClient *cal_client,
+ ECalComponentAlarm *alarm);
G_END_DECLS
diff --git a/calendar/gui/dialogs/alarm-list-dialog.c b/calendar/gui/dialogs/alarm-list-dialog.c
index 48503c1023..4fb5884026 100644
--- a/calendar/gui/dialogs/alarm-list-dialog.c
+++ b/calendar/gui/dialogs/alarm-list-dialog.c
@@ -42,7 +42,6 @@
#include "alarm-dialog.h"
#include "alarm-list-dialog.h"
-
typedef struct {
GtkBuilder *builder;
diff --git a/calendar/gui/dialogs/alarm-list-dialog.h b/calendar/gui/dialogs/alarm-list-dialog.h
index 163582c556..5746664c1f 100644
--- a/calendar/gui/dialogs/alarm-list-dialog.h
+++ b/calendar/gui/dialogs/alarm-list-dialog.h
@@ -36,9 +36,13 @@
G_BEGIN_DECLS
-gboolean alarm_list_dialog_run (GtkWidget *parent, ECalClient *cal_client, EAlarmList *list_store);
-GtkWidget *alarm_list_dialog_peek (ECalClient *cal_client, EAlarmList *list_store);
-void alarm_list_dialog_set_client (GtkWidget *dlg_box, ECalClient *cal_client);
+gboolean alarm_list_dialog_run (GtkWidget *parent,
+ ECalClient *cal_client,
+ EAlarmList *list_store);
+GtkWidget * alarm_list_dialog_peek (ECalClient *cal_client,
+ EAlarmList *list_store);
+void alarm_list_dialog_set_client (GtkWidget *dlg_box,
+ ECalClient *cal_client);
G_END_DECLS
diff --git a/calendar/gui/dialogs/cancel-comp.c b/calendar/gui/dialogs/cancel-comp.c
index 86663eda97..c5caa9371d 100644
--- a/calendar/gui/dialogs/cancel-comp.c
+++ b/calendar/gui/dialogs/cancel-comp.c
@@ -31,7 +31,6 @@
#include "e-util/e-alert-dialog.h"
#include "cancel-comp.h"
-
/* is_past_event:
*
diff --git a/calendar/gui/dialogs/changed-comp.c b/calendar/gui/dialogs/changed-comp.c
index 78928795f6..bc25188f5d 100644
--- a/calendar/gui/dialogs/changed-comp.c
+++ b/calendar/gui/dialogs/changed-comp.c
@@ -29,7 +29,6 @@
#include <glib/gi18n.h>
#include "changed-comp.h"
-
/**
* changed_component_dialog:
diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c
index cbc34cb108..2c087bb2f6 100644
--- a/calendar/gui/dialogs/comp-editor-util.c
+++ b/calendar/gui/dialogs/comp-editor-util.c
@@ -37,7 +37,6 @@
#include <shell/e-shell.h>
#include "comp-editor-util.h"
-
/**
* comp_editor_dates:
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 5efab7920c..033b1323f9 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -36,6 +36,7 @@
#include <glib/gstdio.h>
#include <gio/gio.h>
#include <gdk/gdkkeysyms.h>
+#include <libebackend/e-extensible.h>
#include <e-util/e-util.h>
#include <e-util/e-alert-sink.h>
#include <e-util/e-dialog-utils.h>
@@ -3006,6 +3007,7 @@ attachment_loaded_cb (EAttachment *attachment,
GFileInfo *file_info;
const gchar *display_name;
const gchar *uid;
+ gchar *new_name;
/* Prior to 2.27.2, attachment files were named:
*
@@ -3036,9 +3038,10 @@ attachment_loaded_cb (EAttachment *attachment,
uid = g_object_get_data (G_OBJECT (attachment), "uid");
if (g_str_has_prefix (display_name, uid)) {
- g_file_info_set_display_name (
- file_info, display_name + strlen (uid) + 1);
+ new_name = g_strdup (display_name + strlen (uid) + 1);
+ g_file_info_set_display_name (file_info, new_name);
g_object_notify (G_OBJECT (attachment), "file-info");
+ g_free (new_name);
}
e_attachment_load_handle_error (attachment, result, parent);
@@ -3238,6 +3241,7 @@ real_send_comp (CompEditor *editor,
g_return_val_if_fail (IS_COMP_EDITOR (editor), FALSE);
priv = editor->priv;
+
flags = comp_editor_get_flags (editor);
if (priv->mod == CALOBJ_MOD_ALL && e_cal_component_is_instance (priv->comp)) {
diff --git a/calendar/gui/dialogs/copy-source-dialog.h b/calendar/gui/dialogs/copy-source-dialog.h
index d9475f742c..5ac51406de 100644
--- a/calendar/gui/dialogs/copy-source-dialog.h
+++ b/calendar/gui/dialogs/copy-source-dialog.h
@@ -27,10 +27,12 @@
#define COPY_SOURCE_DIALOG_H
#include <gtk/gtk.h>
-#include <libedataserver/e-source.h>
-#include <libecal/e-cal-client.h>
#include <libecal/e-cal-util.h>
+#include <libecal/e-cal-client.h>
+#include <libedataserver/e-source.h>
-void copy_source_dialog (GtkWindow *parent, ESource *source, ECalClientSourceType type);
+void copy_source_dialog (GtkWindow *parent,
+ ESource *source,
+ ECalClientSourceType type);
-#endif
+#endif /* COPY_SOURCE_DIALOG_H */
diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c
index a28fa00221..44c133afbe 100644
--- a/calendar/gui/dialogs/delete-comp.c
+++ b/calendar/gui/dialogs/delete-comp.c
@@ -30,7 +30,6 @@
#include "e-util/e-alert-dialog.h"
#include "delete-comp.h"
-
/**
* delete_component_dialog:
diff --git a/calendar/gui/dialogs/delete-error.c b/calendar/gui/dialogs/delete-error.c
index a5cc6a1b02..a68fed8e1d 100644
--- a/calendar/gui/dialogs/delete-error.c
+++ b/calendar/gui/dialogs/delete-error.c
@@ -30,7 +30,6 @@
#include <glib/gi18n.h>
#include "delete-error.h"
-
/**
* delete_error_dialog:
diff --git a/calendar/gui/dialogs/e-delegate-dialog.c b/calendar/gui/dialogs/e-delegate-dialog.c
index af61f807a8..fc7ae7d121 100644
--- a/calendar/gui/dialogs/e-delegate-dialog.c
+++ b/calendar/gui/dialogs/e-delegate-dialog.c
@@ -124,7 +124,6 @@ e_delegate_dialog_construct (EDelegateDialog *edd,
ENameSelectorModel *name_selector_model;
ENameSelectorDialog *name_selector_dialog;
- g_return_val_if_fail (edd != NULL, NULL);
g_return_val_if_fail (E_IS_DELEGATE_DIALOG (edd), NULL);
priv = edd->priv;
@@ -228,8 +227,10 @@ e_delegate_dialog_new (const gchar *name,
{
EDelegateDialog *edd;
- edd = E_DELEGATE_DIALOG (g_object_new (E_TYPE_DELEGATE_DIALOG, NULL));
- return e_delegate_dialog_construct (E_DELEGATE_DIALOG (edd), name, address);
+ edd = g_object_new (E_TYPE_DELEGATE_DIALOG, NULL);
+
+ return e_delegate_dialog_construct (
+ E_DELEGATE_DIALOG (edd), name, address);
}
gchar *
diff --git a/calendar/gui/dialogs/e-delegate-dialog.h b/calendar/gui/dialogs/e-delegate-dialog.h
index 032901c8bc..5fb672bd5e 100644
--- a/calendar/gui/dialogs/e-delegate-dialog.h
+++ b/calendar/gui/dialogs/e-delegate-dialog.h
@@ -21,28 +21,38 @@
*
*/
-#ifndef __E_DELEGATE_DIALOG_H__
-#define __E_DELEGATE_DIALOG_H__
+#ifndef E_DELEGATE_DIALOG_H
+#define E_DELEGATE_DIALOG_H
#include <gtk/gtk.h>
-
-
-#define E_TYPE_DELEGATE_DIALOG (e_delegate_dialog_get_type ())
-#define E_DELEGATE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_DELEGATE_DIALOG, EDelegateDialog))
-#define E_DELEGATE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_DELEGATE_DIALOG, \
- EDelegateDialogClass))
-#define E_IS_DELEGATE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_DELEGATE_DIALOG))
-#define E_IS_DELEGATE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_DELEGATE_DIALOG))
-
-typedef struct _EDelegateDialog EDelegateDialog;
-typedef struct _EDelegateDialogClass EDelegateDialogClass;
-typedef struct _EDelegateDialogPrivate EDelegateDialogPrivate;
+/* Standard GObject macros */
+#define E_TYPE_DELEGATE_DIALOG \
+ (e_delegate_dialog_get_type ())
+#define E_DELEGATE_DIALOG(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_DELEGATE_DIALOG, EDelegateDialog))
+#define E_DELEGATE_DIALOG_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_DELEGATE_DIALOG, EDelegateDialogClass))
+#define E_IS_DELEGATE_DIALOG(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_DELEGATE_DIALOG))
+#define E_IS_DELEGATE_DIALOG_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_DELEGATE_DIALOG))
+#define E_DELEGATE_DIALOG_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_DELEGATE_DIALOG, EDelegateDialogClass))
+
+G_BEGIN_DECLS
+
+typedef struct _EDelegateDialog EDelegateDialog;
+typedef struct _EDelegateDialogClass EDelegateDialogClass;
+typedef struct _EDelegateDialogPrivate EDelegateDialogPrivate;
struct _EDelegateDialog {
GObject object;
-
- /* Private data */
EDelegateDialogPrivate *priv;
};
@@ -50,24 +60,21 @@ struct _EDelegateDialogClass {
GObjectClass parent_class;
};
-GType e_delegate_dialog_get_type (void);
-
-EDelegateDialog * e_delegate_dialog_construct (EDelegateDialog *etd,
- const gchar *name,
- const gchar *address);
-
-EDelegateDialog * e_delegate_dialog_new (const gchar *name,
- const gchar *address);
-
-gchar * e_delegate_dialog_get_delegate (EDelegateDialog *etd);
-
-gchar * e_delegate_dialog_get_delegate_name (EDelegateDialog *etd);
-
-void e_delegate_dialog_set_delegate (EDelegateDialog *etd,
- const gchar *address);
-
-GtkWidget * e_delegate_dialog_get_toplevel (EDelegateDialog *etd);
-
-
-
-#endif /* __E_DELEGATE_DIALOG_H__ */
+GType e_delegate_dialog_get_type (void);
+EDelegateDialog *
+ e_delegate_dialog_construct (EDelegateDialog *etd,
+ const gchar *name,
+ const gchar *address);
+EDelegateDialog *
+ e_delegate_dialog_new (const gchar *name,
+ const gchar *address);
+gchar * e_delegate_dialog_get_delegate (EDelegateDialog *etd);
+gchar * e_delegate_dialog_get_delegate_name
+ (EDelegateDialog *etd);
+void e_delegate_dialog_set_delegate (EDelegateDialog *etd,
+ const gchar *address);
+GtkWidget * e_delegate_dialog_get_toplevel (EDelegateDialog *etd);
+
+G_END_DECLS
+
+#endif /* E_DELEGATE_DIALOG_H */
diff --git a/calendar/gui/dialogs/e-send-options-utils.c b/calendar/gui/dialogs/e-send-options-utils.c
index f8e933574c..780554812d 100644
--- a/calendar/gui/dialogs/e-send-options-utils.c
+++ b/calendar/gui/dialogs/e-send-options-utils.c
@@ -28,6 +28,7 @@
#include "e-send-options-utils.h"
+#include <stdlib.h>
#include <string.h>
void
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index f89b67056d..29352642e7 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -730,8 +730,9 @@ event_editor_send_comp (CompEditor *editor,
gboolean result;
client = e_meeting_store_get_client (priv->model);
- result = itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp,
- client, NULL, NULL, NULL, strip_alarms, FALSE);
+ result = itip_send_comp (
+ E_CAL_COMPONENT_METHOD_CANCEL, comp,
+ client, NULL, NULL, NULL, strip_alarms, FALSE);
g_object_unref (comp);
if (!result)
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 653f0215ac..b418898509 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -2916,11 +2916,12 @@ epage_client_opened_cb (GObject *source_object,
E_SOURCE_COMBO_BOX (priv->source_selector),
e_client_get_source (E_CLIENT (old_client)));
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
- _("Unable to open the calendar '%s': %s"),
- e_source_peek_name (source),
- error ? error->message : _("Unknown error"));
+ dialog = gtk_message_dialog_new (
+ NULL, GTK_DIALOG_MODAL,
+ GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
+ _("Unable to open the calendar '%s': %s"),
+ e_source_peek_name (source),
+ error->message);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -2952,7 +2953,8 @@ epage_client_opened_cb (GObject *source_object,
sensitize_widgets (epage);
- alarm_list_dialog_set_client (priv->alarm_list_dlg_widget, cal_client);
+ alarm_list_dialog_set_client (
+ priv->alarm_list_dlg_widget, cal_client);
}
}
@@ -3407,8 +3409,6 @@ init_widgets (EventPage *epage)
return TRUE;
}
-
-
static void
event_page_select_organizer (EventPage *epage,
const gchar *backend_address)
diff --git a/calendar/gui/dialogs/recur-comp.c b/calendar/gui/dialogs/recur-comp.c
index e9a941998d..9652553ee3 100644
--- a/calendar/gui/dialogs/recur-comp.c
+++ b/calendar/gui/dialogs/recur-comp.c
@@ -29,7 +29,6 @@
#include <glib/gi18n.h>
#include "recur-comp.h"
-
gboolean
recur_component_dialog (ECalClient *client,
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index 6f201b596f..54dee77f44 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -189,8 +189,6 @@ struct _RecurrencePagePrivate {
GCancellable *cancellable;
};
-
-
static void recurrence_page_finalize (GObject *object);
static gboolean fill_component (RecurrencePage *rpage, ECalComponent *comp);
@@ -2075,8 +2073,6 @@ recurrence_page_set_dates (CompEditorPage *page,
preview_recur (rpage);
}
-
-
/* Gets the widgets from the XML file and returns if they are all available. */
static gboolean
get_widgets (RecurrencePage *rpage)
diff --git a/calendar/gui/dialogs/select-source-dialog.h b/calendar/gui/dialogs/select-source-dialog.h
index 6d64fb825a..2ef8e0e625 100644
--- a/calendar/gui/dialogs/select-source-dialog.h
+++ b/calendar/gui/dialogs/select-source-dialog.h
@@ -30,6 +30,8 @@
#include <libedataserver/e-source.h>
#include <libecal/e-cal-client.h>
-ESource *select_source_dialog (GtkWindow *parent, ECalClientSourceType type, ESource *except_source);
+ESource * select_source_dialog (GtkWindow *parent,
+ ECalClientSourceType type,
+ ESource *except_source);
#endif
diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c
index 3752db372b..524f4c8097 100644
--- a/calendar/gui/dialogs/send-comp.c
+++ b/calendar/gui/dialogs/send-comp.c
@@ -30,7 +30,6 @@
#include "e-util/e-alert-dialog.h"
#include "send-comp.h"
-
static gboolean
component_has_new_attendees (ECalComponent *comp)
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 31593e0a04..1942224f7f 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -472,8 +472,9 @@ task_editor_send_comp (CompEditor *editor,
gboolean result;
client = e_meeting_store_get_client (priv->model);
- result = itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp,
- client, NULL, NULL, NULL, strip_alarms, FALSE);
+ result = itip_send_comp (
+ E_CAL_COMPONENT_METHOD_CANCEL, comp,
+ client, NULL, NULL, NULL, strip_alarms, FALSE);
g_object_unref (comp);
if (!result)
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index e0aa030358..a533505a05 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -1758,11 +1758,12 @@ tpage_client_opened_cb (GObject *source_object,
E_SOURCE_COMBO_BOX (priv->source_selector),
e_client_get_source (E_CLIENT (old_client)));
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
- _("Unable to open tasks in '%s': %s"),
- e_source_peek_name (source),
- error ? error->message : _("Unknown error"));
+ dialog = gtk_message_dialog_new (
+ NULL, GTK_DIALOG_MODAL,
+ GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
+ _("Unable to open tasks in '%s': %s"),
+ e_source_peek_name (source),
+ error->message);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -2026,8 +2027,6 @@ init_widgets (TaskPage *tpage)
return TRUE;
}
-
-
static void
task_page_select_organizer (TaskPage *tpage,
const gchar *backend_address)
diff --git a/calendar/gui/e-cal-model-calendar.c b/calendar/gui/e-cal-model-calendar.c
index 1254a8711b..6a1493f01a 100644
--- a/calendar/gui/e-cal-model-calendar.c
+++ b/calendar/gui/e-cal-model-calendar.c
@@ -369,8 +369,10 @@ ecmc_set_value_at (ETableModel *etm,
}
}
- itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, send_comp ? send_comp : comp,
- comp_data->client, NULL, NULL, NULL, strip_alarms, FALSE);
+ itip_send_comp (
+ E_CAL_COMPONENT_METHOD_REQUEST,
+ send_comp ? send_comp : comp, comp_data->client,
+ NULL, NULL, NULL, strip_alarms, FALSE);
if (send_comp)
g_object_unref (send_comp);
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 1ab56926cd..4428d31cbd 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -28,6 +28,7 @@
#include <string.h>
#include <glib/gi18n.h>
+#include <libebackend/e-extensible.h>
#include <libedataserver/e-flag.h>
#include <libedataserver/e-time-utils.h>
#include <libecal/e-cal-client-view.h>
@@ -38,7 +39,6 @@
#include "misc.h"
#include "e-util/e-util.h"
#include "e-util/e-account-utils.h"
-#include "e-util/e-extensible.h"
#include "e-util/e-util-enumtypes.h"
typedef struct {
@@ -1609,6 +1609,7 @@ ecm_get_color_for_component (ECalModel *model,
ESource *source;
const gchar *color_spec;
gint i, first_empty = 0;
+
static AssignedColorData assigned_colors[] = {
{ "#BECEDD", NULL }, /* 190 206 221 Blue */
{ "#E2F0EF", NULL }, /* 226 240 239 Light Blue */
@@ -1650,8 +1651,9 @@ ecm_get_color_for_component (ECalModel *model,
}
/* return the first unused color */
- assigned_colors[first_empty].uris = g_list_append (assigned_colors[first_empty].uris,
- g_strdup (e_client_get_uri (E_CLIENT (comp_data->client))));
+ assigned_colors[first_empty].uris = g_list_append (
+ assigned_colors[first_empty].uris,
+ g_strdup (e_client_get_uri (E_CLIENT (comp_data->client))));
return assigned_colors[first_empty].color;
}
@@ -2039,7 +2041,7 @@ e_cal_model_get_client_list (ECalModel *model)
/**
* e_cal_model_get_client_for_uri:
- * @model: A calendar model.
+ * @model: an #ECalModel
* @uri: Uri for the client to get.
*/
ECalClient *
@@ -2123,8 +2125,8 @@ search_by_id_and_client (ECalModelPrivate *priv,
static void
remove_all_for_id_and_client (ECalModel *model,
- ECalClient *client,
- const ECalComponentId *id)
+ ECalClient *client,
+ const ECalComponentId *id)
{
ECalModelComponent *comp_data;
@@ -2883,13 +2885,15 @@ client_opened_cb (GObject *source_object,
}
if (error != NULL) {
- const gchar *uri;
+ ESource *source;
- uri = e_client_get_uri (E_CLIENT (client));
+ source = e_client_get_source (E_CLIENT (client));
e_cal_model_remove_client (model, client);
g_warning (
"%s: Failed to open '%s': %s",
- G_STRFUNC, uri, error->message);
+ G_STRFUNC,
+ e_source_peek_name (source),
+ error->message);
g_error_free (error);
e_cal_model_update_status_message (model, NULL, -1.0);
return;
@@ -2958,9 +2962,13 @@ add_new_client (ECalModel *model,
if (e_client_is_opened (E_CLIENT (client))) {
update_e_cal_view_for_client (model, client_data);
} else {
+ ESource *source;
+ const gchar *display_name;
gchar *msg;
- msg = g_strdup_printf (_("Opening %s"), e_client_get_uri (E_CLIENT (client)));
+ source = e_client_get_source (E_CLIENT (client));
+ display_name = e_source_peek_name (source);
+ msg = g_strdup_printf (_("Opening %s"), display_name);
e_cal_model_update_status_message (model, msg, -1.0);
g_free (msg);
@@ -3388,6 +3396,91 @@ e_cal_model_create_component_with_defaults (ECalModel *model,
}
/**
+ * Returns information about attendees in the component.
+ * If there are no attendees, the function returns NULL.
+ *
+ * The information is like "Status: Accepted: X Declined: Y ...".
+ *
+ * Free returned pointer with g_free.
+ **/
+gchar *
+e_cal_model_get_attendees_status_info (ECalModel *model,
+ ECalComponent *comp,
+ ECalClient *cal_client)
+{
+ struct _values {
+ icalparameter_partstat status;
+ const gchar *caption;
+ gint count;
+ } values[] = {
+ { ICAL_PARTSTAT_ACCEPTED, N_("Accepted"), 0 },
+ { ICAL_PARTSTAT_DECLINED, N_("Declined"), 0 },
+ { ICAL_PARTSTAT_TENTATIVE, N_("Tentative"), 0 },
+ { ICAL_PARTSTAT_DELEGATED, N_("Delegated"), 0 },
+ { ICAL_PARTSTAT_NEEDSACTION, N_("Needs action"), 0 },
+ { ICAL_PARTSTAT_NONE, N_("Other"), 0 },
+ { ICAL_PARTSTAT_X, NULL, -1 }
+ };
+
+ GSList *attendees = NULL, *a;
+ gboolean have = FALSE;
+ gchar *res = NULL;
+ gint i;
+
+ g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
+
+ if (!comp || !e_cal_component_has_attendees (comp) ||
+ !itip_organizer_is_user_ex (comp, cal_client, TRUE))
+ return NULL;
+
+ e_cal_component_get_attendee_list (comp, &attendees);
+
+ for (a = attendees; a; a = a->next) {
+ ECalComponentAttendee *att = a->data;
+
+ if (att && att->cutype == ICAL_CUTYPE_INDIVIDUAL &&
+ (att->role == ICAL_ROLE_CHAIR ||
+ att->role == ICAL_ROLE_REQPARTICIPANT ||
+ att->role == ICAL_ROLE_OPTPARTICIPANT)) {
+ have = TRUE;
+
+ for (i = 0; values[i].count != -1; i++) {
+ if (att->status == values[i].status || values[i].status == ICAL_PARTSTAT_NONE) {
+ values[i].count++;
+ break;
+ }
+ }
+ }
+ }
+
+ if (have) {
+ GString *str = g_string_new ("");
+
+ for (i = 0; values[i].count != -1; i++) {
+ if (values[i].count > 0) {
+ if (str->str && *str->str)
+ g_string_append (str, " ");
+
+ g_string_append_printf (str, "%s: %d", _(values[i].caption), values[i].count);
+ }
+ }
+
+ g_string_prepend (str, ": ");
+
+ /* To Translators: 'Status' here means the state of the attendees, the resulting string will be in a form:
+ * Status: Accepted: X Declined: Y ... */
+ g_string_prepend (str, _("Status"));
+
+ res = g_string_free (str, FALSE);
+ }
+
+ if (attendees)
+ e_cal_component_free_attendee_list (attendees);
+
+ return res;
+}
+
+/**
* e_cal_model_get_color_for_component
*/
const gchar *
diff --git a/calendar/gui/e-cal-model.h b/calendar/gui/e-cal-model.h
index a514c95ab2..6dd04675ed 100644
--- a/calendar/gui/e-cal-model.h
+++ b/calendar/gui/e-cal-model.h
@@ -263,6 +263,10 @@ void e_cal_model_set_search_query (ECalModel *model,
icalcomponent * e_cal_model_create_component_with_defaults
(ECalModel *model,
gboolean all_day);
+gchar * e_cal_model_get_attendees_status_info
+ (ECalModel *model,
+ ECalComponent *comp,
+ ECalClient *cal_client);
const gchar * e_cal_model_get_color_for_component
(ECalModel *model,
ECalModelComponent *comp_data);
diff --git a/calendar/gui/e-calendar-selector.c b/calendar/gui/e-calendar-selector.c
index c71e3b99aa..989391625b 100644
--- a/calendar/gui/e-calendar-selector.c
+++ b/calendar/gui/e-calendar-selector.c
@@ -26,13 +26,17 @@
#include <libecal/e-cal-client.h>
#include <libedataserverui/e-client-utils.h>
+
#include "e-util/e-selection.h"
struct _ECalendarSelectorPrivate {
gint dummy_value;
};
-static gpointer parent_class;
+G_DEFINE_TYPE (
+ ECalendarSelector,
+ e_calendar_selector,
+ E_TYPE_SOURCE_SELECTOR)
static gboolean
calendar_selector_update_single_object (ECalClient *client,
@@ -170,7 +174,8 @@ calendar_selector_data_dropped (ESourceSelector *selector,
icalcomponent_set_uid (icalcomp, uid);
}
- e_client_utils_open_new (destination, E_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL,
+ e_client_utils_open_new (
+ destination, E_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL,
e_client_utils_authenticate_handler, NULL,
client_opened_cb, icalcomp);
@@ -187,11 +192,10 @@ exit:
}
static void
-calendar_selector_class_init (ECalendarSelectorClass *class)
+e_calendar_selector_class_init (ECalendarSelectorClass *class)
{
ESourceSelectorClass *source_selector_class;
- parent_class = g_type_class_peek_parent (class);
g_type_class_add_private (class, sizeof (ECalendarSelectorPrivate));
source_selector_class = E_SOURCE_SELECTOR_CLASS (class);
@@ -199,7 +203,7 @@ calendar_selector_class_init (ECalendarSelectorClass *class)
}
static void
-calendar_selector_init (ECalendarSelector *selector)
+e_calendar_selector_init (ECalendarSelector *selector)
{
selector->priv = G_TYPE_INSTANCE_GET_PRIVATE (
selector, E_TYPE_CALENDAR_SELECTOR, ECalendarSelectorPrivate);
@@ -211,33 +215,6 @@ calendar_selector_init (ECalendarSelector *selector)
e_drag_dest_add_calendar_targets (GTK_WIDGET (selector));
}
-GType
-e_calendar_selector_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- const GTypeInfo type_info = {
- sizeof (ECalendarSelectorClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) calendar_selector_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (ECalendarSelector),
- 0, /* n_preallocs */
- (GInstanceInitFunc) calendar_selector_init,
- NULL /* value_table */
- };
-
- type = g_type_register_static (
- E_TYPE_SOURCE_SELECTOR, "ECalendarSelector",
- &type_info, 0);
- }
-
- return type;
-}
-
GtkWidget *
e_calendar_selector_new (ESourceList *source_list)
{
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 82bbea2f79..84046e7aac 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -30,11 +30,11 @@
#include <glib/gi18n.h>
#include <glib/gstdio.h>
#include <gdk/gdkkeysyms.h>
+#include <libebackend/e-extensible.h>
#include <libedataserver/e-time-utils.h>
#include <libedataserverui/e-client-utils.h>
#include <e-util/e-util.h>
#include <e-util/e-alert-dialog.h>
-#include <e-util/e-extensible.h>
#include <e-util/e-selection.h>
#include <e-util/e-datetime-format.h>
#include <e-util/e-dialog-utils.h>
@@ -218,12 +218,15 @@ calendar_view_delete_event (ECalendarView *cal_view,
const gchar *uid;
gchar *rid = NULL;
- if ((itip_organizer_is_user (comp, event->comp_data->client) || itip_sentby_is_user (comp, event->comp_data->client))
+ if ((itip_organizer_is_user (comp, event->comp_data->client) ||
+ itip_sentby_is_user (comp, event->comp_data->client))
&& cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)),
event->comp_data->client,
comp, TRUE))
- itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp,
- event->comp_data->client, NULL, NULL, NULL, TRUE, FALSE);
+ itip_send_comp (
+ E_CAL_COMPONENT_METHOD_CANCEL,
+ comp, event->comp_data->client, NULL, NULL,
+ NULL, TRUE, FALSE);
e_cal_component_get_uid (comp, &uid);
if (!uid || !*uid) {
@@ -473,11 +476,14 @@ calendar_view_cut_clipboard (ESelectable *selectable)
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- if ((itip_organizer_is_user (comp, event->comp_data->client) || itip_sentby_is_user (comp, event->comp_data->client))
+ if ((itip_organizer_is_user (comp, event->comp_data->client) ||
+ itip_sentby_is_user (comp, event->comp_data->client))
&& cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)),
event->comp_data->client, comp, TRUE))
- itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp,
- event->comp_data->client, NULL, NULL, NULL, TRUE, FALSE);
+ itip_send_comp (
+ E_CAL_COMPONENT_METHOD_CANCEL,
+ comp, event->comp_data->client, NULL, NULL,
+ NULL, TRUE, FALSE);
e_cal_component_get_uid (comp, &uid);
if (e_cal_component_is_instance (comp)) {
@@ -1058,11 +1064,16 @@ e_calendar_view_add_event (ECalendarView *cal_view,
g_free (uid);
}
- if ((itip_organizer_is_user (comp, client) || itip_sentby_is_user (comp, client)) &&
- send_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)),
- client, comp, TRUE, &strip_alarms, NULL)) {
- itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp,
- client, NULL, NULL, NULL, strip_alarms, FALSE);
+ if ((itip_organizer_is_user (comp, client) ||
+ itip_sentby_is_user (comp, client)) &&
+ send_component_dialog (
+ (GtkWindow *) gtk_widget_get_toplevel (
+ GTK_WIDGET (cal_view)),
+ client, comp, TRUE, &strip_alarms, NULL)) {
+ itip_send_comp (
+ E_CAL_COMPONENT_METHOD_REQUEST,
+ comp, client, NULL, NULL, NULL, strip_alarms,
+ FALSE);
}
} else {
g_message (G_STRLOC ": Could not create the object! %s", error ? error->message : "");
@@ -1339,7 +1350,8 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
e_cal_component_free_datetime (&dt);
- if ((itip_organizer_is_user (comp, event->comp_data->client) || itip_sentby_is_user (comp, event->comp_data->client))
+ if ((itip_organizer_is_user (comp, event->comp_data->client) ||
+ itip_sentby_is_user (comp, event->comp_data->client))
&& cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)),
event->comp_data->client,
comp, TRUE) && !e_cal_client_check_save_schedules (event->comp_data->client)) {
@@ -1354,7 +1366,11 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
e_cal_component_free_datetime (&range.datetime);
}
- itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp, event->comp_data->client, NULL, NULL, NULL, TRUE, FALSE);
+
+ itip_send_comp (
+ E_CAL_COMPONENT_METHOD_CANCEL,
+ comp, event->comp_data->client, NULL, NULL,
+ NULL, TRUE, FALSE);
}
if (is_instance)
@@ -1437,8 +1453,14 @@ e_calendar_view_new_appointment_for (ECalendarView *cal_view,
if (e_client_is_readonly (E_CLIENT (default_client))) {
GtkWidget *widget;
+ ESource *source;
+
+ source = e_client_get_source (E_CLIENT (default_client));
- widget = e_alert_dialog_new_for_args (parent, "calendar:prompt-read-only-cal", e_source_peek_name (e_client_get_source (E_CLIENT (default_client))), NULL);
+ widget = e_alert_dialog_new_for_args (
+ parent, "calendar:prompt-read-only-cal",
+ e_source_peek_name (source),
+ NULL);
g_signal_connect ((GtkDialog *)widget, "response", G_CALLBACK (gtk_widget_destroy),
widget);
@@ -1653,7 +1675,9 @@ e_calendar_view_edit_appointment (ECalendarView *cal_view,
ECalComponent *comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp));
flags |= COMP_EDITOR_MEETING;
- if (itip_organizer_is_user (comp, client) || itip_sentby_is_user (comp, client) || !e_cal_component_has_attendees (comp))
+ if (itip_organizer_is_user (comp, client) ||
+ itip_sentby_is_user (comp, client) ||
+ !e_cal_component_has_attendees (comp))
flags |= COMP_EDITOR_USER_ORG;
g_object_unref (comp);
}
@@ -1662,7 +1686,8 @@ e_calendar_view_edit_appointment (ECalendarView *cal_view,
}
void
-e_calendar_view_modify_and_send (ECalComponent *comp,
+e_calendar_view_modify_and_send (ECalendarView *cal_view,
+ ECalComponent *comp,
ECalClient *client,
CalObjModType mod,
GtkWindow *toplevel,
@@ -1671,12 +1696,15 @@ e_calendar_view_modify_and_send (ECalComponent *comp,
gboolean only_new_attendees = FALSE;
GError *error = NULL;
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
+
e_cal_component_commit_sequence (comp);
if (e_cal_client_modify_object_sync (client, e_cal_component_get_icalcomponent (comp), mod, NULL, &error)) {
gboolean strip_alarms = TRUE;
- if ((itip_organizer_is_user (comp, client) || itip_sentby_is_user (comp, client)) &&
+ if ((itip_organizer_is_user (comp, client) ||
+ itip_sentby_is_user (comp, client)) &&
send_component_dialog (toplevel, client, comp, new, &strip_alarms, &only_new_attendees)) {
ECalComponent *send_comp = NULL;
@@ -1699,7 +1727,10 @@ e_calendar_view_modify_and_send (ECalComponent *comp,
}
}
- itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, send_comp ? send_comp : comp, client, NULL, NULL, NULL, strip_alarms, only_new_attendees);
+ itip_send_comp (
+ E_CAL_COMPONENT_METHOD_REQUEST,
+ send_comp ? send_comp : comp, client, NULL,
+ NULL, NULL, strip_alarms, only_new_attendees);
if (send_comp)
g_object_unref (send_comp);
@@ -1784,84 +1815,6 @@ e_calendar_view_move_tip (GtkWidget *widget,
gtk_widget_show (widget);
}
-/**
- * Returns information about attendees in the component. If no attendees, then returns NULL.
- * The information is like "Status: Accepted: X Declined: Y ...".
- * Free returned pointer with g_free.
- **/
-gchar *
-e_calendar_view_get_attendees_status_info (ECalComponent *comp,
- ECalClient *client)
-{
- struct _values {
- icalparameter_partstat status;
- const gchar *caption;
- gint count;
- } values[] = {
- { ICAL_PARTSTAT_ACCEPTED, N_("Accepted"), 0 },
- { ICAL_PARTSTAT_DECLINED, N_("Declined"), 0 },
- { ICAL_PARTSTAT_TENTATIVE, N_("Tentative"), 0 },
- { ICAL_PARTSTAT_DELEGATED, N_("Delegated"), 0 },
- { ICAL_PARTSTAT_NEEDSACTION, N_("Needs action"), 0 },
- { ICAL_PARTSTAT_NONE, N_("Other"), 0 },
- { ICAL_PARTSTAT_X, NULL, -1 }
- };
-
- GSList *attendees = NULL, *a;
- gboolean have = FALSE;
- gchar *res = NULL;
- gint i;
-
- if (!comp || !e_cal_component_has_attendees (comp) || !itip_organizer_is_user_ex (comp, client, TRUE))
- return NULL;
-
- e_cal_component_get_attendee_list (comp, &attendees);
-
- for (a = attendees; a; a = a->next) {
- ECalComponentAttendee *att = a->data;
-
- if (att && att->cutype == ICAL_CUTYPE_INDIVIDUAL &&
- (att->role == ICAL_ROLE_CHAIR ||
- att->role == ICAL_ROLE_REQPARTICIPANT ||
- att->role == ICAL_ROLE_OPTPARTICIPANT)) {
- have = TRUE;
-
- for (i = 0; values[i].count != -1; i++) {
- if (att->status == values[i].status || values[i].status == ICAL_PARTSTAT_NONE) {
- values[i].count++;
- break;
- }
- }
- }
- }
-
- if (have) {
- GString *str = g_string_new ("");
-
- for (i = 0; values[i].count != -1; i++) {
- if (values[i].count > 0) {
- if (str->str && *str->str)
- g_string_append (str, " ");
-
- g_string_append_printf (str, "%s: %d", _(values[i].caption), values[i].count);
- }
- }
-
- g_string_prepend (str, ": ");
-
- /* To Translators: 'Status' here means the state of the attendees, the resulting string will be in a form:
- * Status: Accepted: X Declined: Y ... */
- g_string_prepend (str, _("Status"));
-
- res = g_string_free (str, FALSE);
- }
-
- if (attendees)
- e_cal_component_free_attendee_list (attendees);
-
- return res;
-}
-
/*
* It is expected to show the tooltips in this below format
*
@@ -1873,7 +1826,8 @@ e_calendar_view_get_attendees_status_info (ECalComponent *comp,
*/
gboolean
-e_calendar_view_get_tooltips (const ECalendarViewEventData *data)
+e_calendar_view_get_tooltips (ECalendarView *cal_view,
+ const ECalendarViewEventData *data)
{
GtkWidget *label, *box, *hbox, *ebox, *frame;
const gchar *str;
@@ -1888,9 +1842,14 @@ e_calendar_view_get_tooltips (const ECalendarViewEventData *data)
GdkWindow *window;
ECalComponent *newcomp = e_cal_component_new ();
icaltimezone *zone, *default_zone;
+ ECalModel *model;
ECalClient *client = NULL;
gboolean free_text = FALSE;
+ g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), FALSE);
+
+ model = e_calendar_view_get_model (cal_view);
+
/* Delete any stray tooltip if left */
if (widget)
gtk_widget_destroy (widget);
@@ -2023,7 +1982,8 @@ e_calendar_view_get_tooltips (const ECalendarViewEventData *data)
g_free (tmp2);
g_free (tmp1);
- tmp = e_calendar_view_get_attendees_status_info (newcomp, pevent->comp_data->client);
+ tmp = e_cal_model_get_attendees_status_info (
+ model, newcomp, pevent->comp_data->client);
if (tmp) {
hbox = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start ((GtkBox *) hbox, gtk_label_new (tmp), FALSE, FALSE, 0);
diff --git a/calendar/gui/e-calendar-view.h b/calendar/gui/e-calendar-view.h
index decfdfffbf..7ebcef7d1c 100644
--- a/calendar/gui/e-calendar-view.h
+++ b/calendar/gui/e-calendar-view.h
@@ -235,18 +235,21 @@ void e_calendar_view_new_appointment_full
gboolean meeting,
gboolean no_past_date);
void e_calendar_view_new_appointment (ECalendarView *cal_view);
-void e_calendar_view_edit_appointment (ECalendarView *cal_view,
+void e_calendar_view_edit_appointment
+ (ECalendarView *cal_view,
ECalClient *client,
icalcomponent *icalcomp,
EEditEventMode mode);
void e_calendar_view_open_event (ECalendarView *cal_view);
-void e_calendar_view_modify_and_send (ECalComponent *comp,
+void e_calendar_view_modify_and_send (ECalendarView *cal_view,
+ ECalComponent *comp,
ECalClient *client,
CalObjModType mod,
GtkWindow *toplevel,
gboolean new);
-gboolean e_calendar_view_get_tooltips (const ECalendarViewEventData *data);
+gboolean e_calendar_view_get_tooltips (ECalendarView *cal_view,
+ const ECalendarViewEventData *data);
void e_calendar_view_move_tip (GtkWidget *widget,
gint x,
@@ -256,9 +259,6 @@ const gchar * e_calendar_view_get_icalcomponent_summary
(ECalClient *ecal,
icalcomponent *icalcomp,
gboolean *free_text);
-gchar * e_calendar_view_get_attendees_status_info
- (ECalComponent *comp,
- ECalClient *client);
void e_calendar_view_emit_user_created
(ECalendarView *cal_view);
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index c379f2aecb..b6cdc967e7 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -185,7 +185,7 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item,
gint item_x, item_y, item_w, item_h, bar_y1, bar_y2;
GdkColor bg_color;
ECalComponent *comp;
- gint num_icons, icon_x, icon_y, icon_x_inc = 0, icon_y_inc = 0;
+ gint num_icons, icon_x = 0, icon_y, icon_x_inc = 0, icon_y_inc = 0;
gint max_icon_w, max_icon_h;
gboolean draw_reminder_icon, draw_recurrence_icon, draw_timezone_icon, draw_meeting_icon;
gboolean draw_attach_icon;
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index efad7dbc6f..8af5ffb3fa 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -739,7 +739,9 @@ process_component (EDayView *day_view,
/* Add the object */
add_event_data.day_view = day_view;
add_event_data.comp_data = comp_data;
- e_day_view_add_event (comp, comp_data->instance_start, comp_data->instance_end, &add_event_data);
+ e_day_view_add_event (
+ comp, comp_data->instance_start,
+ comp_data->instance_end, &add_event_data);
g_object_unref (comp);
g_free (rid);
@@ -4225,7 +4227,8 @@ e_day_view_finish_long_event_resize (EDayView *day_view)
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- if (e_cal_component_has_attendees (comp) && !itip_organizer_is_user (comp, client)) {
+ if (e_cal_component_has_attendees (comp) &&
+ !itip_organizer_is_user (comp, client)) {
g_object_unref (comp);
e_day_view_abort_resize (day_view);
return;
@@ -4297,7 +4300,10 @@ e_day_view_finish_long_event_resize (EDayView *day_view)
mod = CALOBJ_MOD_THIS;
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
- e_calendar_view_modify_and_send (comp, client, mod, toplevel, TRUE);
+
+ e_calendar_view_modify_and_send (
+ E_CALENDAR_VIEW (day_view),
+ comp, client, mod, toplevel, TRUE);
out:
day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_NONE;
@@ -4343,7 +4349,8 @@ e_day_view_finish_resize (EDayView *day_view)
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- if (e_cal_component_has_attendees (comp) && !itip_organizer_is_user (comp, client)) {
+ if (e_cal_component_has_attendees (comp) &&
+ !itip_organizer_is_user (comp, client)) {
g_object_unref (comp);
e_day_view_abort_resize (day_view);
return;
@@ -4413,7 +4420,11 @@ e_day_view_finish_resize (EDayView *day_view)
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
e_cal_component_commit_sequence (comp);
- e_calendar_view_modify_and_send (comp, client, mod, toplevel, TRUE);
+
+ e_calendar_view_modify_and_send (
+ E_CALENDAR_VIEW (day_view),
+ comp, client, mod, toplevel, TRUE);
+
out:
g_object_unref (comp);
}
@@ -4558,7 +4569,9 @@ e_day_view_add_event (ECalComponent *comp,
e_calendar_view_get_timezone (E_CALENDAR_VIEW (add_event_data->day_view))))
event.different_timezone = TRUE;
- if (!e_cal_component_has_attendees (comp) || itip_organizer_is_user (comp, event.comp_data->client) || itip_sentby_is_user (comp, event.comp_data->client))
+ if (!e_cal_component_has_attendees (comp) ||
+ itip_organizer_is_user (comp, event.comp_data->client) ||
+ itip_sentby_is_user (comp, event.comp_data->client))
event.is_editable = TRUE;
else
event.is_editable = FALSE;
@@ -5099,9 +5112,11 @@ e_day_view_add_new_event_in_selected_range (EDayView *day_view,
const gchar *uid;
AddEventData add_event_data;
- /* Check if the client is read only */
model = e_calendar_view_get_model (E_CALENDAR_VIEW (day_view));
+
client = e_cal_model_get_default_client (model);
+
+ /* Check if the client is read only */
if (e_client_is_readonly (E_CLIENT (client)))
return FALSE;
@@ -6488,7 +6503,8 @@ e_day_view_change_event_time (EDayView *day_view,
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- if (e_cal_component_has_attendees (comp) && !itip_organizer_is_user (comp, client)) {
+ if (e_cal_component_has_attendees (comp) &&
+ !itip_organizer_is_user (comp, client)) {
g_object_unref (comp);
return;
}
@@ -6537,7 +6553,10 @@ e_day_view_change_event_time (EDayView *day_view,
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
e_cal_component_commit_sequence (comp);
- e_calendar_view_modify_and_send (comp, client, mod, toplevel, TRUE);
+
+ e_calendar_view_modify_and_send (
+ E_CALENDAR_VIEW (day_view),
+ comp, client, mod, toplevel, TRUE);
out:
g_object_unref (comp);
@@ -6861,7 +6880,10 @@ e_day_view_on_editing_stopped (EDayView *day_view,
/* FIXME When sending here, what exactly should we send? */
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
- e_calendar_view_modify_and_send (comp, client, mod, toplevel, FALSE);
+
+ e_calendar_view_modify_and_send (
+ E_CALENDAR_VIEW (day_view),
+ comp, client, mod, toplevel, FALSE);
}
}
@@ -7863,13 +7885,13 @@ e_day_view_on_drag_data_get (GtkWidget *widget,
comp_str = icalcomponent_as_ical_string_r (vcal);
if (comp_str) {
- ESource *source = e_client_get_source (E_CLIENT (event->comp_data->client));
- const gchar *source_uid = e_source_peek_uid (source);
+ ESource *source;
+ const gchar *source_uid;
GdkAtom target;
gchar *tmp;
- if (!source_uid)
- source_uid = "";
+ source = e_client_get_source (E_CLIENT (event->comp_data->client));
+ source_uid = e_source_peek_uid (source);
tmp = g_strconcat (source_uid, "\n", comp_str, NULL);
target = gtk_selection_data_get_target (selection_data);
@@ -7984,7 +8006,8 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- if (e_cal_component_has_attendees (comp) && !itip_organizer_is_user (comp, client)) {
+ if (e_cal_component_has_attendees (comp) &&
+ !itip_organizer_is_user (comp, client)) {
g_object_unref (comp);
return;
}
@@ -8055,7 +8078,10 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
mod = CALOBJ_MOD_THIS;
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
- e_calendar_view_modify_and_send (comp, client, mod, toplevel, FALSE);
+
+ e_calendar_view_modify_and_send (
+ E_CALENDAR_VIEW (day_view),
+ comp, client, mod, toplevel, FALSE);
g_object_unref (comp);
@@ -8234,7 +8260,8 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- if (e_cal_component_has_attendees (comp) && !itip_organizer_is_user (comp, client)) {
+ if (e_cal_component_has_attendees (comp) &&
+ !itip_organizer_is_user (comp, client)) {
g_object_unref (comp);
return;
}
@@ -8282,7 +8309,10 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
mod = CALOBJ_MOD_THIS;
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
- e_calendar_view_modify_and_send (comp, client, mod, toplevel, FALSE);
+
+ e_calendar_view_modify_and_send (
+ E_CALENDAR_VIEW (day_view),
+ comp, client, mod, toplevel, FALSE);
g_object_unref (comp);
diff --git a/calendar/gui/e-meeting-attendee.c b/calendar/gui/e-meeting-attendee.c
index e783195ec1..00e3f9d543 100644
--- a/calendar/gui/e-meeting-attendee.c
+++ b/calendar/gui/e-meeting-attendee.c
@@ -158,7 +158,6 @@ e_meeting_attendee_init (EMeetingAttendee *ia)
priv->longest_period_in_days = 0;
}
-
static void
e_meeting_attendee_finalize (GObject *obj)
{
diff --git a/calendar/gui/e-meeting-attendee.h b/calendar/gui/e-meeting-attendee.h
index bc2eaa046b..7545a0f52d 100644
--- a/calendar/gui/e-meeting-attendee.h
+++ b/calendar/gui/e-meeting-attendee.h
@@ -36,7 +36,6 @@ G_BEGIN_DECLS
#define E_IS_MEETING_ATTENDEE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_MEETING_ATTENDEE))
#define E_IS_MEETING_ATTENDEE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_MEETING_ATTENDEE))
-
typedef struct _EMeetingAttendee EMeetingAttendee;
typedef struct _EMeetingAttendeePrivate EMeetingAttendeePrivate;
typedef struct _EMeetingAttendeeClass EMeetingAttendeeClass;
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
index 51ce798a8b..833c6a821e 100644
--- a/calendar/gui/e-meeting-store.c
+++ b/calendar/gui/e-meeting-store.c
@@ -31,10 +31,10 @@
#include <libecal/e-cal-component.h>
#include <libecal/e-cal-util.h>
#include <libecal/e-cal-time-util.h>
+#include <libebackend/e-extensible.h>
#include <libedataserver/e-data-server-util.h>
#include <libedataserver/e-proxy.h>
#include <libedataserverui/e-passwords.h>
-#include <e-util/e-extensible.h>
#include <e-util/e-account-utils.h>
#include <e-util/e-util-enumtypes.h>
#include "itip-utils.h"
@@ -1984,7 +1984,9 @@ download_with_libsoup (const gchar *uri,
g_object_set_data_full (G_OBJECT (msg), "orig-uri", g_strdup (uri), g_free);
session = soup_session_async_new ();
- g_signal_connect (session, "authenticate", G_CALLBACK (soup_authenticate), NULL);
+ g_signal_connect (
+ session, "authenticate",
+ G_CALLBACK (soup_authenticate), NULL);
proxy = e_proxy_new ();
e_proxy_setup_proxy (proxy);
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 9afdfd7a22..36e7ad7d42 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -31,15 +31,15 @@
#include <stdio.h>
#include <string.h>
#include <time.h>
-#include <gdk/gdkkeysyms.h>
#include <glib/gi18n.h>
+#include <gdk/gdkkeysyms.h>
+#include <libebackend/e-extensible.h>
#include <libgnomecanvas/libgnomecanvas.h>
#include "misc/e-canvas.h"
#include "misc/e-canvas-utils.h"
-
#include "misc/e-dateedit.h"
-#include "e-util/e-extensible.h"
+
#include "e-util/e-util.h"
#include "e-meeting-utils.h"
diff --git a/calendar/gui/e-meeting-types.h b/calendar/gui/e-meeting-types.h
index 50964f1619..b8f1057962 100644
--- a/calendar/gui/e-meeting-types.h
+++ b/calendar/gui/e-meeting-types.h
@@ -28,8 +28,6 @@
G_BEGIN_DECLS
-
-
typedef struct _EMeetingTime EMeetingTime;
typedef struct _EMeetingFreeBusyPeriod EMeetingFreeBusyPeriod;
diff --git a/calendar/gui/e-memo-list-selector.c b/calendar/gui/e-memo-list-selector.c
index 5fff33d188..4484f94298 100644
--- a/calendar/gui/e-memo-list-selector.c
+++ b/calendar/gui/e-memo-list-selector.c
@@ -34,7 +34,10 @@ struct _EMemoListSelectorPrivate {
gint dummy_value;
};
-static gpointer parent_class;
+G_DEFINE_TYPE (
+ EMemoListSelector,
+ e_memo_list_selector,
+ E_TYPE_SOURCE_SELECTOR)
static gboolean
memo_list_selector_update_single_object (ECalClient *client,
@@ -302,11 +305,10 @@ memo_list_selector_data_dropped (ESourceSelector *selector,
}
static void
-memo_list_selector_class_init (EMemoListSelectorClass *class)
+e_memo_list_selector_class_init (EMemoListSelectorClass *class)
{
ESourceSelectorClass *source_selector_class;
- parent_class = g_type_class_peek_parent (class);
g_type_class_add_private (class, sizeof (EMemoListSelectorPrivate));
source_selector_class = E_SOURCE_SELECTOR_CLASS (class);
@@ -314,7 +316,7 @@ memo_list_selector_class_init (EMemoListSelectorClass *class)
}
static void
-memo_list_selector_init (EMemoListSelector *selector)
+e_memo_list_selector_init (EMemoListSelector *selector)
{
selector->priv = G_TYPE_INSTANCE_GET_PRIVATE (
selector, E_TYPE_MEMO_LIST_SELECTOR, EMemoListSelectorPrivate);
@@ -326,33 +328,6 @@ memo_list_selector_init (EMemoListSelector *selector)
e_drag_dest_add_calendar_targets (GTK_WIDGET (selector));
}
-GType
-e_memo_list_selector_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- const GTypeInfo type_info = {
- sizeof (EMemoListSelectorClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) memo_list_selector_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (EMemoListSelector),
- 0, /* n_preallocs */
- (GInstanceInitFunc) memo_list_selector_init,
- NULL /* value_table */
- };
-
- type = g_type_register_static (
- E_TYPE_SOURCE_SELECTOR, "EMemoListSelector",
- &type_info, 0);
- }
-
- return type;
-}
-
GtkWidget *
e_memo_list_selector_new (ESourceList *source_list)
{
diff --git a/calendar/gui/e-task-list-selector.c b/calendar/gui/e-task-list-selector.c
index 7e091599cf..ba210e8c05 100644
--- a/calendar/gui/e-task-list-selector.c
+++ b/calendar/gui/e-task-list-selector.c
@@ -34,7 +34,10 @@ struct _ETaskListSelectorPrivate {
gint dummy_value;
};
-static gpointer parent_class;
+G_DEFINE_TYPE (
+ ETaskListSelector,
+ e_task_list_selector,
+ E_TYPE_SOURCE_SELECTOR)
static gboolean
task_list_selector_update_single_object (ECalClient *client,
@@ -304,11 +307,10 @@ task_list_selector_data_dropped (ESourceSelector *selector,
}
static void
-task_list_selector_class_init (ETaskListSelectorClass *class)
+e_task_list_selector_class_init (ETaskListSelectorClass *class)
{
ESourceSelectorClass *source_selector_class;
- parent_class = g_type_class_peek_parent (class);
g_type_class_add_private (class, sizeof (ETaskListSelectorPrivate));
source_selector_class = E_SOURCE_SELECTOR_CLASS (class);
@@ -316,7 +318,7 @@ task_list_selector_class_init (ETaskListSelectorClass *class)
}
static void
-task_list_selector_init (ETaskListSelector *selector)
+e_task_list_selector_init (ETaskListSelector *selector)
{
selector->priv = G_TYPE_INSTANCE_GET_PRIVATE (
selector, E_TYPE_TASK_LIST_SELECTOR, ETaskListSelectorPrivate);
@@ -328,33 +330,6 @@ task_list_selector_init (ETaskListSelector *selector)
e_drag_dest_add_calendar_targets (GTK_WIDGET (selector));
}
-GType
-e_task_list_selector_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- const GTypeInfo type_info = {
- sizeof (ETaskListSelectorClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) task_list_selector_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (ETaskListSelector),
- 0, /* n_preallocs */
- (GInstanceInitFunc) task_list_selector_init,
- NULL /* value_table */
- };
-
- type = g_type_register_static (
- E_TYPE_SOURCE_SELECTOR, "ETaskListSelector",
- &type_info, 0);
- }
-
- return type;
-}
-
GtkWidget *
e_task_list_selector_new (ESourceList *source_list)
{
diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c
index ec49cd1478..0a38889e2d 100644
--- a/calendar/gui/e-task-table.c
+++ b/calendar/gui/e-task-table.c
@@ -712,6 +712,7 @@ task_table_query_tooltip (GtkWidget *widget,
model = e_task_table_get_model (task_table);
comp_data = e_cal_model_get_component_at (model, row);
+
if (!comp_data || !comp_data->icalcomp)
return FALSE;
@@ -850,8 +851,8 @@ task_table_query_tooltip (GtkWidget *widget,
e_cal_component_free_datetime (&dtstart);
e_cal_component_free_datetime (&dtdue);
- tmp = e_calendar_view_get_attendees_status_info (
- new_comp, comp_data->client);
+ tmp = e_cal_model_get_attendees_status_info (
+ model, new_comp, comp_data->client);
if (tmp) {
l = gtk_label_new (tmp);
gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5);
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index a98ff42776..036b6192f5 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -3901,7 +3901,10 @@ e_week_view_change_event_time (EWeekView *week_view,
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (week_view)));
e_cal_component_commit_sequence (comp);
- e_calendar_view_modify_and_send (comp, client, mod, toplevel, TRUE);
+
+ e_calendar_view_modify_and_send (
+ E_CALENDAR_VIEW (week_view),
+ comp, client, mod, toplevel, TRUE);
out:
g_object_unref (comp);
@@ -4112,7 +4115,10 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
/* FIXME When sending here, what exactly should we send? */
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (week_view)));
- e_calendar_view_modify_and_send (comp, client, mod, toplevel, FALSE);
+
+ e_calendar_view_modify_and_send (
+ E_CALENDAR_VIEW (week_view),
+ comp, client, mod, toplevel, FALSE);
}
}
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 654eb1898a..66c90fb1c2 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -138,9 +138,9 @@ struct _GnomeCalendarPrivate {
enum {
PROP_0,
PROP_DATE_NAVIGATOR,
- PROP_VIEW,
PROP_MEMO_TABLE,
- PROP_TASK_TABLE
+ PROP_TASK_TABLE,
+ PROP_VIEW
};
enum {
@@ -341,12 +341,6 @@ gnome_calendar_set_property (GObject *object,
g_value_get_object (value));
return;
- case PROP_VIEW:
- gnome_calendar_set_view (
- GNOME_CALENDAR (object),
- g_value_get_int (value));
- return;
-
case PROP_MEMO_TABLE:
gnome_calendar_set_memo_table (
GNOME_CALENDAR (object),
@@ -358,6 +352,12 @@ gnome_calendar_set_property (GObject *object,
GNOME_CALENDAR (object),
g_value_get_object (value));
return;
+
+ case PROP_VIEW:
+ gnome_calendar_set_view (
+ GNOME_CALENDAR (object),
+ g_value_get_int (value));
+ return;
}
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -376,12 +376,6 @@ gnome_calendar_get_property (GObject *object,
GNOME_CALENDAR (object)));
return;
- case PROP_VIEW:
- g_value_set_int (
- value, gnome_calendar_get_view (
- GNOME_CALENDAR (object)));
- return;
-
case PROP_MEMO_TABLE:
g_value_set_object (
value, gnome_calendar_get_memo_table (
@@ -393,6 +387,12 @@ gnome_calendar_get_property (GObject *object,
value, gnome_calendar_get_task_table (
GNOME_CALENDAR (object)));
return;
+
+ case PROP_VIEW:
+ g_value_set_int (
+ value, gnome_calendar_get_view (
+ GNOME_CALENDAR (object)));
+ return;
}
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -528,18 +528,6 @@ gnome_calendar_class_init (GnomeCalendarClass *class)
g_object_class_install_property (
object_class,
- PROP_VIEW,
- g_param_spec_int (
- "view",
- "View",
- NULL,
- GNOME_CAL_DAY_VIEW,
- GNOME_CAL_LIST_VIEW,
- GNOME_CAL_DAY_VIEW,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (
- object_class,
PROP_MEMO_TABLE,
g_param_spec_object (
"memo-table",
@@ -558,6 +546,18 @@ gnome_calendar_class_init (GnomeCalendarClass *class)
E_TYPE_TASK_TABLE,
G_PARAM_READWRITE));
+ g_object_class_install_property (
+ object_class,
+ PROP_VIEW,
+ g_param_spec_int (
+ "view",
+ "View",
+ NULL,
+ GNOME_CAL_DAY_VIEW,
+ GNOME_CAL_LIST_VIEW,
+ GNOME_CAL_DAY_VIEW,
+ G_PARAM_READWRITE));
+
signals[DATES_SHOWN_CHANGED] =
g_signal_new ("dates_shown_changed",
G_TYPE_FROM_CLASS (object_class),
diff --git a/calendar/gui/misc.c b/calendar/gui/misc.c
index f3bacef89b..a3243afa43 100644
--- a/calendar/gui/misc.c
+++ b/calendar/gui/misc.c
@@ -33,8 +33,6 @@
#include "misc.h"
-
-
/**
* string_is_empty:
* @value: A string.
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index 6d37168fc1..29d6b30264 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -116,8 +116,6 @@ get_font_size (PangoFontDescription *font)
return pango_units_to_double (pango_font_description_get_size (font));
}
-
-
/*
* Note that most dimensions are in points (1/72 of an inch) since that is
* what gnome-print uses.
diff --git a/calendar/gui/weekday-picker.c b/calendar/gui/weekday-picker.c
index d1a9a2835a..a06b249ee5 100644
--- a/calendar/gui/weekday-picker.c
+++ b/calendar/gui/weekday-picker.c
@@ -59,8 +59,6 @@ struct _WeekdayPickerPrivate {
GnomeCanvasItem *labels[7];
};
-
-
/* Signal IDs */
enum {
CHANGED,
diff --git a/calendar/gui/weekday-picker.h b/calendar/gui/weekday-picker.h
index 6939e625c8..315fa5bf53 100644
--- a/calendar/gui/weekday-picker.h
+++ b/calendar/gui/weekday-picker.h
@@ -28,8 +28,6 @@
G_BEGIN_DECLS
-
-
#define TYPE_WEEKDAY_PICKER (weekday_picker_get_type ())
#define WEEKDAY_PICKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_WEEKDAY_PICKER, WeekdayPicker))
#define WEEKDAY_PICKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_WEEKDAY_PICKER, \
@@ -67,8 +65,6 @@ guint weekday_picker_get_blocked_days (WeekdayPicker *wp);
void weekday_picker_set_week_start_day (WeekdayPicker *wp, gint week_start_day);
gint weekday_picker_get_week_start_day (WeekdayPicker *wp);
-
-
G_END_DECLS
#endif
diff --git a/calendar/importers/Makefile.am b/calendar/importers/Makefile.am
index dc7b0dc89f..b16109978e 100644
--- a/calendar/importers/Makefile.am
+++ b/calendar/importers/Makefile.am
@@ -8,8 +8,9 @@ libevolution_calendar_importers_la_CPPFLAGS = \
-I$(top_srcdir)/calendar \
-I$(top_srcdir)/widgets \
-I$(top_builddir)/calendar \
+ $(EVOLUTION_DATA_SERVER_CFLAGS) \
$(GNOME_PLATFORM_CFLAGS) \
- $(EVOLUTION_CALENDAR_CFLAGS)
+ $(GTKHTML_CFLAGS)
libevolution_calendar_importers_la_SOURCES = \
evolution-calendar-importer.h \
@@ -17,11 +18,12 @@ libevolution_calendar_importers_la_SOURCES = \
libevolution_calendar_importers_la_LDFLAGS = $(NO_UNDEFINED)
-libevolution_calendar_importers_la_LIBADD = \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/shell/libeshell.la \
- $(top_builddir)/widgets/misc/libemiscwidgets.la \
- $(EVOLUTION_CALENDAR_LIBS) \
- $(GNOME_PLATFORM_LIBS)
+libevolution_calendar_importers_la_LIBADD = \
+ $(top_builddir)/e-util/libeutil.la \
+ $(top_builddir)/shell/libeshell.la \
+ $(top_builddir)/widgets/misc/libemiscwidgets.la \
+ $(EVOLUTION_DATA_SERVER_LIBS) \
+ $(GNOME_PLATFORM_LIBS) \
+ $(GTKHTML_LIBS)
-include $(top_srcdir)/git.mk
diff --git a/calendar/importers/icalendar-importer.c b/calendar/importers/icalendar-importer.c
index 6083460683..4a7b942ba6 100644
--- a/calendar/importers/icalendar-importer.c
+++ b/calendar/importers/icalendar-importer.c
@@ -335,7 +335,7 @@ ivcal_getwidget (EImport *ei,
if (!group)
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (rb));
if (first == NULL) {
- g_datalist_set_data_full(&target->data, "primary-source", g_object_ref(primary), g_object_unref);
+ g_datalist_set_data_full(&target->data, "primary-source", g_object_ref (primary), g_object_unref);
g_datalist_set_data(&target->data, "primary-type", GINT_TO_POINTER(import_type_map[i]));
first = rb;
}
@@ -867,7 +867,8 @@ open_default_source (ICalIntelligentImporter *ici,
e_import_status (ici->ei, ici->target, _("Opening calendar"), 0);
- e_client_utils_open_new (source, source_type == E_CAL_CLIENT_SOURCE_TYPE_EVENTS ? E_CLIENT_SOURCE_TYPE_EVENTS : E_CLIENT_SOURCE_TYPE_TASKS, FALSE, ici->cancellable,
+ e_client_utils_open_new (
+ source, source_type == E_CAL_CLIENT_SOURCE_TYPE_EVENTS ? E_CLIENT_SOURCE_TYPE_EVENTS : E_CLIENT_SOURCE_TYPE_TASKS, FALSE, ici->cancellable,
e_client_utils_authenticate_handler, NULL,
default_source_opened_cb, odsd);