GNOME Bugzilla – Bug 745840
evince-previewer’s previous/next page buttons should be insensitive on first/last page
Last modified: 2015-03-16 18:55:35 UTC
The print-previewer previous_page and next_page buttons are always sensitive. The first should be insensitive on the first page, and the second on the last.
Created attachment 299463 [details] [review] previewer: Enable/disable page navigation based on current page
Review of attachment 299463 [details] [review]: Ok, thanks! ::: previewer/ev-previewer-window.c @@ +341,3 @@ +{ + GtkAction *action; + gint n_pages = ev_document_get_n_pages (ev_document_model_get_document (window->model)); Either remove the extra spaces between GtkAction and the *, or line up the variable names. @@ +345,3 @@ + action = gtk_action_group_get_action (window->action_group, "GoPreviousPage"); + gtk_action_set_sensitive (GTK_ACTION (action), + new_page > 0 ); Keep this in a single line, previous one is already longer. @@ +349,3 @@ + action = gtk_action_group_get_action (window->action_group, "GoNextPage"); + gtk_action_set_sensitive (GTK_ACTION (action), + new_page < n_pages - 1); Ditto.
Comment on attachment 299463 [details] [review] previewer: Enable/disable page navigation based on current page Pushed this, since I'm about to make a release