- CORBA_Environment ev;
- CORBA_ORB orb;
- const char **view_files = NULL;
- gboolean loaded;
- int i;
-
- CORBA_exception_init (&ev);
-
-
-#if USING_OAF
- gnomelib_register_popt_table (oaf_popt_options, "OAF");
- gnome_init_with_popt_table("PDFViewer", "0.0.1",
- argc, argv,
- gpdf_popt_options, 0, &ctx);
- orb = oaf_init (argc, argv);
-#else
- gnome_CORBA_init_with_popt_table ("PDFViewer", "0.0.1",
- &argc, argv,
- gpdf_popt_options, 0, &ctx,
- GNORBA_INIT_SERVER_FUNC, &ev);
-
- orb = gnome_CORBA_ORB ();
-#endif
-
- CORBA_exception_free (&ev);
-
- if (bonobo_init (orb, NULL, NULL) == FALSE)
- g_error (_("Could not initialize Bonobo!\n"));
- bonobo_activate ();
-
- view_files = poptGetArgs (ctx);
-
- /* Load files */
- i = 0;
- loaded = FALSE;
- if (view_files) {
- for (i = 0; view_files[i]; i++)
- if (container_new (view_files[i])) {
- loaded = TRUE;
- while (gtk_events_pending ())
- gtk_main_iteration ();
- }
- }
- if ((i == 0) || !loaded)
- container_new (NULL);
-
- poptFreeContext (ctx);
-
- gtk_main ();
+ CORBA_Environment ev;
+ CORBA_ORB orb;
+ const char **view_files = NULL;
+ gboolean loaded;
+ int i;
+
+ bindtextdomain (PACKAGE, GNOMELOCALEDIR);
+ textdomain (PACKAGE);
+ setlocale (LC_ALL, "");
+
+ CORBA_exception_init (&ev);
+
+ gnomelib_register_popt_table (oaf_popt_options, "OAF");
+ gnome_init_with_popt_table("PDFViewer", "0.0.1",
+ argc, argv,
+ gpdf_popt_options, 0, &ctx);
+ orb = oaf_init (argc, argv);
+
+ CORBA_exception_free (&ev);
+
+ if (bonobo_init (orb, NULL, NULL) == FALSE)
+ g_error (_("Could not initialize Bonobo!\n"));
+ bonobo_activate ();
+
+ view_files = poptGetArgs (ctx);
+
+ /* Load files */
+ i = 0;
+ loaded = FALSE;
+ if (view_files) {
+ for (i = 0; view_files[i]; i++)
+ if (container_new (view_files[i])) {
+ loaded = TRUE;
+ while (gtk_events_pending ())
+ gtk_main_iteration ();
+ }
+ }
+ if ((i == 0) || !loaded)
+ container_new (NULL);
+
+ poptFreeContext (ctx);
+
+ gtk_main ();