X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=shell%2Fmain.c;h=827c6968ca1baac77ccc96afd6381d4664bf863c;hb=681b0a3166a61b96b9a0ee35ca1b0aaa487809b3;hp=321334b03d93a59de197dd2da2fc1651adfc21e9;hpb=ac9719503dfab5d4e190ab085b074da01e92b38b;p=evince.git diff --git a/shell/main.c b/shell/main.c index 321334b0..827c6968 100644 --- a/shell/main.c +++ b/shell/main.c @@ -32,9 +32,13 @@ #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 } }; @@ -58,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 @@ -87,6 +96,7 @@ main (int argc, char *argv[]) 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"); @@ -102,6 +112,7 @@ main (int argc, char *argv[]) gnome_accelerators_sync (); poptFreeContext (context); + ev_file_helpers_shutdown (); return 0; }