diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2008-10-14 01:57:46 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-10-14 01:57:46 +0800 |
commit | 79aa45cfed7e87150de85869795ef0dd3be06db0 (patch) | |
tree | 422b9e6c3840747ffb243d596d4459514ec3a457 /calendar/gui/e-calendar-view.c | |
parent | 1bed00795bf092ad6e9e076eccf7cc2a8c20cb27 (diff) | |
download | gsoc2013-evolution-79aa45cfed7e87150de85869795ef0dd3be06db0.tar.gz gsoc2013-evolution-79aa45cfed7e87150de85869795ef0dd3be06db0.tar.zst gsoc2013-evolution-79aa45cfed7e87150de85869795ef0dd3be06db0.zip |
Progress update:
- Calendar is kind of a mess at the moment. Doesn't compile.
- Roughed in the Mail module, including all the actions.
That _does_ compile. Runs, even.
svn path=/branches/kill-bonobo/; revision=36611
Diffstat (limited to 'calendar/gui/e-calendar-view.c')
-rw-r--r-- | calendar/gui/e-calendar-view.c | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index ee76bf4e66..c4cabe1f45 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -1653,69 +1653,6 @@ static EPopupItem ecv_child_items [] = { { E_POPUP_ITEM, "54.delete", N_("Delete _All Occurrences"), on_delete_appointment, NULL, GTK_STOCK_DELETE, E_CAL_POPUP_SELECT_RECURRING, E_CAL_POPUP_SELECT_NOTEDITING | E_CAL_POPUP_SELECT_EDITABLE }, }; -static void -ecv_popup_free (EPopup *ep, GSList *list, void *data) -{ - g_slist_free(list); -} - -GtkMenu * -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); - - /* We could do this using a factory on the ECalPopup class, - * that way we would get called implicitly whenever a popup - * menu was created rather than everyone having to call us. - * We could also have a different menu id for each view */ - - /** @HookPoint-ECalPopup: Calendar Main View Context Menu - * @Id: org.gnome.evolution.calendar.view.popup - * @Class: org.gnome.evolution.calendar.popup:1.0 - * @Target: ECalPopupTargetSelect - * - * The context menu on the main calendar view. This menu - * applies to all view types. - */ - ep = e_cal_popup_new("org.gnome.evolution.calendar.view.popup"); - - 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) { - for (i=0;i<sizeof(ecv_main_items)/sizeof(ecv_main_items[0]);i++) - menus = g_slist_prepend(menus, &ecv_main_items[i]); - - gnome_calendar_view_popup_factory(cal_view->priv->calendar, (EPopup *)ep, "60.view"); - } else { - for (i=0;i<sizeof(ecv_child_items)/sizeof(ecv_child_items[0]);i++) - menus = g_slist_prepend(menus, &ecv_child_items[i]); - } - - e_popup_add_items((EPopup *)ep, menus, NULL, ecv_popup_free, cal_view); - - return e_popup_create_menu_once((EPopup *)ep, (EPopupTarget *)t, 0); -} - void e_calendar_view_open_event (ECalendarView *cal_view) { |