From 9199f2c5b1925b6d1092738bf1a1c026e53d37f0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 12 Aug 2009 09:29:44 -0400 Subject: Get the itip-formatter plugin working. --- plugins/itip-formatter/Makefile.am | 1 + plugins/itip-formatter/itip-formatter.c | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'plugins/itip-formatter') diff --git a/plugins/itip-formatter/Makefile.am b/plugins/itip-formatter/Makefile.am index 80b70cc6c9..5253742169 100644 --- a/plugins/itip-formatter/Makefile.am +++ b/plugins/itip-formatter/Makefile.am @@ -1,5 +1,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir) \ + -I$(top_srcdir)/widgets \ $(EVOLUTION_MAIL_CFLAGS) \ $(EVOLUTION_CALENDAR_CFLAGS) diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c index 89313dd995..94f9081ecd 100644 --- a/plugins/itip-formatter/itip-formatter.c +++ b/plugins/itip-formatter/itip-formatter.c @@ -46,7 +46,6 @@ #include #include #include -#include #include #include #include @@ -57,6 +56,7 @@ #include #include #include +#include #include "itip-view.h" #define CLASSID "itip://" @@ -715,18 +715,27 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data) if ((pitip->method == ICAL_METHOD_PUBLISH || pitip->method == ICAL_METHOD_REQUEST) && !pitip->current_ecal) { /* Reuse already declared one or rename? */ + EShell *shell; + EShellSettings *shell_settings; ESource *source = NULL; gchar *uid; + /* FIXME Find a better way to obtain the shell. */ + shell = e_shell_get_default (); + shell_settings = e_shell_get_shell_settings (shell); + switch (pitip->type) { case E_CAL_SOURCE_TYPE_EVENT: - uid = calendar_config_get_primary_calendar (); + uid = e_shell_settings_get_string ( + shell_settings, "cal-primary-calendar"); break; case E_CAL_SOURCE_TYPE_TODO: - uid = calendar_config_get_primary_tasks (); + uid = e_shell_settings_get_string ( + shell_settings, "cal-primary-task-list"); break; case E_CAL_SOURCE_TYPE_JOURNAL: - uid = calendar_config_get_primary_memos (); + uid = e_shell_settings_get_string ( + shell_settings, "cal-primary-memo-list"); break; default: uid = NULL; -- cgit v1.2.3