diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-06-23 08:08:39 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-06-23 08:12:11 +0800 |
commit | e9b5561fd07e799b9c292eb2792f9a8b334204cf (patch) | |
tree | b93a5fe60d67f4ca145b612245620cd853e683f5 /mail | |
parent | 97792841a09d2617fb297940d887fd7233b1eb2d (diff) | |
download | gsoc2013-evolution-e9b5561fd07e799b9c292eb2792f9a8b334204cf.tar.gz gsoc2013-evolution-e9b5561fd07e799b9c292eb2792f9a8b334204cf.tar.zst gsoc2013-evolution-e9b5561fd07e799b9c292eb2792f9a8b334204cf.zip |
EMailConfigSummaryPage: Remove "account-name" property.
It's redundant. Just set the display name on one of the ESources.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/e-mail-config-assistant.c | 5 | ||||
-rw-r--r-- | mail/e-mail-config-summary-page.c | 73 | ||||
-rw-r--r-- | mail/e-mail-config-summary-page.h | 5 |
3 files changed, 2 insertions, 81 deletions
diff --git a/mail/e-mail-config-assistant.c b/mail/e-mail-config-assistant.c index e6fa0e3074..680463c76d 100644 --- a/mail/e-mail-config-assistant.c +++ b/mail/e-mail-config-assistant.c @@ -249,11 +249,10 @@ mail_config_assistant_autoconfigure_cb (GObject *source_object, e_mail_config_service_page_auto_configure ( priv->sending_page, autoconfig); - /* Also set the initial account name to the email address + /* Also set the initial display name to the email address * given so the user can just click past the Summary page. */ email_address = e_mail_autoconfig_get_email_address (autoconfig); - e_mail_config_summary_page_set_account_name ( - priv->summary_page, email_address); + e_source_set_display_name (priv->identity_source, email_address); /* XXX Can't find a better way to learn the page number of * the summary page. Oh my god this API is horrible. */ diff --git a/mail/e-mail-config-summary-page.c b/mail/e-mail-config-summary-page.c index 110b007bd9..b8b96bf390 100644 --- a/mail/e-mail-config-summary-page.c +++ b/mail/e-mail-config-summary-page.c @@ -29,7 +29,6 @@ ((obj), E_TYPE_MAIL_CONFIG_SUMMARY_PAGE, EMailConfigSummaryPagePrivate)) struct _EMailConfigSummaryPagePrivate { - gchar *account_name; ESource *account_source; ESource *identity_source; ESource *transport_source; @@ -56,7 +55,6 @@ struct _EMailConfigSummaryPagePrivate { enum { PROP_0, - PROP_ACCOUNT_NAME, PROP_ACCOUNT_BACKEND, PROP_ACCOUNT_SOURCE, PROP_IDENTITY_SOURCE, @@ -164,12 +162,6 @@ mail_config_summary_page_set_property (GObject *object, GParamSpec *pspec) { switch (property_id) { - case PROP_ACCOUNT_NAME: - e_mail_config_summary_page_set_account_name ( - E_MAIL_CONFIG_SUMMARY_PAGE (object), - g_value_get_string (value)); - return; - case PROP_ACCOUNT_BACKEND: e_mail_config_summary_page_set_account_backend ( E_MAIL_CONFIG_SUMMARY_PAGE (object), @@ -199,13 +191,6 @@ mail_config_summary_page_get_property (GObject *object, GParamSpec *pspec) { switch (property_id) { - case PROP_ACCOUNT_NAME: - g_value_set_string ( - value, - e_mail_config_summary_page_get_account_name ( - E_MAIL_CONFIG_SUMMARY_PAGE (object))); - return; - case PROP_ACCOUNT_BACKEND: g_value_set_object ( value, @@ -294,20 +279,6 @@ mail_config_summary_page_dispose (GObject *object) } static void -mail_config_summary_page_finalize (GObject *object) -{ - EMailConfigSummaryPagePrivate *priv; - - priv = E_MAIL_CONFIG_SUMMARY_PAGE_GET_PRIVATE (object); - - g_free (priv->account_name); - - /* Chain up to parent's finalize() method. */ - G_OBJECT_CLASS (e_mail_config_summary_page_parent_class)-> - finalize (object); -} - -static void mail_config_summary_page_constructed (GObject *object) { EMailConfigSummaryPage *page; @@ -388,12 +359,6 @@ mail_config_summary_page_constructed (GObject *object) widget, "changed", G_CALLBACK (e_mail_config_page_changed), page); - g_object_bind_property ( - widget, "text", - page, "account-name", - G_BINDING_BIDIRECTIONAL | - G_BINDING_SYNC_CREATE); - /*** Details ***/ widget = gtk_grid_new (); @@ -744,24 +709,12 @@ e_mail_config_summary_page_class_init (EMailConfigSummaryPageClass *class) object_class->set_property = mail_config_summary_page_set_property; object_class->get_property = mail_config_summary_page_get_property; object_class->dispose = mail_config_summary_page_dispose; - object_class->finalize = mail_config_summary_page_finalize; object_class->constructed = mail_config_summary_page_constructed; class->refresh = mail_config_summary_page_refresh; g_object_class_install_property ( object_class, - PROP_ACCOUNT_NAME, - g_param_spec_string ( - "account-name", - "Account Name", - "Display name for the mail account", - NULL, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS)); - - g_object_class_install_property ( - object_class, PROP_ACCOUNT_BACKEND, g_param_spec_object ( "account-backend", @@ -854,32 +807,6 @@ e_mail_config_summary_page_refresh (EMailConfigSummaryPage *page) g_signal_emit (page, signals[REFRESH], 0); } -const gchar * -e_mail_config_summary_page_get_account_name (EMailConfigSummaryPage *page) -{ - g_return_val_if_fail (E_IS_MAIL_CONFIG_SUMMARY_PAGE (page), NULL); - - return page->priv->account_name; -} - -void -e_mail_config_summary_page_set_account_name (EMailConfigSummaryPage *page, - const gchar *account_name) -{ - g_return_if_fail (E_IS_MAIL_CONFIG_SUMMARY_PAGE (page)); - - if (account_name == NULL) - account_name = ""; - - if (g_strcmp0 (page->priv->account_name, account_name) == 0) - return; - - g_free (page->priv->account_name); - page->priv->account_name = g_strdup (account_name); - - g_object_notify (G_OBJECT (page), "account-name"); -} - EMailConfigServiceBackend * e_mail_config_summary_page_get_account_backend (EMailConfigSummaryPage *page) { diff --git a/mail/e-mail-config-summary-page.h b/mail/e-mail-config-summary-page.h index 2bfc03af8e..6e43fdd9f0 100644 --- a/mail/e-mail-config-summary-page.h +++ b/mail/e-mail-config-summary-page.h @@ -69,11 +69,6 @@ EMailConfigPage * e_mail_config_summary_page_new (void); void e_mail_config_summary_page_refresh (EMailConfigSummaryPage *page); -const gchar * e_mail_config_summary_page_get_account_name - (EMailConfigSummaryPage *page); -void e_mail_config_summary_page_set_account_name - (EMailConfigSummaryPage *page, - const gchar *account_name); EMailConfigServiceBackend * e_mail_config_summary_page_get_account_backend (EMailConfigSummaryPage *page); |