aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog14
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c26
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c13
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);
}