GNOME Bugzilla – Bug 733454
Clear Board button should be insensitive if it won't clear anything
Last modified: 2014-07-22 20:31:12 UTC
If the board is empty (e.g. at the start of the game, or after using Undo), then the Clear Board button should be insensitive.
Created attachment 281349 [details] [review] Disable Clear Board button when there's nothing to clear
Review of attachment 281349 [details] [review]: Looks good ::: lib/sudoku-board.vala @@ +65,3 @@ + /* the number of fixed squares on the board */ + private int _fixed; + public int fixed This should be a one-liner: public int fixed { get; private set; }
(In reply to comment #2) > ::: lib/sudoku-board.vala > @@ +65,3 @@ > + /* the number of fixed squares on the board */ > + private int _fixed; > + public int fixed > > This should be a one-liner: > > public int fixed { get; private set; } I followed the convention used for _rows, _cols and _filled variables in SudokuBoard (https://git.gnome.org/browse/gnome-sudoku/tree/lib/sudoku-board.vala#n19) Since you want to change this, may I suggest changing the rest too ?
Yeah, if you want to that'd be good (in a different patch, which you can commit without review).
Created attachment 281406 [details] [review] Disable Clear Board button when there's nothing to clear
Perfect Attachment 281406 [details] pushed as fca0a5d - Disable Clear Board button when there's nothing to clear