From 224f26b84d9c12b0dd1d337f51c14b6ebb901007 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 4 Sep 2011 09:48:24 -0400 Subject: GtkApplication has some new EShell-like features. I pushed a few EShell features up to GtkApplication for GTK+ 3.2, so we can now trim off the redundancies in EShell. 1) GtkApplication has a new "window-added" signal which replaces EShell's own "window-created" signal. 2) GtkApplication has a new "window-removed" signal which replaces EShell's own "window-destroyed" signal. 3) gtk_application_get_windows() now returns a list of windows sorted by most recently focused, replacing e_shell_get_watched_windows(). 4) GtkApplication now provides enough hooks to subclasses that we can remove e_shell_watch_window() and call gtk_application_add_window() directly. --- addressbook/gui/contact-editor/e-contact-editor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'addressbook') diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index ea696f88b8..aa0328e9ce 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -4097,7 +4097,9 @@ e_contact_editor_init (EContactEditor *e_contact_editor) /* show window */ gtk_widget_show (e_contact_editor->app); - e_shell_watch_window (shell, GTK_WINDOW (e_contact_editor->app)); + gtk_application_add_window ( + GTK_APPLICATION (shell), + GTK_WINDOW (e_contact_editor->app)); } static void -- cgit v1.2.3 From 938505da180727fbc56b68b80851adc3cf676523 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 4 Sep 2011 14:30:36 -0400 Subject: Let GtkFileChooser track its own last-used-folder. GtkFileChooser in GTK+ 3.2 now keeps track of the last-used-folder itself, even across applications, so get out of its way and let it handle it. --- addressbook/gui/contact-editor/e-contact-editor.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'addressbook') diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index aa0328e9ce..e2dc21c25c 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -3418,10 +3418,6 @@ image_clicked (GtkWidget *button, GTK_DIALOG (editor->file_selector), GTK_RESPONSE_ACCEPT); - gtk_file_chooser_set_current_folder ( - GTK_FILE_CHOOSER (editor->file_selector), - g_get_home_dir ()); - g_signal_connect ( editor->file_selector, "response", G_CALLBACK (file_chooser_response), editor); -- cgit v1.2.3 From d2232a718dc86dda4182d154a7fdfe1d218229dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Vr=C3=A1til?= Date: Fri, 7 Oct 2011 14:40:55 +0200 Subject: Bug #659876 - Make automatic contact address formatting optional Make behavior introduced in bug #636809 optional by adding checkbox to Preferences->Contacts. --- addressbook/gui/contact-editor/e-contact-editor.c | 26 +++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'addressbook') diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index e2dc21c25c..28b5b636fe 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -2301,17 +2301,35 @@ set_address_label (EContact *contact, EContactAddress *address) { gchar *address_label = NULL; + gboolean format_address; + GConfClient *client; + GConfValue *value; if (!address) { e_contact_set (contact, field, NULL); return; } - address_label = eab_format_address (contact, - (field == E_CONTACT_ADDRESS_LABEL_WORK) ? E_CONTACT_ADDRESS_WORK : - E_CONTACT_ADDRESS_HOME); - if (!address_label) { + client = gconf_client_get_default (); + value = gconf_client_get (client, + "/apps/evolution/addressbook/display/address_formatting", NULL); + g_object_unref (client); + + if (value) { + format_address = gconf_value_get_bool (value); + gconf_value_free (value); + } else { + format_address = TRUE; + } + + if (format_address) { + address_label = eab_format_address (contact, + (field == E_CONTACT_ADDRESS_LABEL_WORK) ? E_CONTACT_ADDRESS_WORK : + E_CONTACT_ADDRESS_HOME); + } + + if (!format_address || !address_label) { address_label = append_to_address_label ( address_label, address->street, TRUE); address_label = append_to_address_label ( -- cgit v1.2.3