[evince] Add --named-dest command line argument



commit a90e7647721cd4e62d312ee773b7dc60e629b7cf
Author: Ron Yorston <rmy pobox com>
Date:   Thu Jan 26 13:42:36 2012 +0000

    Add --named-dest command line argument

 shell/main.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/shell/main.c b/shell/main.c
index 5d1d3ed..0df53cc 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -52,6 +52,7 @@
 static gchar   *ev_page_label;
 static gchar   *ev_find_string;
 static gint     ev_page_index = 0;
+static gchar   *ev_named_dest;
 static gboolean preview_mode = FALSE;
 static gboolean fullscreen_mode = FALSE;
 static gboolean presentation_mode = FALSE;
@@ -76,6 +77,7 @@ static const GOptionEntry goption_options[] =
 {
 	{ "page-label", 'p', 0, G_OPTION_ARG_STRING, &ev_page_label, N_("The page label of the document to display."), N_("PAGE")},
 	{ "page-index", 'i', 0, G_OPTION_ARG_INT, &ev_page_index, N_("The page number of the document to display."), N_("NUMBER")},
+	{ "named-dest", 'n', 0, G_OPTION_ARG_STRING, &ev_named_dest, N_("Named destination to display."), N_("DEST")},
 	{ "fullscreen", 'f', 0, G_OPTION_ARG_NONE, &fullscreen_mode, N_("Run evince in fullscreen mode"), NULL },
 	{ "presentation", 's', 0, G_OPTION_ARG_NONE, &presentation_mode, N_("Run evince in presentation mode"), NULL },
 	{ "preview", 'w', 0, G_OPTION_ARG_NONE, &preview_mode, N_("Run evince as a previewer"), NULL },
@@ -183,6 +185,8 @@ load_files (const char **files)
 		global_dest = ev_link_dest_new_page_label (ev_page_label);
 	else if (ev_page_index)
 		global_dest = ev_link_dest_new_page (MAX (0, ev_page_index - 1));
+	else if (ev_named_dest)
+		global_dest = ev_link_dest_new_named (ev_named_dest);
 
 	if (fullscreen_mode)
 		mode = EV_WINDOW_MODE_FULLSCREEN;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]