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-calendar-table.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-calendar-table.c')
-rw-r--r-- | calendar/gui/e-calendar-table.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index 91786ea389..f4ccea596c 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -979,6 +979,7 @@ delete_cb (GtkWidget *menuitem, gpointer data) enum { MASK_SINGLE = 1 << 0, /* For commands that work on 1 task. */ MASK_MULTIPLE = 1 << 1, /* For commands for multiple tasks. */ + MASK_EDITABLE = 1 << 2 /* For commands disabled in read-only folders */ }; @@ -989,21 +990,21 @@ static EPopupMenu tasks_popup_menu [] = { E_POPUP_SEPARATOR, - E_POPUP_ITEM (N_("C_ut"), e_calendar_table_on_cut, 0), + E_POPUP_ITEM (N_("C_ut"), e_calendar_table_on_cut, MASK_EDITABLE), E_POPUP_ITEM (N_("_Copy"), e_calendar_table_on_copy, 0), - E_POPUP_ITEM (N_("_Paste"), e_calendar_table_on_paste, 0), + E_POPUP_ITEM (N_("_Paste"), e_calendar_table_on_paste, MASK_EDITABLE), E_POPUP_SEPARATOR, - E_POPUP_ITEM (N_("_Assign Task"), e_calendar_table_on_assign, MASK_SINGLE), + E_POPUP_ITEM (N_("_Assign Task"), e_calendar_table_on_assign, MASK_SINGLE | MASK_EDITABLE), E_POPUP_ITEM (N_("_Forward as iCalendar"), e_calendar_table_on_forward, MASK_SINGLE), - E_POPUP_ITEM (N_("_Mark as Complete"), mark_as_complete_cb, MASK_SINGLE), - E_POPUP_ITEM (N_("_Mark Selected Tasks as Complete"), mark_as_complete_cb, MASK_MULTIPLE), + E_POPUP_ITEM (N_("_Mark as Complete"), mark_as_complete_cb, MASK_SINGLE | MASK_EDITABLE), + E_POPUP_ITEM (N_("_Mark Selected Tasks as Complete"), mark_as_complete_cb, MASK_MULTIPLE | MASK_EDITABLE), E_POPUP_SEPARATOR, - E_POPUP_ITEM (N_("_Delete"), delete_cb, MASK_SINGLE), - E_POPUP_ITEM (N_("_Delete Selected Tasks"), delete_cb, MASK_MULTIPLE), + E_POPUP_ITEM (N_("_Delete"), delete_cb, MASK_SINGLE | MASK_EDITABLE), + E_POPUP_ITEM (N_("_Delete Selected Tasks"), delete_cb, MASK_MULTIPLE | MASK_EDITABLE), E_POPUP_TERMINATOR }; @@ -1028,6 +1029,9 @@ e_calendar_table_on_right_click (ETable *table, else hide_mask = MASK_SINGLE; + if (cal_client_is_read_only (calendar_model_get_cal_client (e_calendar_table_get_model (cal_table)))) + disable_mask |= MASK_EDITABLE; + e_popup_menu_run (tasks_popup_menu, (GdkEvent *) event, disable_mask, hide_mask, cal_table); |