diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2000-05-25 13:55:59 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2000-05-25 13:55:59 +0800 |
commit | bb241192eb773d7f0d178306dd55f9ca8e31c1f0 (patch) | |
tree | 4201777027364eeea243b2f625bb373bca30ef6d /shell/main.c | |
parent | e90eea58a2109961faa8632ac5e5783d9970366b (diff) | |
download | gsoc2013-evolution-bb241192eb773d7f0d178306dd55f9ca8e31c1f0.tar.gz gsoc2013-evolution-bb241192eb773d7f0d178306dd55f9ca8e31c1f0.tar.zst gsoc2013-evolution-bb241192eb773d7f0d178306dd55f9ca8e31c1f0.zip |
Reorganized the shell to allow dynamic registration of storages and
folder types, and changed all the components to work with the new
setup.
svn path=/trunk/; revision=3199
Diffstat (limited to 'shell/main.c')
-rw-r--r-- | shell/main.c | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/shell/main.c b/shell/main.c index e8885ecfc9..1499a186e5 100644 --- a/shell/main.c +++ b/shell/main.c @@ -33,6 +33,8 @@ #define STARTUP_URI "evolution:/local/Inbox" +static EShell *shell; + static void no_views_left_cb (EShell *shell, gpointer data) @@ -140,11 +142,26 @@ development_warning () } static gint -new_view_idle_cb (gpointer data) +idle_cb (gpointer data) { - EShell *shell; + char *evolution_directory; + + evolution_directory = (char *) data; + + shell = e_shell_new (evolution_directory); + g_free (evolution_directory); + + if (shell == NULL) { + e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, + _("Cannot initialize the Evolution shell.")); + exit (1); + } + + gtk_signal_connect (GTK_OBJECT (shell), "no_views_left", + GTK_SIGNAL_FUNC (no_views_left_cb), NULL); + gtk_signal_connect (GTK_OBJECT (shell), "destroy", + GTK_SIGNAL_FUNC (destroy_cb), NULL); - shell = E_SHELL (data); e_shell_new_view (shell, STARTUP_URI); if (!getenv ("EVOLVE_ME_HARDER")) @@ -157,7 +174,6 @@ new_view_idle_cb (gpointer data) int main (int argc, char **argv) { - EShell *shell; char *evolution_directory; init_corba (&argc, argv); @@ -179,19 +195,7 @@ main (int argc, char **argv) exit (1); } - shell = e_shell_new (evolution_directory); - if (shell == NULL) { - e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, - _("Cannot initialize the Evolution shell.")); - exit (1); - } - - gtk_signal_connect (GTK_OBJECT (shell), "no_views_left", - GTK_SIGNAL_FUNC (no_views_left_cb), NULL); - gtk_signal_connect (GTK_OBJECT (shell), "destroy", - GTK_SIGNAL_FUNC (destroy_cb), NULL); - - gtk_idle_add (new_view_idle_cb, shell); + gtk_idle_add (idle_cb, evolution_directory); bonobo_main (); |