From bf1676c4c4f040b65f00f1abd4d25f8a440b4961 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sergio=20Villar=20Sen=C3=ADn?= Date: Fri, 8 May 2009 12:51:52 +0200 Subject: [PATCH] Fixes NB#115045, prefill the user name with the information from my own contact --- src/hildon2/modest-easysetup-wizard-dialog.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/hildon2/modest-easysetup-wizard-dialog.c b/src/hildon2/modest-easysetup-wizard-dialog.c index 89d8a38..f367376 100644 --- a/src/hildon2/modest-easysetup-wizard-dialog.c +++ b/src/hildon2/modest-easysetup-wizard-dialog.c @@ -59,6 +59,7 @@ #include "modest-hildon-includes.h" #include "modest-maemo-security-options-view.h" #include "modest-account-protocol.h" +#include "modest-address-book.h" /* Include config.h so that _() works: */ #ifdef HAVE_CONFIG_H @@ -601,6 +602,7 @@ create_page_user_details (ModestEasysetupWizardDialog *self) GtkWidget *box; ModestEasysetupWizardDialogPrivate *priv; GtkWidget *align; + const gchar *my_name; priv = MODEST_EASYSETUP_WIZARD_DIALOG_GET_PRIVATE(self); @@ -623,6 +625,12 @@ create_page_user_details (ModestEasysetupWizardDialog *self) on_entry_max, self); GtkWidget *caption = create_captioned (self, title_sizegroup, value_sizegroup, _("mcen_li_emailsetup_name"), FALSE, priv->entry_user_name); + + /* Try to initialize the user name with my own contact */ + my_name = modest_address_book_get_my_name (); + if (my_name) + gtk_entry_set_text (GTK_ENTRY (priv->entry_user_name), my_name); + g_signal_connect(G_OBJECT(priv->entry_user_name), "changed", G_CALLBACK(on_easysetup_changed), self); gtk_widget_show (priv->entry_user_name); -- 1.7.9.5