[quadrapassel] Fix issue with pre filled Lines



commit daa8d860dc480e7faa6572c3284f9865885a9632
Author: Mario Wenzel <maweki gmail com>
Date:   Sun Sep 15 16:09:40 2013 +0200

    Fix issue with pre filled Lines
    
    https://bugzilla.gnome.org/show_bug.cgi?id=708073
    https://bugzilla.gnome.org/show_bug.cgi?id=708074
    The pre-filled rows settings could only be used until a game had started.
    And it could be set too high. Fixed by giving a magic upper limit not
    depending on a started game.

 src/quadrapassel.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/quadrapassel.vala b/src/quadrapassel.vala
index 222bb92..3b096ec 100644
--- a/src/quadrapassel.vala
+++ b/src/quadrapassel.vala
@@ -322,7 +322,8 @@ public class Quadrapassel : Gtk.Application
         label.set_hexpand (true);
         grid.attach (label, 0, 0, 1, 1);
 
-        var adj = new Gtk.Adjustment (settings.get_int ("line-fill-height"), 0, game.height - 1, 1, 5, 0);
+        var adj = new Gtk.Adjustment (settings.get_int ("line-fill-height"), 0, 15, 1, 5, 0);
+        // the maximum should be at least 4 less than the new game height but as long as the game height is 
a magic 20 and not a setting, we can keep it at 15
         fill_height_spinner = new Gtk.SpinButton (adj, 10, 0);
         fill_height_spinner.set_update_policy (Gtk.SpinButtonUpdatePolicy.ALWAYS);
         fill_height_spinner.set_snap_to_ticks (true);


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