aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorSushma Rai <rsushma@src.gnome.org>2005-07-22 19:12:02 +0800
committerSushma Rai <rsushma@src.gnome.org>2005-07-22 19:12:02 +0800
commite7591e2a541eccd80ddee3494f8f140a039e979a (patch)
tree59ddf8d53ddcf32aa56cbe8fa204fda972cde86a /addressbook
parentb26212ddd29b3a2359a632e2a26f779a0ec4cb32 (diff)
downloadgsoc2013-evolution-e7591e2a541eccd80ddee3494f8f140a039e979a.tar.gz
gsoc2013-evolution-e7591e2a541eccd80ddee3494f8f140a039e979a.tar.zst
gsoc2013-evolution-e7591e2a541eccd80ddee3494f8f140a039e979a.zip
Showing the file_as name in the contact editor dialog title. Patch by
"Arunprakash <arunp@novell.com>". Fixes #235830. svn path=/trunk/; revision=29848
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog10
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c33
2 files changed, 37 insertions, 6 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 1b12cebd0e..06573c46ce 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,13 @@
+2005-07-22 Arunprakash <arunp@novell.com>
+
+ * gui/contact-editor/e-contact-editor.c (name_entry_changed): Modified
+ to reset the title of the contact editor when the name is deleted
+ completely.
+ (file_as_entry_changed) : Modified to update the title with the new
+ file_as name.
+ (fill_in_simple) : Modified to set the title initially with the file_as
+ name. Fixes #235830.
+
2005-07-21 Sushma Rai <rsushma@novell.com>
* gui/widgets/e-addressbook-view.[ch] (eab_view_delete_selection):
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 04b5be12ee..e42986341d 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -517,20 +517,26 @@ name_entry_changed (GtkWidget *widget, EContactEditor *editor)
string = gtk_entry_get_text (GTK_ENTRY (widget));
editor->name = e_contact_name_from_string (string);
file_as_set_style (editor, style);
+
+ if (string && !*string)
+ gtk_window_set_title (GTK_WINDOW (editor->app), _("Contact Editor"));
}
static void
file_as_entry_changed (GtkWidget *widget, EContactEditor *editor)
{
char *string = gtk_editable_get_chars (GTK_EDITABLE (widget), 0, -1);
- char *title;
+ gchar *title = _("Contact Editor");
- if (string && *string)
- title = string;
- else
- title = _("Contact Editor");
+ if (string && *string) {
+ title = g_strconcat (title, " - ", string, NULL);
+ gtk_window_set_title (GTK_WINDOW (editor->app), title);
+ g_free (title);
+ }
+ else {
+ gtk_window_set_title (GTK_WINDOW (editor->app), title);
+ }
- gtk_window_set_title (GTK_WINDOW (editor->app), title);
g_free (string);
}
@@ -2247,6 +2253,8 @@ static void
fill_in_simple (EContactEditor *editor)
{
EContactName *name;
+ gchar *title = _("Contact Editor");
+ gchar *filename;
gint i;
for (i = 0; i < G_N_ELEMENTS (simple_field_map); i++) {
@@ -2276,6 +2284,19 @@ fill_in_simple (EContactEditor *editor)
editor->name = name;
+ /* Update the contact editor title */
+
+ filename = (gchar *) e_contact_get (editor->contact, E_CONTACT_FILE_AS);
+
+ if (filename) {
+ title = g_strconcat (title, " - ", filename, NULL);
+ gtk_window_set_title (GTK_WINDOW (editor->app), title);
+ g_free (title);
+ }
+ else {
+ gtk_window_set_title (GTK_WINDOW (editor->app), title);
+ }
+
/* Update file_as combo options */
update_file_as_combo (editor);