aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/gui/dialogs/select-source-dialog.c12
2 files changed, 19 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index f47f7933f4..8fe583f903 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,14 @@
2004-06-08 Rodrigo Moya <rodrigo@novell.com>
+ Fixes #57579
+
+ * gui/dialogs/select-source-dialog.c (select_source_dialog): start
+ with the OK button disabled.
+ (primary_selection_changed_cb): enable/disable the OK button depending
+ on the selection on the ESourceSelector.
+
+2004-06-08 Rodrigo Moya <rodrigo@novell.com>
+
* gui/dialogs/comp-editor.[ch] (comp_editor_notify_client_changed):
new function for notifying all pages of the client change.
(page_client_changed_cb): no need for this callback.
diff --git a/calendar/gui/dialogs/select-source-dialog.c b/calendar/gui/dialogs/select-source-dialog.c
index 0b8f93e7e4..35e45b3c5e 100644
--- a/calendar/gui/dialogs/select-source-dialog.c
+++ b/calendar/gui/dialogs/select-source-dialog.c
@@ -37,7 +37,15 @@ primary_selection_changed_cb (ESourceSelector *selector, gpointer user_data)
if (*our_selection)
g_object_unref (*our_selection);
- *our_selection = g_object_ref (e_source_selector_peek_primary_selection (selector));
+ *our_selection = e_source_selector_peek_primary_selection (selector);
+ if (*our_selection) {
+ g_object_ref (*our_selection);
+ gtk_dialog_set_response_sensitive (
+ GTK_DIALOG (gtk_widget_get_toplevel (selector)), GTK_RESPONSE_OK, TRUE);
+ } else {
+ gtk_dialog_set_response_sensitive (
+ GTK_DIALOG (gtk_widget_get_toplevel (selector)), GTK_RESPONSE_OK, FALSE);
+ }
}
/**
@@ -80,7 +88,7 @@ select_source_dialog (GtkWindow *parent, ECalSourceType obj_type)
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
NULL);
- /* gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, FALSE); */
+ gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, FALSE);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);