diff options
Diffstat (limited to 'applets/clock/clock.c')
| -rw-r--r-- | applets/clock/clock.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/applets/clock/clock.c b/applets/clock/clock.c index cc5ea999..2e26b39f 100644 --- a/applets/clock/clock.c +++ b/applets/clock/clock.c @@ -211,6 +211,10 @@ struct _ClockData { const gchar *weather_icon_name; GDBusProxy *system_manager_proxy; + +#ifdef HAVE_EDS + CalendarClient *calendar_client; +#endif }; /* Used to count the number of clock instances. It's there to know when we @@ -828,6 +832,13 @@ destroy_clock (GtkWidget * widget, ClockData *cd) cd->builder = NULL; } +#ifdef HAVE_EDS + if (cd->calendar_client) { + g_object_unref (cd->calendar_client); + cd->calendar_client = NULL; + } +#endif + g_free (cd); } @@ -887,6 +898,12 @@ create_calendar (ClockData *cd) cd->settings); g_free (prefs_path); +#ifdef HAVE_EDS + if (cd->calendar_client) { + calendar_window_set_client (CALENDAR_WINDOW (window), cd->calendar_client); + } +#endif + calendar_window_set_show_weeks (CALENDAR_WINDOW (window), cd->showweek); @@ -2763,6 +2780,11 @@ fill_clock_applet (MatePanelApplet *applet) * hibernate). */ setup_monitor_for_resume (cd); +#ifdef HAVE_EDS + /* Initialize persistent calendar client */ + cd->calendar_client = calendar_client_new (cd->settings); +#endif + return TRUE; } |
