aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2002-04-11 03:01:14 +0800
committerDan Winship <danw@src.gnome.org>2002-04-11 03:01:14 +0800
commit8ded5c9c10e4079fded6889ec4b10c37226468d4 (patch)
tree46bc039454a21d53d478af5f069816b2e4f872a5 /shell
parenteaeb675f415f5f672cdcd5b4774356d1ca383fa1 (diff)
downloadgsoc2013-evolution-8ded5c9c10e4079fded6889ec4b10c37226468d4.tar
gsoc2013-evolution-8ded5c9c10e4079fded6889ec4b10c37226468d4.tar.gz
gsoc2013-evolution-8ded5c9c10e4079fded6889ec4b10c37226468d4.tar.bz2
gsoc2013-evolution-8ded5c9c10e4079fded6889ec4b10c37226468d4.tar.lz
gsoc2013-evolution-8ded5c9c10e4079fded6889ec4b10c37226468d4.tar.xz
gsoc2013-evolution-8ded5c9c10e4079fded6889ec4b10c37226468d4.tar.zst
gsoc2013-evolution-8ded5c9c10e4079fded6889ec4b10c37226468d4.zip
Shell config page routines. Right now handles the default folders page.
* e-shell-config.c: Shell config page routines. Right now handles the default folders page. * glade/e-shell-config-default-folders.glade: New. * GNOME_Evolution_Shell.oaf.in: Add info for the default folders config page. * main.c (idle_cb): If we successfully registered the shell, register the config factory. * evolution-shell-client.c (evolution_shell_client_new): Note the fact that it frees the corba_shell when it is destroyed. * evolution-folder-selector-button.c (evolution_folder_selector_button_construct, destroy): Use bonobo_object_ref/unref on the shell client, not gtk. * e-shell.c (e_shell_construct): Pass local_directory to e_setup_check_db. (handle_default_uri): Fix the config db paths here to match the other routines. * e-setup.c (e_setup_check_db): Make this take the evolution directory path as well so we can properly set up file: URIs for the default folders. svn path=/trunk/; revision=16423
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog29
-rw-r--r--shell/GNOME_Evolution_Shell.oaf.in36
-rw-r--r--shell/Makefile.am4
-rw-r--r--shell/e-setup.c46
-rw-r--r--shell/e-setup.h5
-rw-r--r--shell/e-shell-config.c223
-rw-r--r--shell/e-shell-config.h28
-rw-r--r--shell/e-shell.c4
-rw-r--r--shell/evolution-folder-selector-button.c4
-rw-r--r--shell/evolution-shell-client.c3
-rw-r--r--shell/glade/Makefile.am1
-rw-r--r--shell/glade/e-shell-config-default-folders.glade255
-rw-r--r--shell/main.c3
13 files changed, 618 insertions, 23 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 3b6fcda4a6..da509bdb47 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,32 @@
+2002-04-10 Dan Winship <danw@ximian.com>
+
+ * e-shell-config.c: Shell config page routines. Right now
+ handles the default folders page.
+
+ * glade/e-shell-config-default-folders.glade: New.
+
+ * GNOME_Evolution_Shell.oaf.in: Add info for the default folders
+ config page.
+
+ * main.c (idle_cb): If we successfully registered the shell,
+ register the config factory.
+
+ * evolution-shell-client.c (evolution_shell_client_new): Note the
+ fact that it frees the corba_shell when it is destroyed.
+
+ * evolution-folder-selector-button.c
+ (evolution_folder_selector_button_construct, destroy): Use
+ bonobo_object_ref/unref on the shell client, not gtk.
+
+ * e-shell.c (e_shell_construct): Pass local_directory to
+ e_setup_check_db.
+ (handle_default_uri): Fix the config db paths here to match the
+ other routines.
+
+ * e-setup.c (e_setup_check_db): Make this take the evolution
+ directory path as well so we can properly set up file: URIs for
+ the default folders.
+
2002-04-09 Ettore Perazzoli <ettore@ximian.com>
* main.c (idle_cb): Change the logic for displaying a default
diff --git a/shell/GNOME_Evolution_Shell.oaf.in b/shell/GNOME_Evolution_Shell.oaf.in
index 1234d78139..65e5892d9b 100644
--- a/shell/GNOME_Evolution_Shell.oaf.in
+++ b/shell/GNOME_Evolution_Shell.oaf.in
@@ -12,4 +12,40 @@
_value="The Evolution shell."/>
</oaf_server>
+<oaf_server iid="OAFIID:GNOME_Evolution_Shell_Config_Factory"
+ type="exe"
+ location="evolution-exchange-storage">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/GenericFactory:1.0"/>
+ </oaf_attribute>
+</oaf_server>
+
+<oaf_server iid="OAFIID:GNOME_Evolution_Shell_Config_DefaultFolders_Control"
+ type="factory"
+ location="OAFIID:GNOME_Evolution_Shell_Config_Factory">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/Evolution/ConfigControl:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="evolution:config_item:title" type="string"
+ _value="Default Folders"/>
+
+ <oaf_attribute name="evolution:config_item:description" type="string"
+ _value="This page can be used to configure default folders"/>
+
+ <oaf_attribute name="evolution:config_item:icon_name" type="string"
+ value="folder-settings.png"/>
+
+ <oaf_attribute name="evolution:config_item:priority" type="string" value="-9"/>
+
+ <oaf_attribute name="evolution:config_item:type" type="stringv">
+ <item value="shell"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ _value="Configuration control for Evolution default folders."/>
+</oaf_server>
+
</oaf_info>
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 736e77eeb4..bc11b68718 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -128,8 +128,10 @@ evolution_SOURCES = \
e-local-storage.h \
e-setup.c \
e-setup.h \
- e-shell-about-box.h \
e-shell-about-box.c \
+ e-shell-about-box.h \
+ e-shell-config.c \
+ e-shell-config.h \
e-shell-constants.h \
e-shell-folder-commands.c \
e-shell-folder-commands.h \
diff --git a/shell/e-setup.c b/shell/e-setup.c
index 088aa010c2..b3d41509c4 100644
--- a/shell/e-setup.c
+++ b/shell/e-setup.c
@@ -41,6 +41,7 @@
#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"
@@ -417,26 +418,41 @@ e_setup (const char *evolution_directory)
void
-e_setup_check_db (Bonobo_ConfigDatabase db)
+e_setup_check_db (Bonobo_ConfigDatabase db, const char *evolution_directory)
{
- gboolean def;
+ char *uri;
- if (bonobo_config_get_string_with_default (db, "/DefaultFolder/mail_path", NULL, &def) == NULL) {
- bonobo_config_set_string (db, "/DefaultFolder/mail_path",
+ if (bonobo_config_get_string_with_default (db, "/DefaultFolders/mail_path", NULL, NULL) == NULL) {
+ bonobo_config_set_string (db, "/DefaultFolders/mail_path",
E_LOCAL_INBOX_URI, NULL);
- bonobo_config_set_string (db, "/DefaultFolder/mail_uri",
- E_LOCAL_INBOX_URI, NULL);
- bonobo_config_set_string (db, "/DefaultFolder/contacts_path",
- E_LOCAL_CONTACTS_URI, NULL);
- bonobo_config_set_string (db, "/DefaultFolder/contacts_uri",
+ uri = g_strconcat ("file://", evolution_directory, "/local",
+ strrchr (E_LOCAL_INBOX_URI, '/'), NULL);
+ bonobo_config_set_string (db, "/DefaultFolders/mail_uri",
+ uri, NULL);
+ g_free (uri);
+
+ bonobo_config_set_string (db, "/DefaultFolders/contacts_path",
E_LOCAL_CONTACTS_URI, NULL);
- bonobo_config_set_string (db, "/DefaultFolder/calendar_path",
- E_LOCAL_CALENDAR_URI, NULL);
- bonobo_config_set_string (db, "/DefaultFolder/calendar_uri",
+ uri = g_strconcat ("file://", evolution_directory, "/local",
+ strrchr (E_LOCAL_CONTACTS_URI, '/'), NULL);
+ bonobo_config_set_string (db, "/DefaultFolders/contacts_uri",
+ uri, NULL);
+ g_free (uri);
+
+ bonobo_config_set_string (db, "/DefaultFolders/calendar_path",
E_LOCAL_CALENDAR_URI, NULL);
- bonobo_config_set_string (db, "/DefaultFolder/tasks_path",
- E_LOCAL_TASKS_URI, NULL);
- bonobo_config_set_string (db, "/DefaultFolder/tasks_uri",
+ uri = g_strconcat ("file://", evolution_directory, "/local",
+ strrchr (E_LOCAL_CALENDAR_URI, '/'), NULL);
+ bonobo_config_set_string (db, "/DefaultFolders/calendar_uri",
+ uri, NULL);
+ g_free (uri);
+
+ bonobo_config_set_string (db, "/DefaultFolders/tasks_path",
E_LOCAL_TASKS_URI, NULL);
+ uri = g_strconcat ("file://", evolution_directory, "/local",
+ strrchr (E_LOCAL_TASKS_URI, '/'), NULL);
+ bonobo_config_set_string (db, "/DefaultFolders/tasks_uri",
+ uri, NULL);
+ g_free (uri);
}
}
diff --git a/shell/e-setup.h b/shell/e-setup.h
index 37144eadc7..cf839044af 100644
--- a/shell/e-setup.h
+++ b/shell/e-setup.h
@@ -26,8 +26,9 @@
#include <glib.h>
#include <bonobo-conf/bonobo-config-database.h>
-gboolean e_setup (const char *evolution_directory);
+gboolean e_setup (const char *evolution_directory);
-void e_setup_check_db (Bonobo_ConfigDatabase db);
+void e_setup_check_db (Bonobo_ConfigDatabase db,
+ const char *evolution_directory);
#endif /* _E_SETUP_H */
diff --git a/shell/e-shell-config.c b/shell/e-shell-config.c
new file mode 100644
index 0000000000..73103cd98d
--- /dev/null
+++ b/shell/e-shell-config.c
@@ -0,0 +1,223 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* e-shell-config.c
+ *
+ * Copyright (C) 2002 Ximian, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "e-shell-config.h"
+#include "evolution-config-control.h"
+#include "evolution-folder-selector-button.h"
+
+#include <bonobo/bonobo-generic-factory.h>
+#include <glade/glade-xml.h>
+#include <gtk/gtktogglebutton.h>
+
+#define E_SHELL_CONFIG_FACTORY_OAFIID "OAFIID:GNOME_Evolution_Shell_Config_Factory"
+
+
+#define E_SHELL_CONFIG_DEFAULT_FOLDERS_OAFIID "OAFIID:GNOME_Evolution_Shell_Config_DefaultFolders_Control"
+
+typedef struct {
+ GladeXML *glade;
+ EvolutionConfigControl *config_control;
+
+ char *mail_uri, *mail_path;
+ char *contacts_uri, *contacts_path;
+ char *calendar_uri, *calendar_path;
+ char *tasks_uri, *tasks_path;
+
+ Bonobo_ConfigDatabase db;
+ EvolutionShellClient *shell_client;
+} EvolutionDefaultFolderConfig;
+
+static void
+folder_selected (EvolutionFolderSelectorButton *button,
+ GNOME_Evolution_Folder *folder,
+ EvolutionDefaultFolderConfig *dfc)
+{
+ char **uri_ptr, **path_ptr;
+
+ uri_ptr = gtk_object_get_data (GTK_OBJECT (button), "uri_ptr");
+ path_ptr = gtk_object_get_data (GTK_OBJECT (button), "path_ptr");
+
+ g_free (*uri_ptr);
+ g_free (*path_ptr);
+ *uri_ptr = g_strdup (folder->physicalUri);
+ *path_ptr = g_strdup (folder->evolutionUri);
+
+ evolution_config_control_changed (dfc->config_control);
+}
+
+GtkWidget *e_shell_config_default_folder_selector_button_new (char *widget_name, char *string1, char *string2, int int1, int int2);
+
+GtkWidget *
+e_shell_config_default_folder_selector_button_new (char *widget_name,
+ char *string1,
+ char *string2,
+ int int1, int int2)
+{
+ return (GtkWidget *)gtk_type_new (EVOLUTION_TYPE_FOLDER_SELECTOR_BUTTON);
+}
+
+static void
+config_control_apply_cb (EvolutionConfigControl *control,
+ EvolutionDefaultFolderConfig *dfc)
+{
+ bonobo_config_set_string (dfc->db, "/DefaultFolders/mail_path", dfc->mail_path, NULL);
+ bonobo_config_set_string (dfc->db, "/DefaultFolders/mail_uri", dfc->mail_uri, NULL);
+ bonobo_config_set_string (dfc->db, "/DefaultFolders/contacts_path", dfc->contacts_path, NULL);
+ bonobo_config_set_string (dfc->db, "/DefaultFolders/contacts_uri", dfc->contacts_uri, NULL);
+ bonobo_config_set_string (dfc->db, "/DefaultFolders/calendar_path", dfc->calendar_path, NULL);
+ bonobo_config_set_string (dfc->db, "/DefaultFolders/calendar_uri", dfc->calendar_uri, NULL);
+ bonobo_config_set_string (dfc->db, "/DefaultFolders/tasks_path", dfc->tasks_path, NULL);
+ bonobo_config_set_string (dfc->db, "/DefaultFolders/tasks_uri", dfc->tasks_uri, NULL);
+}
+
+static void
+config_control_destroy_cb (EvolutionConfigControl *config_control,
+ EvolutionDefaultFolderConfig *dfc)
+{
+ g_free (dfc->mail_uri);
+ g_free (dfc->mail_path);
+ g_free (dfc->contacts_uri);
+ g_free (dfc->contacts_path);
+ g_free (dfc->calendar_uri);
+ g_free (dfc->calendar_path);
+ g_free (dfc->tasks_uri);
+ g_free (dfc->tasks_path);
+
+ gtk_object_unref (GTK_OBJECT (dfc->glade));
+ bonobo_object_unref (BONOBO_OBJECT (dfc->shell_client));
+ g_free (dfc);
+}
+
+static const char *mail_types[] = { "mail", NULL };
+static const char *contacts_types[] = { "contacts", "ldap-contacts", NULL };
+static const char *calendar_types[] = { "calendar", NULL };
+static const char *tasks_types[] = { "tasks", NULL };
+
+static void
+setup_folder_selector (EvolutionDefaultFolderConfig *dfc,
+ const char *widget_name,
+ char **path_ptr, char *path_dbpath,
+ char **uri_ptr, char *uri_dbpath,
+ const char **types)
+{
+ GtkWidget *button;
+
+ *path_ptr = bonobo_config_get_string (dfc->db, path_dbpath, NULL);
+ *uri_ptr = bonobo_config_get_string (dfc->db, uri_dbpath, NULL);
+
+ button = glade_xml_get_widget (dfc->glade, widget_name);
+ evolution_folder_selector_button_construct (
+ EVOLUTION_FOLDER_SELECTOR_BUTTON (button),
+ dfc->shell_client, _("Select Default Folder"),
+ *uri_ptr, types);
+ gtk_object_set_data (GTK_OBJECT (button), "uri_ptr", uri_ptr);
+ gtk_object_set_data (GTK_OBJECT (button), "path_ptr", path_ptr);
+ gtk_signal_connect (GTK_OBJECT (button), "selected",
+ GTK_SIGNAL_FUNC (folder_selected),
+ dfc);
+}
+
+static BonoboObject *
+default_folders_config_control_new (EShell *shell)
+{
+ GNOME_Evolution_Shell shell_dup;
+ CORBA_Environment ev;
+ EvolutionDefaultFolderConfig *dfc;
+ GtkWidget *widget;
+
+ dfc = g_new0 (EvolutionDefaultFolderConfig, 1);
+ dfc->db = e_shell_get_config_db (shell);
+
+ CORBA_exception_init (&ev);
+ shell_dup = CORBA_Object_duplicate (bonobo_object_corba_objref (BONOBO_OBJECT (shell)), &ev);
+ CORBA_exception_free (&ev);
+ dfc->shell_client = evolution_shell_client_new (shell_dup);
+
+ dfc->glade = glade_xml_new (EVOLUTION_GLADEDIR "/e-shell-config-default-folders.glade", NULL);
+
+ setup_folder_selector (dfc, "default_mail_button",
+ &dfc->mail_path, "/DefaultFolders/mail_path",
+ &dfc->mail_uri, "/DefaultFolders/mail_uri",
+ mail_types);
+ setup_folder_selector (dfc, "default_contacts_button",
+ &dfc->contacts_path, "/DefaultFolders/contacts_path",
+ &dfc->contacts_uri, "/DefaultFolders/contacts_uri",
+ contacts_types);
+ setup_folder_selector (dfc, "default_calendar_button",
+ &dfc->calendar_path, "/DefaultFolders/calendar_path",
+ &dfc->calendar_uri, "/DefaultFolders/calendar_uri",
+ calendar_types);
+ setup_folder_selector (dfc, "default_tasks_button",
+ &dfc->tasks_path, "/DefaultFolders/tasks_path",
+ &dfc->tasks_uri, "/DefaultFolders/tasks_uri",
+ tasks_types);
+
+ widget = glade_xml_get_widget (dfc->glade, "default_folders_vbox");
+ gtk_widget_ref (widget);
+ gtk_container_remove (GTK_CONTAINER (widget->parent), widget);
+ gtk_widget_show (widget);
+ dfc->config_control = evolution_config_control_new (widget);
+ gtk_widget_unref (widget);
+
+ gtk_signal_connect (GTK_OBJECT (dfc->config_control), "apply",
+ GTK_SIGNAL_FUNC (config_control_apply_cb), dfc);
+ gtk_signal_connect (GTK_OBJECT (dfc->config_control), "destroy",
+ GTK_SIGNAL_FUNC (config_control_destroy_cb), dfc);
+
+ return BONOBO_OBJECT (dfc->config_control);
+}
+
+
+static BonoboObject *
+config_control_factory_cb (BonoboGenericFactory *factory,
+ const char *component_id,
+ gpointer shell)
+{
+ if (!strcmp (component_id, E_SHELL_CONFIG_DEFAULT_FOLDERS_OAFIID))
+ return default_folders_config_control_new (shell);
+ else {
+ g_assert_not_reached ();
+ return NULL;
+ }
+}
+
+gboolean
+e_shell_config_factory_register (EShell *shell)
+{
+ BonoboGenericFactory *factory;
+
+ g_return_val_if_fail (E_IS_SHELL (shell), FALSE);
+
+ factory = bonobo_generic_factory_new_multi (
+ E_SHELL_CONFIG_FACTORY_OAFIID,
+ config_control_factory_cb,
+ shell);
+
+ if (factory == NULL) {
+ g_warning ("Cannot register factory %s", E_SHELL_CONFIG_FACTORY_OAFIID);
+ return FALSE;
+ }
+ return TRUE;
+}
+
diff --git a/shell/e-shell-config.h b/shell/e-shell-config.h
new file mode 100644
index 0000000000..e2f209c5c4
--- /dev/null
+++ b/shell/e-shell-config.h
@@ -0,0 +1,28 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* e-shell-config.h
+ *
+ * Copyright (C) 2002 Ximian, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef E_SHELL_CONFIG_H
+#define E_SHELL_CONFIG_H
+
+#include "e-shell.h"
+
+gboolean e_shell_config_factory_register (EShell *shell);
+
+#endif
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 0284318910..a129d7a8d9 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -432,7 +432,7 @@ handle_default_uri (EShell *shell, const char *uri, CORBA_Environment *ev)
if (extra_info)
*extra_info++ = '\0';
- dbpath = g_strdup_printf ("/DefaultFolder/%s_path", component);
+ dbpath = g_strdup_printf ("/DefaultFolders/%s_path", component);
new_uri = bonobo_config_get_string_with_default (shell->priv->db,
dbpath, NULL, &def);
g_free (dbpath);
@@ -1245,7 +1245,7 @@ e_shell_construct (EShell *shell,
CORBA_exception_free (&ev);
return E_SHELL_CONSTRUCT_RESULT_NOCONFIGDB;
}
- e_setup_check_db (priv->db);
+ e_setup_check_db (priv->db, local_directory);
CORBA_exception_free (&ev);
diff --git a/shell/evolution-folder-selector-button.c b/shell/evolution-folder-selector-button.c
index 2ca81da05f..35ddf19c7a 100644
--- a/shell/evolution-folder-selector-button.c
+++ b/shell/evolution-folder-selector-button.c
@@ -165,7 +165,7 @@ destroy (GtkObject *object)
folder_selector_button = EVOLUTION_FOLDER_SELECTOR_BUTTON (object);
priv = folder_selector_button->priv;
- gtk_object_unref (GTK_OBJECT (priv->shell_client));
+ bonobo_object_unref (BONOBO_OBJECT (priv->shell_client));
g_free (priv->title);
for (i = 0; priv->possible_types[i]; i++)
g_free (priv->possible_types[i]);
@@ -253,7 +253,7 @@ evolution_folder_selector_button_construct (EvolutionFolderSelectorButton *folde
priv = folder_selector_button->priv;
priv->shell_client = shell_client;
- gtk_object_ref (GTK_OBJECT (shell_client));
+ bonobo_object_ref (BONOBO_OBJECT (shell_client));
priv->corba_storage_registry = evolution_shell_client_get_storage_registry_interface (shell_client);
priv->title = g_strdup (title);
diff --git a/shell/evolution-shell-client.c b/shell/evolution-shell-client.c
index 45cd81b070..d33b5d24e9 100644
--- a/shell/evolution-shell-client.c
+++ b/shell/evolution-shell-client.c
@@ -366,7 +366,8 @@ evolution_shell_client_construct (EvolutionShellClient *shell_client,
* evolution_shell_client_new:
* @corba_shell: A pointer to the CORBA Evolution::Shell interface.
*
- * Create a new client object for @corba_shell.
+ * Create a new client object for @corba_shell. The shell client will
+ * free @corba_shell when it is destroyed.
*
* Return value: A pointer to the Evolution::Shell client BonoboObject.
**/
diff --git a/shell/glade/Makefile.am b/shell/glade/Makefile.am
index 4ef31d8057..a53765cda5 100644
--- a/shell/glade/Makefile.am
+++ b/shell/glade/Makefile.am
@@ -2,6 +2,7 @@ gladedir = $(datadir)/evolution/glade
glade_DATA = \
e-active-connection-dialog.glade \
+ e-shell-config-default-folders.glade \
e-shell-folder-creation-dialog.glade \
evolution-startup-wizard.glade
diff --git a/shell/glade/e-shell-config-default-folders.glade b/shell/glade/e-shell-config-default-folders.glade
new file mode 100644
index 0000000000..bb0b404039
--- /dev/null
+++ b/shell/glade/e-shell-config-default-folders.glade
@@ -0,0 +1,255 @@
+<?xml version="1.0"?>
+<GTK-Interface>
+
+<project>
+ <name>Config</name>
+ <program_name>config</program_name>
+ <directory></directory>
+ <source_directory>src</source_directory>
+ <pixmaps_directory>../../../gnome/evolution/art</pixmaps_directory>
+ <language>C</language>
+ <gnome_support>True</gnome_support>
+ <gettext_support>True</gettext_support>
+</project>
+
+<widget>
+ <class>GtkWindow</class>
+ <name>default folders</name>
+ <visible>False</visible>
+ <title>window1</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>default_folders_vbox</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkFrame</class>
+ <name>default_folder_frame</name>
+ <label>Default folders</label>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table1</name>
+ <border_width>4</border_width>
+ <rows>4</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>4</row_spacing>
+ <column_spacing>4</column_spacing>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label1</name>
+ <label>Mail:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label4</name>
+ <label>Tasks:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label3</name>
+ <label>Contacts:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label2</name>
+ <label>Calendar:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>Custom</class>
+ <name>default_mail_button</name>
+ <creation_function>e_shell_config_default_folder_selector_button_new</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Wed, 10 Apr 2002 17:54:56 GMT</last_modification_time>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>Custom</class>
+ <name>default_contacts_button</name>
+ <creation_function>e_shell_config_default_folder_selector_button_new</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Wed, 10 Apr 2002 17:55:01 GMT</last_modification_time>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>Custom</class>
+ <name>default_calendar_button</name>
+ <creation_function>e_shell_config_default_folder_selector_button_new</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Wed, 10 Apr 2002 17:55:06 GMT</last_modification_time>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>Custom</class>
+ <name>default_tasks_button</name>
+ <creation_function>e_shell_config_default_folder_selector_button_new</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Wed, 10 Apr 2002 17:55:12 GMT</last_modification_time>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+</widget>
+
+</GTK-Interface>
diff --git a/shell/main.c b/shell/main.c
index 31832ab5e4..efb0294b6f 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -54,6 +54,7 @@
#include "e-util/e-gtk-utils.h"
#include "e-shell-constants.h"
+#include "e-shell-config.h"
#include "e-setup.h"
#include "e-shell.h"
@@ -209,6 +210,8 @@ idle_cb (void *data)
switch (result) {
case E_SHELL_CONSTRUCT_RESULT_OK:
+ e_shell_config_factory_register (shell);
+
gtk_signal_connect (GTK_OBJECT (shell), "no_views_left",
GTK_SIGNAL_FUNC (no_views_left_cb), NULL);
gtk_signal_connect (GTK_OBJECT (shell), "destroy",