[cheese/gnome-3-10] Fix an empty last page in the effects selector



commit 11a5493457570dd59a9478b01c21ad36b5a8abba
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 a386d9c..9e0168a 100644
--- a/src/cheese-window.vala
+++ b/src/cheese-window.vala
@@ -1024,7 +1024,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]