aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/contact-editor/e-contact-editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/contact-editor/e-contact-editor.c')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c34
1 files changed, 25 insertions, 9 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index ea696f88b8..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 (
@@ -3418,10 +3436,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);
@@ -4097,7 +4111,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