diff options
author | Sushma Rai <rsushma@src.gnome.org> | 2005-08-10 16:09:13 +0800 |
---|---|---|
committer | Sushma Rai <rsushma@src.gnome.org> | 2005-08-10 16:09:13 +0800 |
commit | 16f84e35048c2bb63e417be590108bd95d83c113 (patch) | |
tree | d2880cf3e09d4547aa32f8909df0b42bb2a2f267 /addressbook | |
parent | 65c6a56c53dac58b1fea043a2369c70fe8d6de48 (diff) | |
download | gsoc2013-evolution-16f84e35048c2bb63e417be590108bd95d83c113.tar.gz gsoc2013-evolution-16f84e35048c2bb63e417be590108bd95d83c113.tar.zst gsoc2013-evolution-16f84e35048c2bb63e417be590108bd95d83c113.zip |
Fix for #258257, got missed while I committed the changelog for it.
svn path=/trunk/; revision=30072
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 10 |
1 files changed, 10 insertions, 0 deletions
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); } |