aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-startup-wizard.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-11-20 05:25:37 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-11-20 05:25:37 +0800
commit8b3091dea7eb0e975f40f8cb7ffaa8bb8a36ffdb (patch)
treeeebbfb8c33da954ced2f77ab4cfcafaf9902342f /shell/e-shell-startup-wizard.c
parent6f1d5b31351a2e4d31cd92a3856fd98e9dc2a6af (diff)
downloadgsoc2013-evolution-8b3091dea7eb0e975f40f8cb7ffaa8bb8a36ffdb.tar.gz
gsoc2013-evolution-8b3091dea7eb0e975f40f8cb7ffaa8bb8a36ffdb.tar.zst
gsoc2013-evolution-8b3091dea7eb0e975f40f8cb7ffaa8bb8a36ffdb.zip
Disabled for now.
* main.c (upgrade_from_1_0_if_needed): Disabled for now. * e-shell-startup-wizard.c: Removed member config_listener from struct SWData. (e_shell_startup_wizard_create): Updated accordingly, just use GConf, checking the /apps/evolution/mail/account-list key. (finish_func): Use GConf. * e-shell-config-default-folders.c: Removed member config_listener in struct EvolutionDefaultFolderConfig. (e_shell_config_default_folders_create_widget): Do not initialize here. GConfified the paths. (config_control_destroy_notify): No unref of the config_listener anymore. (config_control_apply_cb): Use GConf. (setup_folder_selector): Likewise. * e-shell-config-autocompletion.c: Removed member config_listener from EvolutionAutocompletionConfig. (config_control_destroy_notify): Do not unref. (config_control_apply_callback): Use a GConfClient. * e-folder-list.c (e_folder_list_init): Add missing cast. * main.c (show_development_warning): Use GConf. * e-setup.c (e_setup_check_config): Removed arg @listener. GConfified. * e-shell-view.c (e_shell_view_save_defaults): New. (e_shell_view_save_settings): Removed. (e_shell_view_load_settings): Removed. (setup_defaults): New helper function. (e_shell_view_construct): New arg @uri. (e_shell_view_new): New arg @uri. * e-shell.c: Removed member config_listener in struct EShellPrivate. (impl_dispose): Do not unref. (init): Do not initialize. (get_config_start_offline): New helper function. (e_shell_construct): Use this to get the startup mode in case E_SHELL_STARTUP_LINE_MODE_CONFIG. (save_misc_settings): Changed to use GConfClient instead of EConfigListener. (e_shell_create_view_from_settings): Removed. (e_shell_restore_from_settings): Removed. (e_shell_get_config_listener): Removed. (e_shell_disconnect_db): Removed. (parse_default_uri): Use GConf. * main.c (idle_cb): Simplified the logic here. Always assume that the view will be created with the default folder open by just using e_shell_create_view(). svn path=/trunk/; revision=18844
Diffstat (limited to 'shell/e-shell-startup-wizard.c')
-rw-r--r--shell/e-shell-startup-wizard.c47
1 files changed, 23 insertions, 24 deletions
diff --git a/shell/e-shell-startup-wizard.c b/shell/e-shell-startup-wizard.c
index c693243f47..e2728211f0 100644
--- a/shell/e-shell-startup-wizard.c
+++ b/shell/e-shell-startup-wizard.c
@@ -26,7 +26,13 @@
#include "e-shell-startup-wizard.h"
-#include <errno.h>
+#include "e-timezone-dialog/e-timezone-dialog.h"
+#include "e-util/e-gtk-utils.h"
+
+#include <gconf/gconf-client.h>
+
+#include <evolution-wizard.h>
+#include "Evolution.h"
#include <glib.h>
#include <gtk/gtk.h>
@@ -44,13 +50,6 @@
#include <widgets/e-timezone-dialog/e-timezone-dialog.h>
-#include "e-timezone-dialog/e-timezone-dialog.h"
-#include "e-util/e-gtk-utils.h"
-#include "e-util/e-config-listener.h"
-
-#include <evolution-wizard.h>
-#include "Evolution.h"
-
typedef struct _TimezoneDialogPage {
GtkWidget *page;
GtkWidget *vbox;
@@ -95,8 +94,6 @@ typedef struct _SWData {
CORBA_Object mailer;
Bonobo_EventSource event_source;
BonoboListener *listener;
-
- EConfigListener *config_listener;
} SWData;
typedef struct _IntelligentImporterData {
@@ -338,6 +335,7 @@ finish_func (GnomeDruidPage *page,
GnomeDruid *druid,
SWData *data)
{
+ GConfClient *client;
CORBA_Environment ev;
const char *displayname;
char *tz;
@@ -358,8 +356,11 @@ finish_func (GnomeDruidPage *page,
tz = g_strdup ("UTC");
else
tz = g_strdup (icaltimezone_get_location (zone));
-
- e_config_listener_set_string (data->config_listener, "/Calendar/Display/Timezone", tz);
+
+ client = gconf_client_get_default ();
+ gconf_client_set_string (client, "/apps/evolution/calendar/display/timezone", tz, NULL);
+ g_object_unref (client);
+
g_free (tz);
do_import (data);
@@ -843,23 +844,24 @@ startup_wizard_cancel (GnomeDruid *druid,
gboolean
e_shell_startup_wizard_create (void)
{
+ GConfClient *client;
SWData *data;
- int num_accounts;
+ GSList *accounts;
return TRUE;
- data = g_new0 (SWData, 1);
+ client = gconf_client_get_default ();
+ accounts = gconf_client_get_list (client, "/apps/evolution/mail/accounts", GCONF_VALUE_STRING, NULL);
+ g_object_unref (client);
- data->config_listener = e_config_listener_new();
-
- num_accounts = e_config_listener_get_long_with_default (data->config_listener, "/Mail/Accounts/num", 0, NULL);
-
- if (num_accounts != 0) {
- g_object_unref (data->config_listener);
- g_free (data);
+ if (accounts != NULL) {
+ g_slist_foreach (accounts, (GFunc) g_free, NULL);
+ g_slist_free (accounts);
return TRUE;
}
+ data = g_new0 (SWData, 1);
+
data->wizard = glade_xml_new (EVOLUTION_GLADEDIR "/evolution-startup-wizard.glade", NULL, NULL);
g_return_val_if_fail (data->wizard != NULL, FALSE);
data->dialog = glade_xml_get_widget (data->wizard, "startup-wizard");
@@ -907,8 +909,5 @@ e_shell_startup_wizard_create (void)
gtk_main ();
- g_object_unref (data->config_listener);
- data->config_listener = NULL;
-
return !data->cancel;
}