After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 745840 - evince-previewer’s previous/next page buttons should be insensitive on first/last page
evince-previewer’s previous/next page buttons should be insensitive on first/...
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
3.15.x
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-08 13:49 UTC by Arnaud B.
Modified: 2015-03-16 18:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
previewer: Enable/disable page navigation based on current page (1.77 KB, patch)
2015-03-15 18:40 UTC, Robert Roth
committed Details | Review

Description Arnaud B. 2015-03-08 13:49:51 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.
Comment 1 Robert Roth 2015-03-15 18:40:07 UTC
Created attachment 299463 [details] [review]
previewer: Enable/disable page navigation based on current page
Comment 2 Carlos Garcia Campos 2015-03-16 17:15:08 UTC
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 3 Carlos Garcia Campos 2015-03-16 18:55:23 UTC
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