[evince] shell: Add GoToPage item to Go menu.
- From: Jose Aliste <jaliste src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] shell: Add GoToPage item to Go menu.
- Date: Mon, 27 Jun 2011 13:53:12 +0000 (UTC)
commit 732b16d878b25d9f638c737152a14d8b2b9420cf
Author: Josà Aliste <jaliste src gnome org>
Date: Sun Jun 26 20:03:44 2011 -0400
shell: Add GoToPage item to Go menu.
data/evince-ui.xml | 2 ++
shell/ev-window.c | 5 +++++
2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/data/evince-ui.xml b/data/evince-ui.xml
index b1e4984..de70257 100644
--- a/data/evince-ui.xml
+++ b/data/evince-ui.xml
@@ -58,6 +58,8 @@
<separator/>
<menuitem name="GoFirstPageMenu" action="GoFirstPage"/>
<menuitem name="GoLastPageMenu" action="GoLastPage"/>
+ <separator/>
+ <menuitem name="GoToPage" action="GoToPage"/>
</menu>
<menu name="BookmarksMenu" action="Bookmarks">
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 5aded70..30b9e94 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -533,11 +533,13 @@ ev_window_update_actions (EvWindow *ev_window)
ev_window_set_action_sensitive (ev_window, "GoNextPage", page < n_pages - 1);
ev_window_set_action_sensitive (ev_window, "GoFirstPage", page > 0);
ev_window_set_action_sensitive (ev_window, "GoLastPage", page < n_pages - 1);
+ ev_window_set_action_sensitive (ev_window, "GoToPage", TRUE);
} else {
ev_window_set_action_sensitive (ev_window, "GoFirstPage", FALSE);
ev_window_set_action_sensitive (ev_window, "GoPreviousPage", FALSE);
ev_window_set_action_sensitive (ev_window, "GoNextPage", FALSE);
ev_window_set_action_sensitive (ev_window, "GoLastPage", FALSE);
+ ev_window_set_action_sensitive (ev_window, "GoToPage", FALSE);
}
sizing_mode = ev_document_model_get_sizing_mode (ev_window->priv->model);
@@ -5784,6 +5786,9 @@ static const GtkActionEntry entries[] = {
{ "GoLastPage", GTK_STOCK_GOTO_BOTTOM, N_("_Last Page"), "<control>End",
N_("Go to the last page"),
G_CALLBACK (ev_window_cmd_go_last_page) },
+ { "GoToPage", GTK_STOCK_GOTO_TOP, N_("Go to Pa_ge"),"<control>L",
+ N_("Go to Page"),
+ G_CALLBACK (ev_window_cmd_focus_page_selector) },
/* Bookmarks menu */
{ "BookmarksAdd", GTK_STOCK_ADD, N_("_Add Bookmark"), "<control>D",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]