diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-11-20 05:25:37 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-11-20 05:25:37 +0800 |
commit | 8b3091dea7eb0e975f40f8cb7ffaa8bb8a36ffdb (patch) | |
tree | eebbfb8c33da954ced2f77ab4cfcafaf9902342f /shell/e-setup.c | |
parent | 6f1d5b31351a2e4d31cd92a3856fd98e9dc2a6af (diff) | |
download | gsoc2013-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-setup.c')
-rw-r--r-- | shell/e-setup.c | 83 |
1 files changed, 46 insertions, 37 deletions
diff --git a/shell/e-setup.c b/shell/e-setup.c index 2ad5c0c151..6befdb8e92 100644 --- a/shell/e-setup.c +++ b/shell/e-setup.c @@ -25,6 +25,21 @@ #include <config.h> #endif +#include "e-setup.h" + +#include "e-local-folder.h" +#include "e-shell-config.h" +#include "e-shell-constants.h" + +#include <gconf/gconf-client.h> + +#include <gtk/gtklabel.h> + +#include <gal/widgets/e-gui-utils.h> + +#include <libgnome/gnome-i18n.h> +#include <libgnome/gnome-util.h> + #include <errno.h> #include <sys/stat.h> #include <sys/types.h> @@ -33,17 +48,6 @@ #include <string.h> #include <unistd.h> -#include <gtk/gtklabel.h> -#include <libgnome/gnome-i18n.h> -#include <libgnome/gnome-util.h> -#include <gal/widgets/e-gui-utils.h> - -#include "e-local-folder.h" -#include "e-shell-config.h" -#include "e-shell-constants.h" - -#include "e-setup.h" - static GList * check_dir_recur (const char *evolution_directory, @@ -417,34 +421,39 @@ e_setup (const char *evolution_directory) void -e_setup_check_config (EConfigListener *listener, - const char *evolution_directory) +e_setup_check_config (const char *evolution_directory) { + GConfClient *client; + char *tmp; char *uri; - if (e_config_listener_get_string_with_default (listener, "/DefaultFolders/mail_path", NULL, NULL) == NULL) { - e_config_listener_set_string (listener, "/DefaultFolders/mail_path", E_LOCAL_INBOX_URI); - uri = g_strconcat ("file://", evolution_directory, "/local", - strrchr (E_LOCAL_INBOX_URI, '/'), NULL); - e_config_listener_set_string (listener, "/DefaultFolders/mail_uri", uri); - g_free (uri); - - e_config_listener_set_string (listener, "/DefaultFolders/contacts_path", E_LOCAL_CONTACTS_URI); - uri = g_strconcat ("file://", evolution_directory, "/local", - strrchr (E_LOCAL_CONTACTS_URI, '/'), NULL); - e_config_listener_set_string (listener, "/DefaultFolders/contacts_uri", uri); - g_free (uri); - - e_config_listener_set_string (listener, "/DefaultFolders/calendar_path", E_LOCAL_CALENDAR_URI); - uri = g_strconcat ("file://", evolution_directory, "/local", - strrchr (E_LOCAL_CALENDAR_URI, '/'), NULL); - e_config_listener_set_string (listener, "/DefaultFolders/calendar_uri", uri); - g_free (uri); - - e_config_listener_set_string (listener, "/DefaultFolders/tasks_path", E_LOCAL_TASKS_URI); - uri = g_strconcat ("file://", evolution_directory, "/local", - strrchr (E_LOCAL_TASKS_URI, '/'), NULL); - e_config_listener_set_string (listener, "/DefaultFolders/tasks_uri", uri); - g_free (uri); + client = gconf_client_get_default (); + + tmp = gconf_client_get_string (client, "/apps/evolution/shell/default_folders/mail_path", NULL); + if (tmp != NULL && *tmp != 0) { + g_object_unref (client); + return; } + + gconf_client_set_string (client, "/apps/evolution/shell/default_folders/mail_path", E_LOCAL_INBOX_URI, NULL); + uri = g_strconcat ("file://", evolution_directory, "/local", strrchr (E_LOCAL_INBOX_URI, '/'), NULL); + gconf_client_set_string (client, "/apps/evolution/shell/default_folders/mail_uri", uri, NULL); + g_free (uri); + + gconf_client_set_string (client, "/apps/evolution/shell/default_folders/contacts_path", E_LOCAL_CONTACTS_URI, NULL); + uri = g_strconcat ("file://", evolution_directory, "/local", strrchr (E_LOCAL_CONTACTS_URI, '/'), NULL); + gconf_client_set_string (client, "/apps/evolution/shell/default_folders/contacts_uri", uri, NULL); + g_free (uri); + + gconf_client_set_string (client, "/apps/evolution/shell/default_folders/tasks_path", E_LOCAL_TASKS_URI, NULL); + uri = g_strconcat ("file://", evolution_directory, "/local", strrchr (E_LOCAL_TASKS_URI, '/'), NULL); + gconf_client_set_string (client, "/apps/evolution/shell/default_folders/tasks_uri", uri, NULL); + g_free (uri); + + gconf_client_set_string (client, "/apps/evolution/shell/default_folders/calendar_path", E_LOCAL_CALENDAR_URI, NULL); + uri = g_strconcat ("file://", evolution_directory, "/local", strrchr (E_LOCAL_CALENDAR_URI, '/'), NULL); + gconf_client_set_string (client, "/apps/evolution/shell/default_folders/calendar_uri", uri, NULL); + g_free (uri); + + g_object_unref (client); } |