diff options
Diffstat (limited to 'calendar/gui/e-itip-control.c')
-rw-r--r-- | calendar/gui/e-itip-control.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index 12442ba2c2..501a3f37a9 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -31,8 +31,6 @@ #include <unistd.h> #include <glib/gi18n.h> #include <glib/gstdio.h> -#include <bonobo/bonobo-object.h> -#include <bonobo/bonobo-exception.h> #include <gtkhtml/gtkhtml.h> #include <gtkhtml/gtkhtml-embedded.h> #include <gtkhtml/gtkhtml-stream.h> @@ -52,6 +50,7 @@ #include "itip-utils.h" #include "e-itip-control.h" #include "common/authentication.h" +#include <shell/e-shell.h> struct _EItipControlPrivate { GtkWidget *html; @@ -243,12 +242,18 @@ source_changed_cb (ESourceComboBox *escb, EItipControl *itip) static void find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data) { + EShell *shell; + EShellSettings *shell_settings; EItipControlFindData *fd = data; EItipControlPrivate *priv; ESource *source; ECalSourceType source_type; icalcomponent *icalcomp; + /* FIXME Pass this in. */ + shell = e_shell_get_default (); + shell_settings = e_shell_get_shell_settings (shell); + source_type = e_cal_get_source_type (ecal); source = e_cal_get_source (ecal); @@ -275,20 +280,24 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data) if (fd->count == 0) { if (fd->show_selector && !priv->current_ecal && priv->vbox.widget) { GtkWidget *escb; + const gchar *property_name; char *uid; switch (priv->type) { case E_CAL_SOURCE_TYPE_EVENT: - uid = calendar_config_get_primary_calendar (); + property_name = "cal-primary-calendar"; break; case E_CAL_SOURCE_TYPE_TODO: - uid = calendar_config_get_primary_tasks (); + property_name = "cal-primary-tasks"; break; default: uid = NULL; g_return_if_reached (); } + uid = e_shell_settings_get_string ( + shell_settings, property_name); + if (uid) { source = e_source_list_peek_source_by_uid (priv->source_lists[priv->type], uid); g_free (uid); |