X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=sidebyside;f=shell%2Fmain.c;h=827c6968ca1baac77ccc96afd6381d4664bf863c;hb=2c8f2e225edad376a726a8efe86923c20c6c2c01;hp=fcda1f1e05addde63cd00e504579c1073350acd3;hpb=a88a1cde73b054120966e67bc0ad361457c5b4d2;p=evince.git diff --git a/shell/main.c b/shell/main.c index fcda1f1e..827c6968 100644 --- a/shell/main.c +++ b/shell/main.c @@ -26,12 +26,19 @@ #include #include #include +#include #include #include "ev-stock-icons.h" +#include "ev-debug.h" +#include "ev-job-queue.h" +#include "ev-file-helpers.h" + +static char *page_label; static struct poptOption popt_options[] = { + { "page-label", 'p', POPT_ARG_STRING, &page_label, 0, N_("The page of the document to display."), N_("PAGE")}, { NULL, 0, 0, NULL, 0, NULL, NULL } }; @@ -55,9 +62,14 @@ load_files (const char **files) window = GTK_WIDGET (ev_application_new_window (EV_APP)); gtk_widget_show (window); ev_window_open (EV_WINDOW (window), uri); + + if (page_label != NULL) + ev_window_open_page_label (EV_WINDOW (window), page_label); g_free (uri); } + + g_free (page_label); } int @@ -78,12 +90,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_file_helpers_init (); + 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, @@ -94,7 +110,9 @@ main (int argc, char *argv[]) gtk_main (); + gnome_accelerators_sync (); poptFreeContext (context); + ev_file_helpers_shutdown (); return 0; }