aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-config-default-folders.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-config-default-folders.c
parent6f1d5b31351a2e4d31cd92a3856fd98e9dc2a6af (diff)
downloadgsoc2013-evolution-8b3091dea7eb0e975f40f8cb7ffaa8bb8a36ffdb.tar
gsoc2013-evolution-8b3091dea7eb0e975f40f8cb7ffaa8bb8a36ffdb.tar.gz
gsoc2013-evolution-8b3091dea7eb0e975f40f8cb7ffaa8bb8a36ffdb.tar.bz2
gsoc2013-evolution-8b3091dea7eb0e975f40f8cb7ffaa8bb8a36ffdb.tar.lz
gsoc2013-evolution-8b3091dea7eb0e975f40f8cb7ffaa8bb8a36ffdb.tar.xz
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-config-default-folders.c')
-rw-r--r--shell/e-shell-config-default-folders.c57
1 files changed, 32 insertions, 25 deletions
diff --git a/shell/e-shell-config-default-folders.c b/shell/e-shell-config-default-folders.c
index d409eaa469..1966df05a9 100644
--- a/shell/e-shell-config-default-folders.c
+++ b/shell/e-shell-config-default-folders.c
@@ -29,14 +29,14 @@
#include "evolution-folder-selector-button.h"
-#include "e-util/e-config-listener.h"
-
#include <glade/glade-xml.h>
#include <gtk/gtktogglebutton.h>
#include <gtk/gtksignal.h>
#include <libgnome/gnome-i18n.h>
+#include <gconf/gconf-client.h>
+
typedef struct {
GladeXML *glade;
@@ -47,7 +47,6 @@ typedef struct {
char *calendar_uri, *calendar_path;
char *tasks_uri, *tasks_path;
- EConfigListener *config_listener;
EvolutionShellClient *shell_client;
} EvolutionDefaultFolderConfig;
@@ -84,14 +83,21 @@ static void
config_control_apply_cb (EvolutionConfigControl *control,
EvolutionDefaultFolderConfig *dfc)
{
- e_config_listener_set_string (dfc->config_listener, "/DefaultFolders/mail_path", dfc->mail_path);
- e_config_listener_set_string (dfc->config_listener, "/DefaultFolders/mail_uri", dfc->mail_uri);
- e_config_listener_set_string (dfc->config_listener, "/DefaultFolders/contacts_path", dfc->contacts_path);
- e_config_listener_set_string (dfc->config_listener, "/DefaultFolders/contacts_uri", dfc->contacts_uri);
- e_config_listener_set_string (dfc->config_listener, "/DefaultFolders/calendar_path", dfc->calendar_path);
- e_config_listener_set_string (dfc->config_listener, "/DefaultFolders/calendar_uri", dfc->calendar_uri);
- e_config_listener_set_string (dfc->config_listener, "/DefaultFolders/tasks_path", dfc->tasks_path);
- e_config_listener_set_string (dfc->config_listener, "/DefaultFolders/tasks_uri", dfc->tasks_uri);
+ GConfClient *client;
+
+ client = gconf_client_get_default ();
+
+ gconf_client_set_string (client, "/apps/evolution/shell/default_folders/mail_path", dfc->mail_path, NULL);
+ gconf_client_set_string (client, "/apps/evolution/shell/default_folders/mail_uri", dfc->mail_uri, NULL);
+ gconf_client_set_string (client, "/apps/evolution/shell/default_folders/contacts_path", dfc->contacts_path, NULL);
+ gconf_client_set_string (client, "/apps/evolution/shell/default_folders/contacts_uri", dfc->contacts_uri, NULL);
+ gconf_client_set_string (client, "/apps/evolution/shell/default_folders/calendar_path", dfc->calendar_path, NULL);
+ gconf_client_set_string (client, "/apps/evolution/shell/default_folders/calendar_uri", dfc->calendar_uri, NULL);
+ gconf_client_set_string (client, "/apps/evolution/shell/default_folders/tasks_path", dfc->tasks_path, NULL);
+ gconf_client_set_string (client, "/apps/evolution/shell/default_folders/tasks_uri", dfc->tasks_uri, NULL);
+
+
+ g_object_unref (client);
}
static void
@@ -100,8 +106,6 @@ config_control_destroy_notify (void *data,
{
EvolutionDefaultFolderConfig *dfc = (EvolutionDefaultFolderConfig *) data;
- g_object_unref (dfc->config_listener);
-
g_free (dfc->mail_uri);
g_free (dfc->mail_path);
g_free (dfc->contacts_uri);
@@ -129,10 +133,15 @@ setup_folder_selector (EvolutionDefaultFolderConfig *dfc,
char **uri_ptr, char *uri_dbpath,
const char **types)
{
+ GConfClient *client;
GtkWidget *button;
- *path_ptr = e_config_listener_get_string_with_default (dfc->config_listener, path_dbpath, NULL, NULL);
- *uri_ptr = e_config_listener_get_string_with_default (dfc->config_listener, uri_dbpath, NULL, NULL);
+ client = gconf_client_get_default ();
+
+ *path_ptr = gconf_client_get_string (client, path_dbpath, NULL);
+ *uri_ptr = gconf_client_get_string (client, uri_dbpath, NULL);
+
+ g_object_unref (client);
button = glade_xml_get_widget (dfc->glade, widget_name);
evolution_folder_selector_button_construct (
@@ -160,8 +169,6 @@ e_shell_config_default_folders_create_widget (EShell *shell, EvolutionConfigCont
dfc = g_new0 (EvolutionDefaultFolderConfig, 1);
- dfc->config_listener = e_config_listener_new ();
-
CORBA_exception_init (&ev);
shell_dup = CORBA_Object_duplicate (BONOBO_OBJREF (shell), &ev);
CORBA_exception_free (&ev);
@@ -170,20 +177,20 @@ e_shell_config_default_folders_create_widget (EShell *shell, EvolutionConfigCont
dfc->glade = glade_xml_new (EVOLUTION_GLADEDIR "/e-shell-config-default-folders.glade", NULL, NULL);
setup_folder_selector (dfc, "default_mail_button",
- &dfc->mail_path, "/DefaultFolders/mail_path",
- &dfc->mail_uri, "/DefaultFolders/mail_uri",
+ &dfc->mail_path, "/apps/evolution/shell/default_folders/mail_path",
+ &dfc->mail_uri, "/apps/evolution/shell/default_folders/mail_uri",
mail_types);
setup_folder_selector (dfc, "default_contacts_button",
- &dfc->contacts_path, "/DefaultFolders/contacts_path",
- &dfc->contacts_uri, "/DefaultFolders/contacts_uri",
+ &dfc->contacts_path, "/apps/evolution/shell/default_folders/contacts_path",
+ &dfc->contacts_uri, "/apps/evolution/shell/default_folders/contacts_uri",
contacts_types);
setup_folder_selector (dfc, "default_calendar_button",
- &dfc->calendar_path, "/DefaultFolders/calendar_path",
- &dfc->calendar_uri, "/DefaultFolders/calendar_uri",
+ &dfc->calendar_path, "/apps/evolution/shell/default_folders/calendar_path",
+ &dfc->calendar_uri, "/apps/evolution/shell/default_folders/calendar_uri",
calendar_types);
setup_folder_selector (dfc, "default_tasks_button",
- &dfc->tasks_path, "/DefaultFolders/tasks_path",
- &dfc->tasks_uri, "/DefaultFolders/tasks_uri",
+ &dfc->tasks_path, "/apps/evolution/shell/default_folders/tasks_path",
+ &dfc->tasks_uri, "/apps/evolution/shell/default_folders/tasks_uri",
tasks_types);
widget = glade_xml_get_widget (dfc->glade, "default_folders_table");