aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/dialogs/comp-editor.c13
2 files changed, 15 insertions, 4 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 94aa13e52e..40d80dfbaa 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,9 @@
+2004-06-23 Rodrigo Moya <rodrigo@novell.com>
+
+ * gui/dialogs/comp-editor.c (comp_editor_notify_client_changed):
+ fixed gtk-doc comments and made it enable/disable the dialog's
+ OK button depending on the selected source.
+
2004-06-23 Rodney Dawes <dobey@novell.com>
* gui/calendar-component.c: Revert previous change to add the
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 0ddecc101e..f6148c8f4b 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -1256,17 +1256,17 @@ comp_editor_focus (CompEditor *editor)
}
/**
- * comp_editor_page_notify_client_changed:
- * @page: An editor page.
+ * comp_editor_notify_client_changed:
+ * @editor: A component editor.
*
- * Makes an editor page emit the "client_changed" signal. This is meant to be
- * used only by page implementations.
+ * Makes an editor emit the "client_changed" signal.
**/
void
comp_editor_notify_client_changed (CompEditor *editor, ECal *client)
{
GList *l;
CompEditorPrivate *priv;
+ gboolean read_only;
g_return_if_fail (editor != NULL);
g_return_if_fail (IS_COMP_EDITOR (editor));
@@ -1278,6 +1278,11 @@ comp_editor_notify_client_changed (CompEditor *editor, ECal *client)
comp_editor_set_e_cal (editor, client);
for (l = priv->pages; l != NULL; l = l->next)
comp_editor_page_notify_client_changed (COMP_EDITOR_PAGE (l->data), client);
+
+ if (!e_cal_is_read_only (client, &read_only, NULL))
+ read_only = TRUE;
+
+ gtk_dialog_set_response_sensitive (GTK_DIALOG (editor), GTK_RESPONSE_OK, !read_only);
}
static void