]> www.fi.muni.cz Git - evince.git/blobdiff - shell/main.c
Some leaks fixed
[evince.git] / shell / main.c
index b0a0b76a3afc5796b3ae6261fedeba931fecb1a6..b0cc803df9dfbe86dbbea139f5abe85159f5b02d 100644 (file)
 #include "ev-job-queue.h"
 #include "ev-file-helpers.h"
 
 #include "ev-job-queue.h"
 #include "ev-file-helpers.h"
 
+static char *page_label;
+
 static struct poptOption popt_options[] =
 {
 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 }
 };
 
        { NULL, 0, 0, NULL, 0, NULL, NULL }
 };
 
@@ -58,10 +61,15 @@ load_files (const char **files)
 
                window = GTK_WIDGET (ev_application_new_window (EV_APP));
                gtk_widget_show (window);
 
                window = GTK_WIDGET (ev_application_new_window (EV_APP));
                gtk_widget_show (window);
-               ev_window_open (EV_WINDOW (window), uri);
+               ev_window_open_uri (EV_WINDOW (window), uri);
+               
+               if (page_label != NULL)
+                       ev_window_open_page_label (EV_WINDOW (window), page_label);
 
                g_free (uri);
         }
 
                g_free (uri);
         }
+
+       g_free (page_label);
 }
 
 int
 }
 
 int