X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=shell%2Fmain.c;h=321334b03d93a59de197dd2da2fc1651adfc21e9;hb=cd2d70e467e418c1a63e703f3e06df3cb2e92b87;hp=4b0c8427b342b30198142cd68241710023ccae5a;hpb=d56721e376e72279f86d8dff2c791fc3d3affe92;p=evince.git diff --git a/shell/main.c b/shell/main.c index 4b0c8427..321334b0 100644 --- a/shell/main.c +++ b/shell/main.c @@ -26,8 +26,13 @@ #include #include #include +#include #include +#include "ev-stock-icons.h" +#include "ev-debug.h" +#include "ev-job-queue.h" + static struct poptOption popt_options[] = { { NULL, 0, 0, NULL, 0, NULL, NULL } @@ -46,21 +51,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); } } @@ -82,11 +81,16 @@ 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, g_value_init (&context_as_value, G_TYPE_POINTER)); @@ -96,6 +100,7 @@ main (int argc, char *argv[]) gtk_main (); + gnome_accelerators_sync (); poptFreeContext (context); return 0;