diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-06-30 22:47:59 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-06-30 22:47:59 +0800 |
commit | 8dc6bbd250891bcef9130a789c9b74a01be7f1cb (patch) | |
tree | abf0e8555b04f6748473ac8215e26fb7d6c44d35 /plugins | |
parent | 99126d46e61ce19a72acb3dd8498729b025339ec (diff) | |
download | gsoc2013-evolution-8dc6bbd250891bcef9130a789c9b74a01be7f1cb.tar.gz gsoc2013-evolution-8dc6bbd250891bcef9130a789c9b74a01be7f1cb.tar.zst gsoc2013-evolution-8dc6bbd250891bcef9130a789c9b74a01be7f1cb.zip |
Get the "startup-wizard" plugin working again.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/startup-wizard/Makefile.am | 2 | ||||
-rw-r--r-- | plugins/startup-wizard/startup-wizard.c | 45 |
2 files changed, 31 insertions, 16 deletions
diff --git a/plugins/startup-wizard/Makefile.am b/plugins/startup-wizard/Makefile.am index fea7f7232f..fc91ab3f1f 100644 --- a/plugins/startup-wizard/Makefile.am +++ b/plugins/startup-wizard/Makefile.am @@ -16,7 +16,7 @@ liborg_gnome_evolution_startup_wizard_la_LIBADD = \ $(top_builddir)/e-util/libeutil.la \ $(top_builddir)/widgets/e-timezone-dialog/libetimezonedialog.la \ $(top_builddir)/widgets/misc/libemiscwidgets.la \ - $(top_builddir)/calendar/gui/libevolution-calendar.la \ + $(top_builddir)/calendar/gui/libcal-gui.la \ $(top_builddir)/mail/libevolution-mail.la \ $(EVOLUTION_CALENDAR_LIBS) \ $(EVOLUTION_MAIL_LIBS) diff --git a/plugins/startup-wizard/startup-wizard.c b/plugins/startup-wizard/startup-wizard.c index 7dd3f5b3e3..41a647a1b6 100644 --- a/plugins/startup-wizard/startup-wizard.c +++ b/plugins/startup-wizard/startup-wizard.c @@ -29,6 +29,7 @@ #include <libgnomeui/gnome-druid-page-standard.h> #include "e-util/e-error.h" #include "e-util/e-import.h" +#include "shell/e-shell.h" #include "shell/es-event.h" #include "mail/em-config.h" #include "mail/em-account-editor.h" @@ -47,7 +48,7 @@ static GtkWidget *import_dialog, *import_progress, *import_label; static GSList *import_iterator, *import_importers; G_GNUC_NORETURN static void -startup_wizard_delete (void) { +startup_wizard_terminate (void) { gtk_main_quit (); _exit (0); } @@ -55,10 +56,10 @@ startup_wizard_delete (void) { void startup_wizard (EPlugin *ep, ESEventTargetUpgrade *target) { - GConfClient *client; - GSList *accounts; EMAccountEditor *emae; GnomeDruidPageEdge *start_page; + GConfClient *client; + GSList *accounts; client = gconf_client_get_default (); accounts = gconf_client_get_list (client, "/apps/evolution/mail/accounts", GCONF_VALUE_STRING, NULL); @@ -79,20 +80,29 @@ startup_wizard (EPlugin *ep, ESEventTargetUpgrade *target) * * The new mail account druid. */ - emae = em_account_editor_new (NULL, EMAE_DRUID, "org.gnome.evolution.mail.config.accountWizard"); + emae = em_account_editor_new ( + NULL, EMAE_DRUID, + "org.gnome.evolution.mail.config.accountWizard"); - gtk_window_set_title (GTK_WINDOW (emae->editor), _("Evolution Setup Assistant")); + gtk_window_set_title ( + GTK_WINDOW (emae->editor), _("Evolution Setup Assistant")); - start_page = GNOME_DRUID_PAGE_EDGE (e_config_page_get ((EConfig *) emae->config, "0.start")); + start_page = GNOME_DRUID_PAGE_EDGE ( + e_config_page_get ((EConfig *) emae->config, "0.start")); gnome_druid_page_edge_set_title (start_page, _("Welcome")); - gnome_druid_page_edge_set_text (start_page, _("" - "Welcome to Evolution. The next few screens will allow Evolution to connect " - "to your email accounts, and to import files from other applications. \n" - "\n" - "Please click the \"Forward\" button to continue. ")); - g_signal_connect (emae->editor, "delete-event", G_CALLBACK (startup_wizard_delete), NULL); + gnome_druid_page_edge_set_text ( + start_page, _("" + "Welcome to Evolution. The next few screens will allow Evolution to connect " + "to your email accounts, and to import files from other applications. \n" + "\n" + "Please click the \"Forward\" button to continue. ")); + + g_signal_connect ( + emae->editor, "delete-event", + G_CALLBACK (startup_wizard_terminate), NULL); gtk_widget_show (emae->editor); + gtk_main (); } @@ -188,10 +198,16 @@ import_done(EImport *ei, gpointer d) void startup_wizard_commit (EPlugin *ep, EMConfigTargetAccount *target) { + EShell *shell; + EShellSettings *shell_settings; gchar *location; + shell = e_shell_get_default (); + shell_settings = e_shell_get_shell_settings (shell); + /* Use System Timezone by default */ - calendar_config_set_use_system_timezone (TRUE); + e_shell_settings_set_boolean ( + shell_settings, "cal-use-system-timezone", TRUE); location = e_cal_util_get_system_timezone_location (); calendar_config_set_timezone (location); g_free (location); @@ -217,6 +233,5 @@ startup_wizard_commit (EPlugin *ep, EMConfigTargetAccount *target) void startup_wizard_abort (EPlugin *ep, EMConfigTargetAccount *target) { - gtk_main_quit (); - _exit (0); + startup_wizard_terminate (); } |