diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-07-26 03:26:03 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-07-26 03:26:03 +0800 |
commit | ad465a7c1fbea59767741ae5e56a94b5f5f7c6a1 (patch) | |
tree | 94dcd12b95734f19931042ef8129f105a7cca9af /modules/calendar/e-cal-shell-view-actions.c | |
parent | a1e1732de6b64e68c6a30bd097485c00e36a8bec (diff) | |
download | gsoc2013-evolution-ad465a7c1fbea59767741ae5e56a94b5f5f7c6a1.tar gsoc2013-evolution-ad465a7c1fbea59767741ae5e56a94b5f5f7c6a1.tar.gz gsoc2013-evolution-ad465a7c1fbea59767741ae5e56a94b5f5f7c6a1.tar.bz2 gsoc2013-evolution-ad465a7c1fbea59767741ae5e56a94b5f5f7c6a1.tar.lz gsoc2013-evolution-ad465a7c1fbea59767741ae5e56a94b5f5f7c6a1.tar.xz gsoc2013-evolution-ad465a7c1fbea59767741ae5e56a94b5f5f7c6a1.tar.zst gsoc2013-evolution-ad465a7c1fbea59767741ae5e56a94b5f5f7c6a1.zip |
Re-enable building GnomeCalendar, except it doesn't yet.
Also, start trimming the API down a bit. Lots of redundancy there.
Diffstat (limited to 'modules/calendar/e-cal-shell-view-actions.c')
-rw-r--r-- | modules/calendar/e-cal-shell-view-actions.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/modules/calendar/e-cal-shell-view-actions.c b/modules/calendar/e-cal-shell-view-actions.c index 02b7af609e..1358a0615c 100644 --- a/modules/calendar/e-cal-shell-view-actions.c +++ b/modules/calendar/e-cal-shell-view-actions.c @@ -197,20 +197,22 @@ action_calendar_print_cb (GtkAction *action, { #if 0 ECalShellContent *cal_shell_content; + GnomeCalendarViewType view_type; GnomeCalendar *calendar; + ECalendarView *view; GtkPrintOperationAction print_action; cal_shell_content = cal_shell_view->priv->cal_shell_content; calendar = e_cal_shell_content_get_calendar (cal_shell_content); + view_type = gnome_calendar_get_view (calendar); + view = gnome_calendar_get_calendar_view (calendar, view_type); print_action = GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG; - if (gnome_calendar_get_view (calendar) == GNOME_CAL_LIST_VIEW) { + if (E_IS_CAL_LIST_VIEW (view)) { ECalListView *list_view; - GtkWidget *widget; ETable *table; - widget = gnome_calendar_get_current_view_widget (calendar); - list_view = E_CAL_LIST_VIEW (widget); + list_view = E_CAL_LIST_VIEW (view); table = e_table_scrolled_get_table (list_view->table_scrolled); print_table (table, _("Print"), _("Calendar"), action); } else { @@ -228,20 +230,22 @@ action_calendar_print_preview_cb (GtkAction *action, { #if 0 ECalShellContent *cal_shell_content; + GnomeCalendarViewType view_type; GnomeCalendar *calendar; + ECalendarView *view; GtkPrintOperationAction print_action; cal_shell_content = cal_shell_view->priv->cal_shell_content; calendar = e_cal_shell_content_get_calendar (cal_shell_content); + view_type = gnome_calendar_get_view (calendar); + view = gnome_calendar_get_calendar_view (calendar, view_type); print_action = GTK_PRINT_OPERATION_ACTION_PREVIEW; - if (gnome_calendar_get_view (calendar) == GNOME_CAL_LIST_VIEW) { + if (E_IS_CAL_LIST_VIEW (view)) { ECalListView *list_view; - GtkWidget *widget; ETable *table; - widget = gnome_calendar_get_current_view_widget (calendar); - list_view = E_CAL_LIST_VIEW (widget); + list_view = E_CAL_LIST_VIEW (view); table = e_table_scrolled_get_table (list_view->table_scrolled); print_table (table, _("Print"), _("Calendar"), action); } else { @@ -512,14 +516,16 @@ action_event_open_cb (GtkAction *action, { #if 0 ECalShellContent *cal_shell_content; + GnomeCalendarViewType view_type; GnomeCalendar *calendar; - GtkWidget *widget; + ECalendarView *view; cal_shell_content = cal_shell_view->priv->cal_shell_content; calendar = e_cal_shell_content_get_calendar (cal_shell_content); - widget = gnome_calendar_get_current_view_widget (calendar); + view_type = gnome_calendar_get_view (calendar); + view = gnome_calendar_get_calendar_view (calendar, view_type); - e_calendar_view_open_event (E_CALENDAR_VIEW (widget)); + e_calendar_view_open_event (view); #endif } |