aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-view.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2003-07-24 20:17:03 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2003-07-24 20:17:03 +0800
commit1f382b36fae7bbe91d39c52d7315865b1771d462 (patch)
treef0788fe83703a979a49070ae9e88b95bb10f2ba7 /calendar/gui/e-calendar-view.c
parent4068b19a6f21ee830eeb6754144493d5e6b36036 (diff)
downloadgsoc2013-evolution-1f382b36fae7bbe91d39c52d7315865b1771d462.tar.gz
gsoc2013-evolution-1f382b36fae7bbe91d39c52d7315865b1771d462.tar.zst
gsoc2013-evolution-1f382b36fae7bbe91d39c52d7315865b1771d462.zip
removed.
2003-07-24 Rodrigo Moya <rodrigo@ximian.com> * gui/e-day-view.c (e_day_view_delete_event, e_day_view_delete_event_internal): * gui/e-week-view.c (e_week_view_delete_event, e_week_view_delete_event_internal): removed. * gui/e-cal-view.[ch] (e_cal_view_delete_selected_event): renamed from e_cal_view_delete_event_internal. (e_cal_view_delete_selected_events): new function. * gui/gnome-cal.c (gnome_calendar_delete_selection): call e_cal_view_delete_selected_events(). * gui/e-week-view-event-item.c (e_week_view_event_item_get_position, e_week_view_event_item_button_press): * gui/e-day-view-top-item.c (e_day_view_top_item_draw_long_event): * gui/e-day-view-main-item.c (e_day_view_main_item_draw_day_event): adapted to changes in E*ViewPosition. svn path=/trunk/; revision=21943
Diffstat (limited to 'calendar/gui/e-calendar-view.c')
-rw-r--r--calendar/gui/e-calendar-view.c91
1 files changed, 59 insertions, 32 deletions
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index fd499ffc6a..6c352270af 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -576,6 +576,64 @@ e_cal_view_paste_clipboard (ECalView *cal_view)
}
static void
+delete_event (ECalView *cal_view, CalComponent *comp)
+{
+ CalComponentVType vtype;
+
+ vtype = cal_component_get_vtype (comp);
+
+ if (delete_component_dialog (comp, FALSE, 1, vtype, GTK_WIDGET (cal_view))) {
+ const char *uid;
+
+ if (itip_organizer_is_user (comp, cal_view->priv->client)
+ && cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (cal_view),
+ cal_view->priv->client,
+ comp, TRUE))
+ itip_send_comp (CAL_COMPONENT_METHOD_CANCEL, comp,
+ cal_view->priv->client, NULL);
+
+ cal_component_get_uid (comp, &uid);
+
+ delete_error_dialog (
+ cal_client_remove_object (cal_view->priv->client, uid), CAL_COMPONENT_EVENT);
+ }
+}
+
+void
+e_cal_view_delete_selected_event (ECalView *cal_view)
+{
+ GList *selected;
+ CalComponent *comp;
+
+ selected = e_cal_view_get_selected_events (cal_view);
+ if (!selected)
+ return;
+
+ comp = CAL_COMPONENT (selected->data);
+ delete_event (cal_view, comp);
+
+ g_list_free (selected);
+}
+
+void
+e_cal_view_delete_selected_events (ECalView *cal_view)
+{
+ GList *selected, *l;
+ CalComponent *comp;
+
+ selected = e_cal_view_get_selected_events (cal_view);
+ if (!selected)
+ return;
+
+ for (l = selected; l != NULL; l = l->next) {
+ comp = CAL_COMPONENT (l->data);
+ delete_event (cal_view, comp);
+ }
+
+ g_list_free (selected);
+}
+
+static void
on_new_appointment (GtkWidget *widget, gpointer user_data)
{
time_t dtstart, dtend;
@@ -797,44 +855,13 @@ on_settings (GtkWidget *widget, gpointer user_data)
control_util_show_settings (cal_view->priv->calendar);
}
-void
-e_cal_view_delete_event_internal (ECalView *cal_view, CalComponent *comp)
-{
- CalComponentVType vtype;
-
- vtype = cal_component_get_vtype (comp);
-
- if (delete_component_dialog (comp, FALSE, 1, vtype, GTK_WIDGET (cal_view))) {
- const char *uid;
-
- if (itip_organizer_is_user (comp, cal_view->priv->client)
- && cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (cal_view),
- cal_view->priv->client,
- comp, TRUE))
- itip_send_comp (CAL_COMPONENT_METHOD_CANCEL, comp,
- cal_view->priv->client, NULL);
-
- cal_component_get_uid (comp, &uid);
-
- delete_error_dialog (
- cal_client_remove_object (cal_view->priv->client, uid), CAL_COMPONENT_EVENT);
- }
-}
-
-
static void
on_delete_appointment (GtkWidget *widget, gpointer user_data)
{
ECalView *cal_view;
- GList *selected;
cal_view = E_CAL_VIEW (user_data);
-
- selected = e_cal_view_get_selected_events (cal_view);
- if (selected) {
- e_cal_view_delete_event_internal (cal_view, CAL_COMPONENT (selected->data));
- g_list_free (selected);
- }
+ e_cal_view_delete_selected_event (cal_view);
}
static void