From 16f84e35048c2bb63e417be590108bd95d83c113 Mon Sep 17 00:00:00 2001 From: Sushma Rai Date: Wed, 10 Aug 2005 08:09:13 +0000 Subject: Fix for #258257, got missed while I committed the changelog for it. svn path=/trunk/; revision=30072 --- addressbook/gui/contact-editor/e-contact-editor.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 30e66772c8..36edf0a358 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -519,6 +519,7 @@ name_entry_changed (GtkWidget *widget, EContactEditor *editor) editor->name = e_contact_name_from_string (string); file_as_set_style (editor, style); + sensitize_ok (editor); if (string && !*string) gtk_window_set_title (GTK_WINDOW (editor->app), _("Contact Editor")); } @@ -537,6 +538,7 @@ file_as_entry_changed (GtkWidget *widget, EContactEditor *editor) else { gtk_window_set_title (GTK_WINDOW (editor->app), _("Contact Editor")); } + sensitize_ok (editor); g_free (string); } @@ -576,9 +578,17 @@ sensitize_ok (EContactEditor *ce) { GtkWidget *widget; gboolean allow_save; + GtkWidget *entry_fullname; + GtkWidget *entry_file_as; + entry_fullname = glade_xml_get_widget (ce->gui, "entry-fullname" ); + entry_file_as = glade_xml_get_widget (ce->gui, "entry-file-as"); + const char *name_entry_string = gtk_entry_get_text (GTK_ENTRY (entry_fullname)); + const char *file_as_entry_string = gtk_entry_get_text (GTK_ENTRY (entry_file_as)); allow_save = ce->target_editable && ce->changed ? TRUE : FALSE; + if (!strcmp (name_entry_string, "") || !strcmp (file_as_entry_string, "")) + allow_save = FALSE; widget = glade_xml_get_widget (ce->gui, "button-ok"); gtk_widget_set_sensitive (widget, allow_save); } -- cgit v1.2.3