From d261d0b2e46d4793c2d54540782552846535eb60 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 25 Apr 2009 19:37:21 -0400 Subject: Begin migrating calendar settings to EShellSettings. Begin dismantling calendar-config.c and migrating calendar settings to EShellSettings. EShellSettings utilizes GObject properties instead of separate get/set/notify functions for each setting. --- calendar/gui/e-itip-control.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'calendar/gui/e-itip-control.c') diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index 91f24a973c..4ecacd2bfe 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -50,6 +50,7 @@ #include "itip-utils.h" #include "e-itip-control.h" #include "common/authentication.h" +#include struct _EItipControlPrivate { GtkWidget *html; @@ -241,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); @@ -273,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); -- cgit v1.2.3