aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-view.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-10-12 15:45:09 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-10-12 15:45:09 +0800
commitc0b21b141efd40f487b59069deb9b3a70899afb5 (patch)
tree06f498f8557316a83d7a43c7db253b0d75072063 /calendar/gui/e-calendar-view.c
parentacbeb6cddd469e969b95cd4df7f9750bab39d0c0 (diff)
downloadgsoc2013-evolution-c0b21b141efd40f487b59069deb9b3a70899afb5.tar.gz
gsoc2013-evolution-c0b21b141efd40f487b59069deb9b3a70899afb5.tar.zst
gsoc2013-evolution-c0b21b141efd40f487b59069deb9b3a70899afb5.zip
removed. (e_calendar_table_show_popup_menu): convert to use e-popup for
2004-10-12 Not Zed <NotZed@Ximian.com> * gui/e-calendar-table.c (setup_popup_icons): removed. (e_calendar_table_show_popup_menu): convert to use e-popup for pluggable popup menu. (e_calendar_table_on_open_task, e_calendar_table_on_save_as) (e_calendar_table_on_print_task, e_calendar_table_on_cut) (e_calendar_table_on_copy, e_calendar_table_on_paste) (e_calendar_table_on_assign, e_calendar_table_on_forward) (delete_cb): (mark_as_complete_cb, open_url_cb): convert to epopup callbacks. Moved all of the callbacks above the table rather than maintaining forward declarations for some of them. * gui/e-cal-popup.c (e_cal_popup_target_new_select): add the task required masks, and make one vs many mutally exclusive. * gui/e-calendar-view.c (e_calendar_view_create_popup_menu): copy/setup the event list here. * gui/e-cal-popup.c (e_cal_popup_target_new_select): take model + events rather than the calendar view. svn path=/trunk/; revision=27553
Diffstat (limited to 'calendar/gui/e-calendar-view.c')
-rw-r--r--calendar/gui/e-calendar-view.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index e9cb63b8ab..fea758bc17 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -1410,8 +1410,11 @@ e_calendar_view_create_popup_menu (ECalendarView *cal_view)
{
ECalPopup *ep;
GSList *menus = NULL;
+ GList *selected, *l;
int i;
ECalPopupTargetSelect *t;
+ ECalModel *model;
+ GPtrArray *events;
g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
@@ -1421,7 +1424,19 @@ e_calendar_view_create_popup_menu (ECalendarView *cal_view)
* We could also have a different menu id for each view */
ep = e_cal_popup_new("com.novell.evolution.calendar.view.popup");
- t = e_cal_popup_target_new_select(ep, cal_view);
+
+ model = e_calendar_view_get_model(cal_view);
+ events = g_ptr_array_new();
+ selected = e_calendar_view_get_selected_events(cal_view);
+ for (l=selected;l;l=g_list_next(l)) {
+ ECalendarViewEvent *event = l->data;
+
+ if (event)
+ g_ptr_array_add(events, e_cal_model_copy_component_data(event->comp_data));
+ }
+ g_list_free(selected);
+
+ t = e_cal_popup_target_new_select(ep, model, events);
t->target.widget = (GtkWidget *)cal_view;
if (t->events->len == 0) {