From 48988a8a72a5869621e628a03011879508a8432b Mon Sep 17 00:00:00 2001 From: Not Zed Date: Mon, 18 Oct 2004 04:08:47 +0000 Subject: dont access a NULL client. 2004-10-14 Not Zed * gui/e-cal-menu.c (e_cal_menu_target_new_select): dont access a NULL client. * gui/gnome-cal.c (gnome_calendar_get_taskpad_menu) (gnome_calendar_get_calendar_menu): accessors to get the menu managers. (gnome_calendar_init): setup menu managers. 2004-10-13 Not Zed * gui/calendar-commands.c (calendar_control_activate) (calendar_control_deactivate): activate and deactivate the calendar and taskpad menu handlers. (sensitize_items): helper to sensitise items based on target masks. (calendar_control_sensitize_calendar_commands): update the calendar menu manager target appropriately. (sensitize_taskpad_commands): same for the taskpad. * gui/e-cal-menu.[ch]: Targets for main menu management. * gui/e-cal-popup.c (e_cal_popup_target_new_select): fix cast. Also include the tasks stuff in the hook metadata. svn path=/trunk/; revision=27607 --- calendar/gui/e-cal-popup.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'calendar/gui/e-cal-popup.c') diff --git a/calendar/gui/e-cal-popup.c b/calendar/gui/e-cal-popup.c index 9c594416d8..b5b834324d 100644 --- a/calendar/gui/e-cal-popup.c +++ b/calendar/gui/e-cal-popup.c @@ -129,6 +129,8 @@ e_cal_popup_target_new_select(ECalPopup *eabp, struct _ECalModel *model, GPtrArr ECal *client; gboolean read_only; + /* FIXME: This is duplicated in e-cal-menu */ + t->model = model; g_object_ref(t->model); t->events = events; @@ -136,8 +138,9 @@ e_cal_popup_target_new_select(ECalPopup *eabp, struct _ECalModel *model, GPtrArr if (t->events->len == 0) { client = e_cal_model_get_default_client(t->model); } else { - ECalModelComponent *comp_data = (ECalendarViewEvent *)t->events->pdata[0]; + ECalModelComponent *comp_data = (ECalModelComponent *)t->events->pdata[0]; + mask &= ~E_CAL_POPUP_SELECT_ANY; if (t->events->len == 1) mask &= ~E_CAL_POPUP_SELECT_ONE; else @@ -257,6 +260,8 @@ static const EPopupHookTargetMask ecalph_select_masks[] = { { "organizer", E_CAL_POPUP_SELECT_ORGANIZER }, { "not-editing", E_CAL_POPUP_SELECT_NOTEDITING }, { "not-meeting", E_CAL_POPUP_SELECT_NOTMEETING }, + { "assignable", E_CAL_POPUP_SELECT_ASSIGNABLE }, + { "hasurl", E_CAL_POPUP_SELECT_HASURL }, { 0 } }; -- cgit