From e659218812616a19532ccdabf1274d296cd0566c Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Wed, 23 Jun 2004 17:17:07 +0000 Subject: fixed gtk-doc comments and made it enable/disable the dialog's OK button 2004-06-23 Rodrigo Moya * 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. svn path=/trunk/; revision=26479 --- calendar/gui/dialogs/comp-editor.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'calendar/gui/dialogs/comp-editor.c') 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 -- cgit v1.2.3