aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gnome-cal.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2003-04-23 02:06:38 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2003-04-23 02:06:38 +0800
commit95d8e5b20bdc58eb2a72a6f8f75ca99cbd6b169b (patch)
treebb270c7030c3dad20de98b0f9d68455e65fda34b /calendar/gui/gnome-cal.c
parent4167920c363eb3ff08268ffe250c4786fe72b0ac (diff)
downloadgsoc2013-evolution-95d8e5b20bdc58eb2a72a6f8f75ca99cbd6b169b.tar
gsoc2013-evolution-95d8e5b20bdc58eb2a72a6f8f75ca99cbd6b169b.tar.gz
gsoc2013-evolution-95d8e5b20bdc58eb2a72a6f8f75ca99cbd6b169b.tar.bz2
gsoc2013-evolution-95d8e5b20bdc58eb2a72a6f8f75ca99cbd6b169b.tar.lz
gsoc2013-evolution-95d8e5b20bdc58eb2a72a6f8f75ca99cbd6b169b.tar.xz
gsoc2013-evolution-95d8e5b20bdc58eb2a72a6f8f75ca99cbd6b169b.tar.zst
gsoc2013-evolution-95d8e5b20bdc58eb2a72a6f8f75ca99cbd6b169b.zip
Fixes #22444
2003-04-21 Rodrigo Moya <rodrigo@ximian.com> Fixes #22444 * gui/calendar-commands.c: added new verbs for occurrence-related menu items. (delete_occurrence_cmd): added callback for "Delete this occurrence" menu item. "Delete all occurrences" is just the same as "Delete". (sensitize_calendar_commands): sensitive ocurrence-related menu items. * gui/gnome-cal.[ch] (gnome_calendar_delete_selected_occurrence): new function. (gnome_calendar_get_current_view_widget): made this public. * gui/e-week-view.[ch] (e_week_view_get_selected_event): (e_week_view_delete_occurrence): new functions. (e_week_view_delete_occurrence_internal): real implementation of the 'Delete Occurrence' logic. (e_week_view_on_delete_occurrence): call delete_instance_internal. * gui/e-day-view.[ch] (e_day_view_get_selected_event): (e_day_view_delete_occurrence): new functions. (e_week_view_delete_occurrence_internal): real implementation of the 'Delete Occurrence' logic. (e_week_view_on_delete_occurrence): call delete_occurrence_internal. svn path=/trunk/; revision=20917
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r--calendar/gui/gnome-cal.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index be5de68b80..b56f4a1824 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -347,7 +347,7 @@ dn_query_eval_error_cb (CalQuery *query, const char *error_str, gpointer data)
}
/* Returns the current view widget, a EDayView or EWeekView. */
-static GtkWidget*
+GtkWidget*
gnome_calendar_get_current_view_widget (GnomeCalendar *gcal)
{
GnomeCalendarPrivate *priv;
@@ -2853,6 +2853,29 @@ gnome_calendar_delete_selection (GnomeCalendar *gcal)
g_assert_not_reached ();
}
+void
+gnome_calendar_delete_selected_occurrence (GnomeCalendar *gcal)
+{
+ GnomeCalendarPrivate *priv;
+ FocusLocation location;
+ GtkWidget *view;
+
+ g_return_if_fail (GNOME_IS_CALENDAR (gcal));
+
+ priv = gcal->priv;
+
+ location = get_focus_location (gcal);
+
+ if (location == FOCUS_CALENDAR) {
+
+ view = gnome_calendar_get_current_view_widget (gcal);
+
+ if (E_IS_DAY_VIEW (view))
+ e_day_view_delete_occurrence (E_DAY_VIEW (view));
+ else
+ e_week_view_delete_occurrence (E_WEEK_VIEW (view));
+ }
+}
ECalendarTable*
gnome_calendar_get_task_pad (GnomeCalendar *gcal)