aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@gnome-db.org>2011-10-10 18:50:18 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-10-10 18:50:18 +0800
commit56a166bb42bd55216a489c0b850ddd6bca2a3cd5 (patch)
tree3f87cf07fd6098ab2700c56d71d97686c5e5bc71 /addressbook
parent8fd93c9042bb30e53ce88303f8a0789a6ca688eb (diff)
parent6d5db4c7cd468d424ea8628344c5a1bba6fc3d7c (diff)
downloadgsoc2013-evolution-56a166bb42bd55216a489c0b850ddd6bca2a3cd5.tar.gz
gsoc2013-evolution-56a166bb42bd55216a489c0b850ddd6bca2a3cd5.tar.zst
gsoc2013-evolution-56a166bb42bd55216a489c0b850ddd6bca2a3cd5.zip
Merge branch 'master' into wip/gsettings
Diffstat (limited to 'addressbook')
-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