aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
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/gui
parentb26212ddd29b3a2359a632e2a26f779a0ec4cb32 (diff)
downloadgsoc2013-evolution-e7591e2a541eccd80ddee3494f8f140a039e979a.tar
gsoc2013-evolution-e7591e2a541eccd80ddee3494f8f140a039e979a.tar.gz
gsoc2013-evolution-e7591e2a541eccd80ddee3494f8f140a039e979a.tar.bz2
gsoc2013-evolution-e7591e2a541eccd80ddee3494f8f140a039e979a.tar.lz
gsoc2013-evolution-e7591e2a541eccd80ddee3494f8f140a039e979a.tar.xz
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/gui')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c33
1 files changed, 27 insertions, 6 deletions
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);