From 5a20dc84bb40f9ab827290eb67b4a41c81df1817 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Thu, 3 Oct 2002 10:57:22 +0000 Subject: Fixes #30057 2002-10-02 Rodrigo Moya Fixes #30057 * cal-client/cal-client.c (cal_client_is_read_only): added check of the status of the client before trying to make CORBA calls. * gui/calendar-commands.c (sensitize_calendar_commands, sensitize_taskpad_commands): * gui/tasks-control.c (sensitize_commands): * gui/dialogs/event-editor.c (set_menu_sens): * gui/dialogs/task-editor.c (set_menu_sens): * gui/e-calendar-table.c (e_calendar_table_on_right_click): * gui/e-day-view.c (e_day_view_on_event_right_click): * gui/e-week-view.c (e_week_view_show_popup_menu): take into account the read-onlyness of clients to disable/enable menu items. svn path=/trunk/; revision=18316 --- calendar/gui/e-day-view.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'calendar/gui/e-day-view.c') diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 5c91e54832..9f1ef62a6f 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -3705,13 +3705,13 @@ enum { static EPopupMenu main_items [] = { E_POPUP_ITEM (N_("New _Appointment"), - e_day_view_on_new_appointment, 0), + e_day_view_on_new_appointment, MASK_EDITABLE), E_POPUP_ITEM (N_("New All Day _Event"), - e_day_view_on_new_event, 0), + e_day_view_on_new_event, MASK_EDITABLE), E_POPUP_ITEM (N_("New Meeting"), - e_day_view_on_new_meeting, 0), + e_day_view_on_new_meeting, MASK_EDITABLE), E_POPUP_ITEM (N_("New Task"), - e_day_view_on_new_task, 0), + e_day_view_on_new_task, MASK_EDITABLE), E_POPUP_SEPARATOR, @@ -3721,7 +3721,7 @@ static EPopupMenu main_items [] = { E_POPUP_SEPARATOR, E_POPUP_ITEM (N_("_Paste"), - e_day_view_on_paste, 0), + e_day_view_on_paste, MASK_EDITABLE), E_POPUP_SEPARATOR, @@ -3749,7 +3749,7 @@ static EPopupMenu main_items [] = { static EPopupMenu child_items [] = { - E_POPUP_ITEM (N_("_Open"), e_day_view_on_edit_appointment, MASK_EDITABLE | MASK_EDITING), + E_POPUP_ITEM (N_("_Open"), e_day_view_on_edit_appointment, MASK_EDITING), E_POPUP_ITEM (N_("_Save As..."), e_day_view_on_save_as, MASK_EDITING), E_POPUP_ITEM (N_("_Print..."), e_day_view_on_print_event, MASK_EDITING), @@ -3758,7 +3758,7 @@ static EPopupMenu child_items [] = { E_POPUP_ITEM (N_("C_ut"), e_day_view_on_cut, MASK_EDITABLE | MASK_EDITING | MASK_MEETING_ORGANIZER), E_POPUP_ITEM (N_("_Copy"), e_day_view_on_copy, MASK_EDITING | MASK_MEETING_ORGANIZER), - E_POPUP_ITEM (N_("_Paste"), e_day_view_on_paste, 0), + E_POPUP_ITEM (N_("_Paste"), e_day_view_on_paste, MASK_EDITABLE), E_POPUP_SEPARATOR, @@ -3840,6 +3840,9 @@ e_day_view_on_event_right_click (EDayView *day_view, } } + if (cal_client_is_read_only (day_view->client)) + disable_mask |= MASK_EDITABLE; + if (being_edited) disable_mask |= MASK_EDITING; -- cgit