aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-commands.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2003-07-23 05:13:38 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2003-07-23 05:13:38 +0800
commit806e63b32a7fdca4899d89ba236a0eb64726707c (patch)
treeb16e3db0eb30e98b7a700d6854310f3a736c1062 /calendar/gui/calendar-commands.c
parent2c6ab566c91705955a8de51a2937fa97f2a79d91 (diff)
downloadgsoc2013-evolution-806e63b32a7fdca4899d89ba236a0eb64726707c.tar
gsoc2013-evolution-806e63b32a7fdca4899d89ba236a0eb64726707c.tar.gz
gsoc2013-evolution-806e63b32a7fdca4899d89ba236a0eb64726707c.tar.bz2
gsoc2013-evolution-806e63b32a7fdca4899d89ba236a0eb64726707c.tar.lz
gsoc2013-evolution-806e63b32a7fdca4899d89ba236a0eb64726707c.tar.xz
gsoc2013-evolution-806e63b32a7fdca4899d89ba236a0eb64726707c.tar.zst
gsoc2013-evolution-806e63b32a7fdca4899d89ba236a0eb64726707c.zip
added "get_selected_events", and "update_query" virtual methods.
2003-07-22 Rodrigo Moya <rodrigo@ximian.com> * gui/e-cal-view.[ch]: added "get_selected_events", and "update_query" virtual methods. (e_cal_view_class_init): initialize new virtual methods. (e_cal_view_destroy): destroy new private members. (e_cal_view_get_selected_events, e_cal_view_set_cal_client, e_cal_view_get_cal_client): new functions. (e_cal_view_cut_clipboard, e_cal_view_copy_clipboard, e_cal_view_paste_clipboard): merged clipboard stuff. * gui/e-day-view.c (e_day_view_cut_clipboard, e_day_view_copy_clipboard, e_day_view_paste_clipboard): removed. (e_day_view_get_selected_events): made these private as the implementation of the 'get_selected_events' base class virtual method. * gui/e-week-view.c (e_week_view_get_selected_events): ditto. (e_week_view_cut_clipboard, e_week_view_copy_clipboard, e_week_view_paste_clipboard): removed. * gui/calendar-commands.c (sensitize_calendar_commands): call e_cal_view_get_selected_events. * gui/gnome-cal.c: removed a lot of redundant code thanks to the above changes. svn path=/trunk/; revision=21893
Diffstat (limited to 'calendar/gui/calendar-commands.c')
-rw-r--r--calendar/gui/calendar-commands.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index 82cf5e1976..8f2aba9988 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -8,6 +8,7 @@
* Authors: Miguel de Icaza <miguel@ximian.com>
* Federico Mena-Quintero <federico@ximian.com>
* Seth Alves <alves@hungry.com>
+ * Rodrigo Moya <rodrigo@ximian.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
@@ -598,14 +599,15 @@ sensitize_calendar_commands (GnomeCalendar *gcal, BonoboControl *control, gboole
has_recurrences = FALSE;
if (n_selected > 0 && !read_only) {
CalComponent *comp;
+ GList *list;
GtkWidget *view;
view = gnome_calendar_get_current_view_widget (gcal);
- if (E_IS_DAY_VIEW (view))
- comp = e_day_view_get_selected_event (E_DAY_VIEW (view));
- else if (E_IS_WEEK_VIEW (view))
- comp = e_week_view_get_selected_event (E_WEEK_VIEW (view));
- else
+ list = e_cal_view_get_selected_events (E_CAL_VIEW (view));
+ if (list) {
+ comp = (CalComponent *) list->data;
+ g_list_free (list);
+ } else
comp = NULL;
if (comp) {