Fixed an off-by-one error that enabled the "next" button on the last page.
authorSimone Rota <sip@varlock.com>
Fri, 11 May 2007 17:21:31 +0000 (19:21 +0200)
committerTilman Sauerbeck <tilman@code-monkey.de>
Fri, 11 May 2007 17:21:31 +0000 (19:21 +0200)
src/rakt-window.c

index 9f45644..13b35d8 100644 (file)
@@ -141,7 +141,7 @@ render_page (RaktWindow *window)
 
        n_pages = poppler_document_get_n_pages (priv->document);
        gtk_action_set_sensitive (priv->action_prev, priv->page_no > 0);
-       gtk_action_set_sensitive (priv->action_next, priv->page_no < n_pages);
+       gtk_action_set_sensitive (priv->action_next, priv->page_no < n_pages - 1);
 
        page = poppler_document_get_page (priv->document, priv->page_no);