diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2002-10-03 18:57:22 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2002-10-03 18:57:22 +0800 |
commit | 5a20dc84bb40f9ab827290eb67b4a41c81df1817 (patch) | |
tree | 2b6252ef4f5408a3b322a85d0afc10283057305a /calendar/gui/e-week-view.c | |
parent | 566e0fe148c54f18a2ff41a68c90444ed178b930 (diff) | |
download | gsoc2013-evolution-5a20dc84bb40f9ab827290eb67b4a41c81df1817.tar.gz gsoc2013-evolution-5a20dc84bb40f9ab827290eb67b4a41c81df1817.tar.zst gsoc2013-evolution-5a20dc84bb40f9ab827290eb67b4a41c81df1817.zip |
Fixes #30057
2002-10-02 Rodrigo Moya <rodrigo@ximian.com>
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
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r-- | calendar/gui/e-week-view.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index a10388bed9..084d33c414 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -3512,10 +3512,10 @@ enum { }; static EPopupMenu main_items [] = { - E_POPUP_ITEM (N_("New _Appointment..."), e_week_view_on_new_appointment, 0), - E_POPUP_ITEM (N_("New All Day _Event"), e_week_view_on_new_event, 0), - E_POPUP_ITEM (N_("New Meeting"), e_week_view_on_new_meeting, 0), - E_POPUP_ITEM (N_("New Task"), e_week_view_on_new_task, 0), + E_POPUP_ITEM (N_("New _Appointment..."), e_week_view_on_new_appointment, MASK_EDITABLE), + E_POPUP_ITEM (N_("New All Day _Event"), e_week_view_on_new_event, MASK_EDITABLE), + E_POPUP_ITEM (N_("New Meeting"), e_week_view_on_new_meeting, MASK_EDITABLE), + E_POPUP_ITEM (N_("New Task"), e_week_view_on_new_task, MASK_EDITABLE), E_POPUP_SEPARATOR, @@ -3523,7 +3523,7 @@ static EPopupMenu main_items [] = { E_POPUP_SEPARATOR, - E_POPUP_ITEM (N_("_Paste"), e_week_view_on_paste, 0), + E_POPUP_ITEM (N_("_Paste"), e_week_view_on_paste, MASK_EDITABLE), E_POPUP_SEPARATOR, @@ -3545,7 +3545,7 @@ static EPopupMenu main_items [] = { }; static EPopupMenu child_items [] = { - E_POPUP_ITEM (N_("_Open"), e_week_view_on_edit_appointment, MASK_EDITABLE | MASK_EDITING), + E_POPUP_ITEM (N_("_Open"), e_week_view_on_edit_appointment, MASK_EDITING), E_POPUP_ITEM (N_("_Save As..."), e_week_view_on_save_as, MASK_EDITING), E_POPUP_ITEM (N_("_Print..."), e_week_view_on_print_event, MASK_EDITING), @@ -3554,7 +3554,7 @@ static EPopupMenu child_items [] = { E_POPUP_ITEM (N_("C_ut"), e_week_view_on_cut, MASK_EDITING | MASK_EDITABLE | MASK_MEETING_ORGANIZER), E_POPUP_ITEM (N_("_Copy"), e_week_view_on_copy, MASK_EDITING | MASK_MEETING_ORGANIZER), - E_POPUP_ITEM (N_("_Paste"), e_week_view_on_paste, 0), + E_POPUP_ITEM (N_("_Paste"), e_week_view_on_paste, MASK_EDITABLE), E_POPUP_SEPARATOR, @@ -3564,9 +3564,9 @@ static EPopupMenu child_items [] = { E_POPUP_SEPARATOR, E_POPUP_ITEM (N_("_Delete"), e_week_view_on_delete_appointment, MASK_EDITABLE | MASK_SINGLE | MASK_EDITING), - E_POPUP_ITEM (N_("Make this Occurrence _Movable"), e_week_view_on_unrecur_appointment, MASK_RECURRING | MASK_EDITING), - E_POPUP_ITEM (N_("Delete this _Occurrence"), e_week_view_on_delete_occurrence, MASK_RECURRING | MASK_EDITING), - E_POPUP_ITEM (N_("Delete _All Occurrences"), e_week_view_on_delete_appointment, MASK_RECURRING | MASK_EDITING), + E_POPUP_ITEM (N_("Make this Occurrence _Movable"), e_week_view_on_unrecur_appointment, MASK_RECURRING | MASK_EDITING | MASK_EDITABLE), + E_POPUP_ITEM (N_("Delete this _Occurrence"), e_week_view_on_delete_occurrence, MASK_RECURRING | MASK_EDITING | MASK_EDITABLE), + E_POPUP_ITEM (N_("Delete _All Occurrences"), e_week_view_on_delete_appointment, MASK_RECURRING | MASK_EDITING | MASK_EDITABLE), E_POPUP_TERMINATOR }; @@ -3627,6 +3627,9 @@ e_week_view_show_popup_menu (EWeekView *week_view, } } + if (cal_client_is_read_only (week_view->client)) + disable_mask |= MASK_EDITABLE; + if (being_edited) disable_mask |= MASK_EDITING; week_view->popup_event_num = event_num; |