From c1209c281ed79b5dcc9c201f1968fba972c3641a Mon Sep 17 00:00:00 2001 From: Arturo Espinosa Date: Wed, 12 Jan 2000 04:25:38 +0000 Subject: More More svn path=/trunk/; revision=1561 --- shell/main.c | 52 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 9 deletions(-) (limited to 'shell/main.c') diff --git a/shell/main.c b/shell/main.c index 76375375dd..97a5987049 100644 --- a/shell/main.c +++ b/shell/main.c @@ -13,47 +13,81 @@ #include #include #include +#include "e-shell.h" +#include "e-shell-view.h" int shell_debugging = 0; poptContext ctx; +EShell *eshell; + const struct poptOption shell_popt_options [] = { { "debug", '\0', POPT_ARG_INT, &shell_debugging, 0, N_("Enables some debugging functions"), N_("LEVEL") }, { NULL, '\0', 0, NULL, 0 } }; -int -main (int argc, char *argv []) +static void +corba_init (int *argc, char *argv []) { CORBA_Environment ev; - bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR); - textdomain (PACKAGE); - CORBA_exception_init (&ev); gnome_CORBA_init_with_popt_table ( - "Evolution", VERSION, &argc, argv, + "Evolution", VERSION, argc, argv, shell_popt_options, 0, &ctx, GNORBA_INIT_SERVER_FUNC, &ev); CORBA_exception_free (&ev); if (bonobo_init (gnome_CORBA_ORB (), NULL, NULL) == FALSE){ e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("Failed to initialize the Bonobo component system")); - return 0; + exit (1); } +} +static void +gui_init (void) +{ e_cursors_init (); glade_gnome_init (); bonobo_activate (); +} - gtk_main (); - +static void +gui_shutdown (void) +{ /* shutdown */ e_cursors_shutdown (); +} + +static void +evolution_boot (void) +{ + EShellView *e_shell_view; + + eshell = e_shell_new (); + e_shell_view = E_SHELL_VIEW (e_shell_view_new (eshell)); + + gtk_widget_show (GTK_WIDGET (e_shell_view)); +} + +int +main (int argc, char *argv []) +{ + bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR); + textdomain (PACKAGE); + + corba_init (&argc, argv); + gui_init (); + + evolution_boot (); + + gtk_main (); + + gui_shutdown (); return 0; } -- cgit