[cheese] Fix an empty last page in the effects selector



commit 3cb01fcb31ef43cd08c0154a37f4c4224cb70e4b
Author: David King <amigadave amigadave com>
Date:   Thu Dec 12 10:43:35 2013 +0000

    Fix an empty last page in the effects selector
    
    If there were exactly the same number of effects available as were shown
    in the effects selector, an empty last page was shown. Fix a condition
    to test that there are more spaces for effects in the selector than
    there are available effects. Fixes bug 720178.

 src/cheese-window.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/cheese-window.vala b/src/cheese-window.vala
index 5096a1a..313c33c 100644
--- a/src/cheese-window.vala
+++ b/src/cheese-window.vala
@@ -1015,7 +1015,8 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
 
     private bool is_next_effects_page ()
     {
-        return current_effects_page != effects_manager.effects.length () / EFFECTS_PER_PAGE;
+        // Calculate the number of effects visible up to the current page.
+        return (current_effects_page + 1) * EFFECTS_PER_PAGE < effects_manager.effects.length ();
     }
 
     private bool is_previous_effects_page ()


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