aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-08-19 11:26:46 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-08-19 11:26:46 +0800
commit32d802c8ba01fcba9547d335f54cb87f0acb544d (patch)
tree822ec32af03e4f1376818ff542908dd94e059ec1 /modules/calendar
parent026e76465697c7a8df48af89f4b3845902219fe7 (diff)
downloadgsoc2013-evolution-32d802c8ba01fcba9547d335f54cb87f0acb544d.tar
gsoc2013-evolution-32d802c8ba01fcba9547d335f54cb87f0acb544d.tar.gz
gsoc2013-evolution-32d802c8ba01fcba9547d335f54cb87f0acb544d.tar.bz2
gsoc2013-evolution-32d802c8ba01fcba9547d335f54cb87f0acb544d.tar.lz
gsoc2013-evolution-32d802c8ba01fcba9547d335f54cb87f0acb544d.tar.xz
gsoc2013-evolution-32d802c8ba01fcba9547d335f54cb87f0acb544d.tar.zst
gsoc2013-evolution-32d802c8ba01fcba9547d335f54cb87f0acb544d.zip
More GnomeCalendar cleanup.
Diffstat (limited to 'modules/calendar')
-rw-r--r--modules/calendar/e-cal-shell-content.c38
1 files changed, 32 insertions, 6 deletions
diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c
index 03d79470d6..9248ea8334 100644
--- a/modules/calendar/e-cal-shell-content.c
+++ b/modules/calendar/e-cal-shell-content.c
@@ -610,6 +610,8 @@ e_cal_shell_content_copy_clipboard (ECalShellContent *cal_shell_content)
GnomeCalendar *calendar;
EMemoTable *memo_table;
ECalendarTable *task_table;
+ GnomeCalendarViewType view_type;
+ ECalendarView *calendar_view;
g_return_if_fail (E_IS_CAL_SHELL_CONTENT (cal_shell_content));
@@ -617,9 +619,12 @@ e_cal_shell_content_copy_clipboard (ECalShellContent *cal_shell_content)
memo_table = e_cal_shell_content_get_memo_table (cal_shell_content);
task_table = e_cal_shell_content_get_task_table (cal_shell_content);
+ view_type = gnome_calendar_get_view (calendar);
+ calendar_view = gnome_calendar_get_calendar_view (calendar, view_type);
+
switch (cal_shell_content_get_focus_location (cal_shell_content)) {
case FOCUS_CALENDAR:
- gnome_calendar_copy_clipboard (calendar);
+ e_calendar_view_copy_clipboard (calendar_view);
break;
case FOCUS_MEMO_TABLE:
@@ -641,6 +646,8 @@ e_cal_shell_content_cut_clipboard (ECalShellContent *cal_shell_content)
GnomeCalendar *calendar;
EMemoTable *memo_table;
ECalendarTable *task_table;
+ GnomeCalendarViewType view_type;
+ ECalendarView *calendar_view;
g_return_if_fail (E_IS_CAL_SHELL_CONTENT (cal_shell_content));
@@ -648,9 +655,12 @@ e_cal_shell_content_cut_clipboard (ECalShellContent *cal_shell_content)
memo_table = e_cal_shell_content_get_memo_table (cal_shell_content);
task_table = e_cal_shell_content_get_task_table (cal_shell_content);
+ view_type = gnome_calendar_get_view (calendar);
+ calendar_view = gnome_calendar_get_calendar_view (calendar, view_type);
+
switch (cal_shell_content_get_focus_location (cal_shell_content)) {
case FOCUS_CALENDAR:
- gnome_calendar_cut_clipboard (calendar);
+ e_calendar_view_cut_clipboard (calendar_view);
break;
case FOCUS_MEMO_TABLE:
@@ -672,6 +682,8 @@ e_cal_shell_content_paste_clipboard (ECalShellContent *cal_shell_content)
GnomeCalendar *calendar;
EMemoTable *memo_table;
ECalendarTable *task_table;
+ GnomeCalendarViewType view_type;
+ ECalendarView *calendar_view;
g_return_if_fail (E_IS_CAL_SHELL_CONTENT (cal_shell_content));
@@ -679,9 +691,12 @@ e_cal_shell_content_paste_clipboard (ECalShellContent *cal_shell_content)
memo_table = e_cal_shell_content_get_memo_table (cal_shell_content);
task_table = e_cal_shell_content_get_task_table (cal_shell_content);
+ view_type = gnome_calendar_get_view (calendar);
+ calendar_view = gnome_calendar_get_calendar_view (calendar, view_type);
+
switch (cal_shell_content_get_focus_location (cal_shell_content)) {
case FOCUS_CALENDAR:
- gnome_calendar_paste_clipboard (calendar);
+ e_calendar_view_paste_clipboard (calendar_view);
break;
case FOCUS_MEMO_TABLE:
@@ -703,6 +718,8 @@ e_cal_shell_content_delete_selection (ECalShellContent *cal_shell_content)
GnomeCalendar *calendar;
EMemoTable *memo_table;
ECalendarTable *task_table;
+ GnomeCalendarViewType view_type;
+ ECalendarView *calendar_view;
g_return_if_fail (E_IS_CAL_SHELL_CONTENT (cal_shell_content));
@@ -710,9 +727,12 @@ e_cal_shell_content_delete_selection (ECalShellContent *cal_shell_content)
memo_table = e_cal_shell_content_get_memo_table (cal_shell_content);
task_table = e_cal_shell_content_get_task_table (cal_shell_content);
+ view_type = gnome_calendar_get_view (calendar);
+ calendar_view = gnome_calendar_get_calendar_view (calendar, view_type);
+
switch (cal_shell_content_get_focus_location (cal_shell_content)) {
case FOCUS_CALENDAR:
- gnome_calendar_delete_selection (calendar);
+ e_calendar_view_delete_selected_events (calendar_view);
break;
case FOCUS_MEMO_TABLE:
@@ -732,13 +752,19 @@ void
e_cal_shell_content_delete_selected_occurrence (ECalShellContent *cal_shell_content)
{
GnomeCalendar *calendar;
+ GnomeCalendarViewType view_type;
+ ECalendarView *calendar_view;
FocusLocation focus;
g_return_if_fail (E_IS_CAL_SHELL_CONTENT (cal_shell_content));
focus = cal_shell_content_get_focus_location (cal_shell_content);
+ if (focus != FOCUS_CALENDAR)
+ return;
+
calendar = e_cal_shell_content_get_calendar (cal_shell_content);
+ view_type = gnome_calendar_get_view (calendar);
+ calendar_view = gnome_calendar_get_calendar_view (calendar, view_type);
- if (focus == FOCUS_CALENDAR)
- gnome_calendar_delete_selected_occurrence (calendar);
+ e_calendar_view_delete_selected_occurrence (calendar_view);
}