aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@novell.com>2004-06-09 01:07:18 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2004-06-09 01:07:18 +0800
commitc532d3d9841887b32917855adaf679403a966c28 (patch)
treef3957c7fa525392e835b1a18d59e714d4b496c45
parentbab3dc622a2cd10e861e1ffb762768e68079a81e (diff)
downloadgsoc2013-evolution-c532d3d9841887b32917855adaf679403a966c28.tar.gz
gsoc2013-evolution-c532d3d9841887b32917855adaf679403a966c28.tar.zst
gsoc2013-evolution-c532d3d9841887b32917855adaf679403a966c28.zip
Fixes #57579
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. svn path=/trunk/; revision=26256
-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);