aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/event-editor.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-07-07 05:23:53 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-07-07 05:23:53 +0800
commit85eb30010f3cc1d299628636df24da7b163002a5 (patch)
tree4d5e3f8c4c48cb70f82e325c20bb2bfc968efcb8 /calendar/gui/dialogs/event-editor.c
parente6d686b05535b925f21f6e16d0f027038c158923 (diff)
downloadgsoc2013-evolution-85eb30010f3cc1d299628636df24da7b163002a5.tar
gsoc2013-evolution-85eb30010f3cc1d299628636df24da7b163002a5.tar.gz
gsoc2013-evolution-85eb30010f3cc1d299628636df24da7b163002a5.tar.bz2
gsoc2013-evolution-85eb30010f3cc1d299628636df24da7b163002a5.tar.lz
gsoc2013-evolution-85eb30010f3cc1d299628636df24da7b163002a5.tar.xz
gsoc2013-evolution-85eb30010f3cc1d299628636df24da7b163002a5.tar.zst
gsoc2013-evolution-85eb30010f3cc1d299628636df24da7b163002a5.zip
connect to the entry not the combo
2001-07-06 JP Rosevear <jpr@ximian.com> * gui/dialogs/meeting-page.c (init_widgets): connect to the entry not the combo * gui/dialogs/event-editor.c (set_menu_sens): set menu sensitivities based on whether or not the meeting page is shown (event_editor_init): call above (event_editor_edit_comp): ditto (schedule_meeting_cmd): ditto * gui/dialogs/comp-editor.h: new proto * gui/dialogs/comp-editor.c (comp_editor_set_ui_prop): new function to allow for set of ui props (esp. "sensitive") svn path=/trunk/; revision=10861
Diffstat (limited to 'calendar/gui/dialogs/event-editor.c')
-rw-r--r--calendar/gui/dialogs/event-editor.c31
1 files changed, 26 insertions, 5 deletions
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 6eb10cb0fb..59c587b18b 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -121,6 +121,24 @@ event_editor_class_init (EventEditorClass *klass)
object_class->destroy = event_editor_destroy;
}
+static void
+set_menu_sens (EventEditor *ee)
+{
+ EventEditorPrivate *priv;
+
+ priv = ee->priv;
+
+ comp_editor_set_ui_prop (COMP_EDITOR (ee),
+ "/commands/ActionScheduleMeeting",
+ "sensitive", priv->meeting_shown ? "0" : "1");
+ comp_editor_set_ui_prop (COMP_EDITOR (ee),
+ "/commands/ActionRefreshMeeting",
+ "sensitive", priv->meeting_shown ? "1" : "0");
+ comp_editor_set_ui_prop (COMP_EDITOR (ee),
+ "/commands/ActionCancelMeeting",
+ "sensitive", priv->meeting_shown ? "1" : "0");
+}
+
/* Object initialization function for the event editor */
static void
event_editor_init (EventEditor *ee)
@@ -150,11 +168,12 @@ event_editor_init (EventEditor *ee)
COMP_EDITOR_PAGE (priv->meet_page),
_("Meeting"));
- priv->meeting_shown = TRUE;
+ comp_editor_merge_ui (COMP_EDITOR (ee), EVOLUTION_DATADIR
+ "/gnome/ui/evolution-event-editor.xml",
+ verbs);
- comp_editor_merge_ui (COMP_EDITOR (ee), EVOLUTION_DATADIR
- "/gnome/ui/evolution-event-editor.xml",
- verbs);
+ priv->meeting_shown = TRUE;
+ set_menu_sens (ee);
}
static void
@@ -171,6 +190,7 @@ event_editor_edit_comp (CompEditor *editor, CalComponent *comp)
if (attendees == NULL) {
comp_editor_remove_page (editor, COMP_EDITOR_PAGE (priv->meet_page));
priv->meeting_shown = FALSE;
+ set_menu_sens (ee);
}
cal_component_free_attendee_list (attendees);
@@ -226,7 +246,8 @@ schedule_meeting_cmd (GtkWidget *widget, gpointer data)
comp_editor_append_page (COMP_EDITOR (ee),
COMP_EDITOR_PAGE (priv->meet_page),
_("Meeting"));
- priv->meeting_shown = FALSE;
+ priv->meeting_shown = TRUE;
+ set_menu_sens (ee);
}
comp_editor_show_page (COMP_EDITOR (ee),