diff options
author | Chris Toshok <toshok@ximian.com> | 2004-03-31 11:36:50 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2004-03-31 11:36:50 +0800 |
commit | e3289853ca71aa3d5251f82215aca7c141835dad (patch) | |
tree | ada55a7f4cabe993e79f48c9d0e89a6f276bd1a1 /addressbook | |
parent | 342f45f31d84b98cd342742c62f27b8f178d455a (diff) | |
download | gsoc2013-evolution-e3289853ca71aa3d5251f82215aca7c141835dad.tar gsoc2013-evolution-e3289853ca71aa3d5251f82215aca7c141835dad.tar.gz gsoc2013-evolution-e3289853ca71aa3d5251f82215aca7c141835dad.tar.bz2 gsoc2013-evolution-e3289853ca71aa3d5251f82215aca7c141835dad.tar.lz gsoc2013-evolution-e3289853ca71aa3d5251f82215aca7c141835dad.tar.xz gsoc2013-evolution-e3289853ca71aa3d5251f82215aca7c141835dad.tar.zst gsoc2013-evolution-e3289853ca71aa3d5251f82215aca7c141835dad.zip |
[ fixes bug #34777 ]
2004-03-30 Chris Toshok <toshok@ximian.com>
[ fixes bug #34777 ]
* gui/contact-editor/e-contact-editor.c (file_as_entry_changed):
set the window title to File As if the file as entry has something
in it. "Contact Editor" otherwise.
(set_entry_changed_signals): hook up the file-as-entry's "changed"
signal.
* gui/contact-list-editor/e-contact-list-editor.c
(list_name_changed_cb): analogous fix, but "List Name" and
"Contact List Editor".
svn path=/trunk/; revision=25256
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 14 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 26 | ||||
-rw-r--r-- | addressbook/gui/contact-list-editor/e-contact-list-editor.c | 13 |
3 files changed, 51 insertions, 2 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index f785f272e6..b426e40064 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,19 @@ 2004-03-30 Chris Toshok <toshok@ximian.com> + [ fixes bug #34777 ] + + * gui/contact-editor/e-contact-editor.c (file_as_entry_changed): + set the window title to File As if the file as entry has something + in it. "Contact Editor" otherwise. + (set_entry_changed_signals): hook up the file-as-entry's "changed" + signal. + + * gui/contact-list-editor/e-contact-list-editor.c + (list_name_changed_cb): analogous fix, but "List Name" and + "Contact List Editor". + +2004-03-30 Chris Toshok <toshok@ximian.com> + [ fixes bug #53544 ] * gui/component/addressbook-component.c diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index c9833815ac..5e6ebd86e8 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -1138,7 +1138,6 @@ file_as_set_style(EContactEditor *editor, int style) GList *strings = NULL; GtkEntry *file_as = GTK_ENTRY(glade_xml_get_widget(editor->gui, "entry-file-as")); GtkWidget *widget; - if (!(file_as && GTK_IS_ENTRY(file_as))) return; @@ -1192,6 +1191,24 @@ name_entry_changed (GtkWidget *widget, EContactEditor *editor) } static void +file_as_entry_changed (GtkWidget *widget, EContactEditor *editor) +{ + char *string = gtk_editable_get_chars(GTK_EDITABLE (widget), 0, -1); + char *title; + + if (string && *string) + title = string; + else + title = _("Contact Editor"); + + gtk_window_set_title (GTK_WINDOW (editor->app), title); + + g_free (string); + + widget_changed (widget, editor); +} + +static void company_entry_changed (GtkWidget *widget, EContactEditor *editor) { int style = 0; @@ -1300,6 +1317,12 @@ set_entry_changed_signals(EContactEditor *editor) G_CALLBACK (name_entry_changed), editor); } + widget = glade_xml_get_widget(editor->gui, "entry-file-as"); + if (widget && GTK_IS_ENTRY(widget)) { + g_signal_connect (widget, "changed", + G_CALLBACK (file_as_entry_changed), editor); + } + widget = glade_xml_get_widget(editor->gui, "entry-company"); if (widget && GTK_IS_ENTRY(widget)) { g_signal_connect (widget, "changed", @@ -1314,7 +1337,6 @@ set_entry_changed_signals(EContactEditor *editor) set_entry_changed_signal_field(editor, "entry-categories"); set_entry_changed_signal_field(editor, "entry-jobtitle"); - set_entry_changed_signal_field(editor, "entry-file-as"); set_entry_changed_signal_field(editor, "entry-manager"); set_entry_changed_signal_field(editor, "entry-assistant"); set_entry_changed_signal_field(editor, "entry-office"); diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c index 3b37240b5b..0c762ff982 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c @@ -742,7 +742,20 @@ remove_entry_cb (GtkWidget *w, EContactListEditor *editor) static void list_name_changed_cb (GtkWidget *w, EContactListEditor *editor) { + char *string = gtk_editable_get_chars(GTK_EDITABLE (w), 0, -1); + char *title; + editor->changed = TRUE; + + if (string && *string) + title = string; + else + title = _("Contact List Editor"); + + gtk_window_set_title (GTK_WINDOW (editor->app), title); + + g_free (string); + command_state_changed (editor); } |