]> www.fi.muni.cz Git - evince.git/blobdiff - shell/main.c
Check that the document supports find
[evince.git] / shell / main.c
index 3deac7a946f8e0fb25ec642491a473416360747d..5ed8f76d49946382d72cb5a7b76c177a138a4a81 100644 (file)
@@ -29,6 +29,8 @@
 #include <libgnomevfs/gnome-vfs-utils.h>
 
 #include "ev-stock-icons.h"
+#include "ev-debug.h"
+#include "ev-job-queue.h"
 
 static struct poptOption popt_options[] =
 {
@@ -48,21 +50,15 @@ load_files (const char **files)
        }
 
        for (i = 0; files[i]; i++) {
-               const char *uri;
-               char *freeme = NULL;
-               char *scheme;
-
-               if ((scheme = gnome_vfs_get_uri_scheme (files[i])))
-                       uri = files[i];
-               else
-                       uri = freeme = gnome_vfs_get_uri_from_local_path (files[i]);
-                       
+               char *uri;
+
+               uri = gnome_vfs_make_uri_from_shell_arg (files[i]);             
+
                window = GTK_WIDGET (ev_application_new_window (EV_APP));
                gtk_widget_show (window);
                ev_window_open (EV_WINDOW (window), uri);
 
-               g_free (scheme);
-               g_free (freeme);
+               g_free (uri);
         }
 }
 
@@ -84,12 +80,15 @@ main (int argc, char *argv[])
                                       LIBGNOMEUI_MODULE, argc, argv,
                                       GNOME_PARAM_POPT_TABLE, popt_options,
                                       GNOME_PARAM_HUMAN_READABLE_NAME, _("Evince"),
-                                     GNOME_PARAM_APP_DATADIR, DATADIR,
+                                     GNOME_PARAM_APP_DATADIR, GNOMEDATADIR,
                                       NULL);
 
+       ev_job_queue_init ();
        g_set_application_name (_("Evince Document Viewer"));
 
+       ev_debug_init ();
        ev_stock_icons_init ();
+       gtk_window_set_default_icon_name ("postscript-viewer");
 
        g_object_get_property (G_OBJECT (program),
                                GNOME_PARAM_POPT_CONTEXT,