aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2002-10-03 18:57:22 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2002-10-03 18:57:22 +0800
commit5a20dc84bb40f9ab827290eb67b4a41c81df1817 (patch)
tree2b6252ef4f5408a3b322a85d0afc10283057305a /calendar/gui/dialogs
parent566e0fe148c54f18a2ff41a68c90444ed178b930 (diff)
downloadgsoc2013-evolution-5a20dc84bb40f9ab827290eb67b4a41c81df1817.tar
gsoc2013-evolution-5a20dc84bb40f9ab827290eb67b4a41c81df1817.tar.gz
gsoc2013-evolution-5a20dc84bb40f9ab827290eb67b4a41c81df1817.tar.bz2
gsoc2013-evolution-5a20dc84bb40f9ab827290eb67b4a41c81df1817.tar.lz
gsoc2013-evolution-5a20dc84bb40f9ab827290eb67b4a41c81df1817.tar.xz
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/dialogs')
-rw-r--r--calendar/gui/dialogs/event-editor.c21
-rw-r--r--calendar/gui/dialogs/task-editor.c19
2 files changed, 31 insertions, 9 deletions
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 4ee2556d97..829bebbe1e 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -141,27 +141,38 @@ static void
set_menu_sens (EventEditor *ee)
{
EventEditorPrivate *priv;
- gboolean sens, existing, user;
+ gboolean sens, existing, user, read_only;
priv = ee->priv;
existing = comp_editor_get_existing_org (COMP_EDITOR (ee));
user = comp_editor_get_user_org (COMP_EDITOR (ee));
+ read_only = cal_client_is_read_only (comp_editor_get_cal_client (COMP_EDITOR (ee)));
sens = priv->meeting_shown;
comp_editor_set_ui_prop (COMP_EDITOR (ee),
"/commands/ActionScheduleMeeting",
- "sensitive", sens ? "0" : "1");
+ "sensitive", sens || read_only ? "0" : "1");
- sens = priv->meeting_shown && existing && !user;
+ sens = priv->meeting_shown && existing && !user && !read_only;
comp_editor_set_ui_prop (COMP_EDITOR (ee),
"/commands/ActionRefreshMeeting",
"sensitive", sens ? "1" : "0");
- sens = priv->meeting_shown && existing && user;
+ sens = priv->meeting_shown && existing && user && !read_only;
comp_editor_set_ui_prop (COMP_EDITOR (ee),
"/commands/ActionCancelMeeting",
- "sensitive", sens ? "1" : "0");
+ "sensitive", sens? "1" : "0");
+
+ comp_editor_set_ui_prop (COMP_EDITOR (ee),
+ "/commands/FileSave",
+ "sensitive", read_only ? "0" : "1");
+ comp_editor_set_ui_prop (COMP_EDITOR (ee),
+ "/commands/FileSaveAndClose",
+ "sensitive", read_only ? "0" : "1");
+ comp_editor_set_ui_prop (COMP_EDITOR (ee),
+ "/commands/FileDelete",
+ "sensitive", read_only ? "0" : "1");
}
static void
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index e3c55ffe29..6a95013370 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -129,27 +129,38 @@ static void
set_menu_sens (TaskEditor *te)
{
TaskEditorPrivate *priv;
- gboolean sens, existing, user;
+ gboolean sens, existing, user, read_only;
priv = te->priv;
existing = comp_editor_get_existing_org (COMP_EDITOR (te));
user = comp_editor_get_user_org (COMP_EDITOR (te));
+ read_only = cal_client_is_read_only (comp_editor_get_cal_client (COMP_EDITOR (te)));
- sens = priv->assignment_shown;
+ sens = priv->assignment_shown || read_only;
comp_editor_set_ui_prop (COMP_EDITOR (te),
"/commands/ActionAssignTask",
"sensitive", sens ? "0" : "1");
- sens = priv->assignment_shown && existing && !user;
+ sens = priv->assignment_shown && existing && !user && !read_only;
comp_editor_set_ui_prop (COMP_EDITOR (te),
"/commands/ActionRefreshTask",
"sensitive", sens ? "1" : "0");
- sens = priv->assignment_shown && existing && user;
+ sens = priv->assignment_shown && existing && user && !read_only;
comp_editor_set_ui_prop (COMP_EDITOR (te),
"/commands/ActionCancelTask",
"sensitive", sens ? "1" : "0");
+
+ comp_editor_set_ui_prop (COMP_EDITOR (te),
+ "/commands/FileSave",
+ "sensitive", read_only ? "0" : "1");
+ comp_editor_set_ui_prop (COMP_EDITOR (te),
+ "/commands/FileSaveAndClose",
+ "sensitive", read_only ? "0" : "1");
+ comp_editor_set_ui_prop (COMP_EDITOR (te),
+ "/commands/FileDelete",
+ "sensitive", read_only ? "0" : "1");
}
static void