aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog16
-rw-r--r--calendar/gui/dialogs/comp-editor.c26
-rw-r--r--calendar/gui/dialogs/comp-editor.h8
-rw-r--r--calendar/gui/dialogs/event-editor.c31
-rw-r--r--calendar/gui/dialogs/meeting-page.c2
5 files changed, 74 insertions, 9 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 4b6172ee1d..27e4c97758 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,21 @@
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")
+
+2001-07-06 JP Rosevear <jpr@ximian.com>
+
* gui/dialogs/meeting-page.c (clear_widgets): actually clear some
widgets and hide/show widgets in the default setup
(meeting_page_destroy): destroy the address lists
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 9668e538aa..d9d5752eaf 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -638,6 +638,32 @@ comp_editor_merge_ui (CompEditor *editor, const char *filename, BonoboUIVerb *ve
bonobo_ui_component_add_verb_list_with_data (priv->uic, verbs, editor);
}
+/**
+ * comp_editor_set_ui_prop:
+ * @editor:
+ * @path:
+ * @attr:
+ * @val:
+ *
+ *
+ **/
+void
+comp_editor_set_ui_prop (CompEditor *editor,
+ const char *path,
+ const char *attr,
+ const char *val)
+{
+ CompEditorPrivate *priv;
+
+ g_return_if_fail (editor != NULL);
+ g_return_if_fail (IS_COMP_EDITOR (editor));
+
+ priv = editor->priv;
+
+ bonobo_ui_component_set_prop (priv->uic, path, attr, val, NULL);
+}
+
+
/* Brings attention to a window by raising it and giving it focus */
static void
raise_and_focus (GtkWidget *widget)
diff --git a/calendar/gui/dialogs/comp-editor.h b/calendar/gui/dialogs/comp-editor.h
index cf24a2befb..12cfa64031 100644
--- a/calendar/gui/dialogs/comp-editor.h
+++ b/calendar/gui/dialogs/comp-editor.h
@@ -54,6 +54,7 @@ typedef struct {
/* Virtual functions */
void (* edit_comp) (CompEditor *page, CalComponent *comp);
} CompEditorClass;
+
GtkType comp_editor_get_type (void);
CompEditor *comp_editor_new (void);
void comp_editor_append_page (CompEditor *editor,
@@ -76,11 +77,12 @@ void comp_editor_send_comp (CompEditor *editor,
void comp_editor_merge_ui (CompEditor *editor,
const char *filename,
BonoboUIVerb *verbs);
+void comp_editor_set_ui_prop (CompEditor *editor,
+ const char *path,
+ const char *attr,
+ const char *val);
void comp_editor_focus (CompEditor *editor);
-
-
-
END_GNOME_DECLS
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),
diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c
index 2c0dcc9fd5..070f6258c6 100644
--- a/calendar/gui/dialogs/meeting-page.c
+++ b/calendar/gui/dialogs/meeting-page.c
@@ -697,7 +697,7 @@ init_widgets (MeetingPage *mpage)
priv = mpage->priv;
/* Organizer */
- gtk_signal_connect (GTK_OBJECT (priv->organizer), "changed",
+ gtk_signal_connect (GTK_OBJECT (GTK_COMBO (priv->organizer)->entry), "changed",
GTK_SIGNAL_FUNC (field_changed_cb), mpage);
gtk_signal_connect (GTK_OBJECT (priv->other_organizer_btn), "clicked",