diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-07-29 09:01:08 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-07-29 09:33:01 +0800 |
commit | 41569bb778e228d4f5a04cb1e15bfa5b49bb044b (patch) | |
tree | 3cd61379dbfcca4a9998800bbe9680b87fcb9692 /modules | |
parent | 7bebc31932e74db65e3720f32ab2f6664fd9e58b (diff) | |
download | gsoc2013-evolution-41569bb778e228d4f5a04cb1e15bfa5b49bb044b.tar gsoc2013-evolution-41569bb778e228d4f5a04cb1e15bfa5b49bb044b.tar.gz gsoc2013-evolution-41569bb778e228d4f5a04cb1e15bfa5b49bb044b.tar.bz2 gsoc2013-evolution-41569bb778e228d4f5a04cb1e15bfa5b49bb044b.tar.lz gsoc2013-evolution-41569bb778e228d4f5a04cb1e15bfa5b49bb044b.tar.xz gsoc2013-evolution-41569bb778e228d4f5a04cb1e15bfa5b49bb044b.tar.zst gsoc2013-evolution-41569bb778e228d4f5a04cb1e15bfa5b49bb044b.zip |
Trimming redundancy.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/calendar/e-cal-shell-content.c | 33 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-sidebar.c | 2 |
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. */ |