aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/calendar/e-cal-shell-content.c33
-rw-r--r--modules/calendar/e-cal-shell-sidebar.c2
2 files changed, 30 insertions, 5 deletions
diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c
index 0f888c13e9..1a55c74d35 100644
--- a/modules/calendar/e-cal-shell-content.c
+++ b/modules/calendar/e-cal-shell-content.c
@@ -27,13 +27,13 @@
#include "e-util/gconf-bridge.h"
#include "calendar/gui/calendar-config.h"
-#include "calendar/gui/e-cal-list-view-config.h"
+#include "calendar/gui/calendar-view.h"
+#include "calendar/gui/e-cal-list-view.h"
#include "calendar/gui/e-cal-model-calendar.h"
#include "calendar/gui/e-calendar-table.h"
#include "calendar/gui/e-calendar-table-config.h"
-#include "calendar/gui/e-day-view-config.h"
+#include "calendar/gui/e-calendar-view.h"
#include "calendar/gui/e-memo-table-config.h"
-#include "calendar/gui/e-week-view-config.h"
#include "widgets/menus/gal-view-etable.h"
@@ -77,7 +77,32 @@ static void
cal_shell_content_display_view_cb (ECalShellContent *cal_shell_content,
GalView *gal_view)
{
- /* FIXME */
+ GnomeCalendar *calendar;
+ CalendarView *gal_calendar_view;
+ GnomeCalendarViewType view_type;
+
+ /* XXX This is confusing: we have CalendarView and ECalendarView.
+ * ECalendarView is an abstract base class for calendar view
+ * widgets (day view, week view, etc). CalendarView is a
+ * simple GalView subclass that represents a calendar view. */
+
+ calendar = e_cal_shell_content_get_calendar (cal_shell_content);
+
+ if (GAL_IS_VIEW_ETABLE (gal_view)) {
+ ECalendarView *calendar_view;
+ ETable *table;
+
+ view_type = GNOME_CAL_LIST_VIEW;
+ calendar_view = gnome_calendar_get_calendar_view (
+ calendar, view_type);
+ table = e_table_scrolled_get_table (
+ E_CAL_LIST_VIEW (calendar_view)->table_scrolled);
+ gal_view_etable_attach_table (
+ GAL_VIEW_ETABLE (gal_view), table);
+ } else {
+ view_type = calendar_view_get_view_type (
+ CALENDAR_VIEW (gal_view));
+ }
}
static void
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index dc7df596d6..dc618e2dda 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -349,7 +349,7 @@ cal_shell_sidebar_dispose (GObject *object)
if (priv->mini_calendar_config != NULL) {
g_object_unref (priv->mini_calendar_config);
- priv->mini_calendar = NULL;
+ priv->mini_calendar_config = NULL;
}
/* Chain up to parent's dispose() method. */