From 1b5a2be5511354345887d954f156d6e61ca320b1 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 7 Mar 2012 09:27:54 -0500 Subject: startup-wizard: Avoid em_account_editor_get_widget(). em_account_editor_get_widget() won't be around much longer. Instead, use gtk_container_foreach() to scan for a GtkLabel. --- modules/startup-wizard/evolution-startup-wizard.c | 25 +++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'modules/startup-wizard') diff --git a/modules/startup-wizard/evolution-startup-wizard.c b/modules/startup-wizard/evolution-startup-wizard.c index 50db85710e..7dd1c679e8 100644 --- a/modules/startup-wizard/evolution-startup-wizard.c +++ b/modules/startup-wizard/evolution-startup-wizard.c @@ -127,6 +127,20 @@ startup_wizard_import_complete (EImport *import, e_config_target_changed (config, E_CONFIG_TARGET_CHANGED_STATE); } +static void +startup_wizard_tweak_welcome_label (GtkWidget *child) +{ + const gchar *welcome_text; + + welcome_text = + _("Welcome to Evolution. The next few screens will " + "allow Evolution to connect to your email accounts, " + "and to import files from other applications."); + + if (GTK_IS_LABEL (child)) + gtk_label_set_text (GTK_LABEL (child), welcome_text); +} + static gboolean startup_wizard_check_progress (EConfig *config, const gchar *page_id, @@ -499,12 +513,11 @@ startup_wizard_new_assistant (EStartupWizard *extension) gtk_assistant_set_page_title ( GTK_ASSISTANT (config->widget), widget, _("Welcome")); - widget = em_account_editor_get_widget (emae, "start_page_label"); - gtk_label_set_text ( - GTK_LABEL (widget), - _("Welcome to Evolution. The next few screens will " - "allow Evolution to connect to your email accounts, " - "and to import files from other applications.")); + /* The welcome page should be a GtkBox with a GtkLabel + * packed inside. We need to alter the GtkLabel text. */ + gtk_container_foreach ( + GTK_CONTAINER (widget), + (GtkCallback) startup_wizard_tweak_welcome_label, NULL); /* Finalize the EMAccountEditor along with the GtkAssistant. */ g_object_set_data_full ( -- cgit v1.2.3