Implement saving of configuration information. Now when you run

Evolution it will display the same folder as the last time, and will
hide/show the shortcut/folder bars as the last time.

This uses GConf so I also put a GConf check into configure.in.

svn path=/trunk/; revision=3787
This commit is contained in:
Ettore Perazzoli
2000-06-29 07:37:55 +00:00
parent 31e562c685
commit 3bedc38a94
10 changed files with 316 additions and 12 deletions

View File

@ -157,11 +157,14 @@ static gint
idle_cb (gpointer data)
{
GtkWidget *view;
GConfClient *gconf_client;
char *evolution_directory;
evolution_directory = (char *) data;
shell = e_shell_new (evolution_directory);
gconf_client = gconf_client_new ();
shell = e_shell_new (evolution_directory, gconf_client);
g_free (evolution_directory);
if (shell == NULL) {
@ -175,19 +178,26 @@ idle_cb (gpointer data)
gtk_signal_connect (GTK_OBJECT (shell), "destroy",
GTK_SIGNAL_FUNC (destroy_cb), NULL);
view = e_shell_new_view (shell, STARTUP_URI);
gtk_signal_connect (GTK_OBJECT (view), "delete_event",
GTK_SIGNAL_FUNC (view_delete_event_cb), shell);
if (! e_shell_restore_from_settings (shell)) {
view = e_shell_new_view (shell, STARTUP_URI);
/* FIXME: Do this for all the shell views even when the shell
is restored. */
gtk_signal_connect (GTK_OBJECT (view), "delete_event",
GTK_SIGNAL_FUNC (view_delete_event_cb), shell);
}
if (!getenv ("EVOLVE_ME_HARDER"))
development_warning ();
gtk_object_unref (GTK_OBJECT (gconf_client));
return FALSE;
}
int
main (int argc, char **argv)
{
GConfError *err = NULL;
char *evolution_directory;
bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR);
@ -199,6 +209,12 @@ main (int argc, char **argv)
gnome_window_icon_set_default_from_file (EVOLUTION_IMAGES "/evolution-inbox.png");
if (! gconf_init (argc, argv, &err)) {
e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
_("Cannot initialize the configuration system."));
exit (1);
}
if (! bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL)) {
e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
_("Cannot initialize the Bonobo component system."));