1232 Commits

Author SHA1 Message Date
a94dbd27d0 GTK 3 cleanup: use GtkMessageDialog for message_box().
This is a lot easier than faffing about setting up a dialog box
ourself, and also avoids direct access to GtkDialog's action area
(deprecated in GTK 3.16).
2015-10-04 19:56:39 +01:00
2afbcdcc3c GTK 3.16 deprecation: stop using gtk_misc_set_alignment.
The new equivalent is gtk_label_set_{x,y}align. But we can't use that
in all GTK 3 builds, because it's very new.
2015-10-04 19:33:44 +01:00
5e22080bcd Improve Towers error highlighting.
Highlight clues of value n in Towers if its row/column contains an
increasing sequence of length n, the last number of which is not equal
to the number of rows/columns (i.e. such that the sequence will have
to be extended, in violation of the clue).
2015-10-03 18:17:25 +01:00
21b8323b2f Dominosa: Highlight a number when pressed on the keyboard. 2015-10-03 18:16:01 +01:00
a800ff16bb Fix switching to a larger puzzle size under GTK 2.
Commit 8b491946e had a bug: configure_area stopped doing most of its
work if the new size already matched fe->w and fe->h, but in fact the
GTK2 resize_fe() _already_ set up fe->w and fe->h for the new size. I
managed not to notice, because I checked it all worked on GTK 3 but
only tested resizing to a _smaller_ puzzle on GTK 2. Ahem.

Now we don't change fe->w and fe->h at all until configure_area is
called. Also, we initialise them to dummy values at setup time, so
that configure_area won't compare the new size with uninitialised
data.
2015-10-03 18:01:18 +01:00
e22a9c8396 build fix 2015-10-03 17:39:22 +01:00
581becc3aa Insert a manual reference in the default status bar text.
To guide developers to the resources they need.

[actual wording tweaked by SGT]
2015-10-03 17:12:20 +01:00
b94be41445 Render Filling presets as 'WxH', not 'HxW'. 2015-10-03 17:12:20 +01:00
47bc27b0c2 Add 'Inshi No Heya' (multiplication only) variant to Keen. 2015-10-03 17:12:20 +01:00
6482ed0e3c Fix a display glitch in Keen's pencil-mode cursor.
Draw pencil-mode cursor before corners of thick lines in order to make
the thick lines appear on top of the north-west corner of the pencil
cursor, just like they do with the non-pencil cursor.
2015-10-03 17:12:20 +01:00
b9dfef7a12 Recompute solutions in Inertia if the user strays from the path. 2015-10-03 17:12:20 +01:00
bda4a963f4 Fix an instance generation hang in Signpost.
Also expand the set of permissible parameters (add 1xN, Nx1 and 2x2).
2015-10-03 17:12:20 +01:00
d442b830e4 Greatly improve and speed up the Filling instance generation. 2015-10-03 17:12:20 +01:00
a55607ff24 Greatly increase the speed of the Filling solver. 2015-10-03 17:12:20 +01:00
79fe68dc57 Towers: allow marking of clues as done with the keyboard 2015-10-03 17:12:20 +01:00
6179e8df56 Allow marking of clues as exhausted in Unequal. 2015-10-03 17:12:20 +01:00
a79fc46951 Display improvements to Range.
Make the grid look a lot less heavy; enhance highlighting of error
clues; highlight enclosed small regions much more prettily.
2015-10-03 17:12:01 +01:00
8889fafb07 Fix a misrendering in Guess.
When the cursor was visible, redrawing after undo-redo or label
toggling or resizing would draw background over the top of the
circular cursor.
2015-10-03 17:08:21 +01:00
5cb91f28ba Fix a memory error in Guess cursor handling. 2015-10-03 16:59:10 +01:00
ea8da331e3 Cancel dragging in Pearl by pressing Escape or Backspace. 2015-10-03 16:59:10 +01:00
bf8ff09a84 Change Pearl's cursor logic.
Keyboard dragging while holding Control now moves the cursor to the
target square. Shift-Control-arrowkey performs the previous behavior
of Control-arrowkey.
2015-10-03 16:59:04 +01:00
d64a79e2b8 Refactor Pearl's mark_in_direction, and invert a parameter. 2015-10-03 16:59:04 +01:00
8e35087e09 Refactor modifier handling in Pearl's cursor code. 2015-10-03 16:59:04 +01:00
11a394f69b Add more keyboard controls to Slant. 2015-10-03 16:59:04 +01:00
ebf31f52b0 Slant: hide keyboard cursor when using the mouse. 2015-10-03 16:59:04 +01:00
e59f820383 Rectangles: cancel keyboard drag with Escape. 2015-10-03 16:59:04 +01:00
c469bd285c Filling: enable keyboard-driven cursor dragging mode. 2015-10-03 16:59:04 +01:00
d5f7c4f871 Range: add pencil marks to squares by Shift-cursor keys. 2015-10-03 16:58:50 +01:00
7478275c8b Pattern: color multiple squares with Ctrl- or Shift-cursor keys. 2015-10-03 16:58:24 +01:00
9e1a7d87cd Add game_text_format to Tents.
Replaces an inactive stub implementation.
2015-10-03 16:58:18 +01:00
051ab1701e Add game_text_format to Pattern. 2015-10-03 16:58:18 +01:00
d0f88aafa4 Add game_text_format to Inertia. 2015-10-03 16:58:18 +01:00
e4d5b11bd8 Add game_text_format to Flip. 2015-10-03 16:58:18 +01:00
7543082f26 Add game_text_format to Pearl. 2015-10-03 16:58:18 +01:00
02434a6ed1 Add game_text_format to Dominosa. 2015-10-03 16:58:18 +01:00
dc688b1f23 Unequal: stop ignoring keys 'h' and 'm' while cursor active.
At least, so long as 'h' and 'm' are not "numbers".
2015-10-03 16:58:11 +01:00
87b2758b9c Fix a memory leak in Range's find_errors.
Only occurred in invalid instances, such as 3x1:1b when you put a
black in the middle square.
2015-10-03 16:58:05 +01:00
9b1b7e0f3a Don't overallocate colour memory in Loopy. 2015-10-03 16:58:05 +01:00
1380b55b5b Fix segfault in Range's game_text_format.
Occurred on Nx1 puzzles, etc.
2015-10-03 16:58:00 +01:00
c4198948a8 Fix typo in undo key handling.
Now we can undo with both 'u' and 'U', symmetrically with redoing with
both 'r' and 'R'.
2015-10-03 16:57:49 +01:00
6c71b459a6 Include an example of Range's text_format in the comments. 2015-10-03 16:57:49 +01:00
4fb9776d83 Fix a typo in the comments of Pearl.
Each stone can have 2 lines radiating from its centre, not 3.
2015-10-03 16:57:44 +01:00
c0308c9319 Add '-set colorspace RGB' to some icon convert commands.
Its absence was breaking the icon build on Ubuntu 14.04, because you
ask convert to map an image into a specific 16-colour palette, and it
does so and _then_ nonconsensually maps those colours in turn through
a colourspace transformation you didn't ask for, causing icon.pl to
fail an assertion when it finds an RGB value not in the palette.
2015-10-03 16:07:20 +01:00
9df80d7587 GTK 3 port: arrange configure.ac support for GTK 2/3 detection.
GTK 3 is the default, falling back to GTK 2 if 3 isn't available; you
can also say --with-gtk=2 to force GTK 2.
2015-10-03 16:07:20 +01:00
41cc7c868f GTK 3 port: don't turn off drawing area double buffering.
I think I did this in GTK2 on the basis that our server-side cache
pixmap was double-buffering enough for us - any puzzle which erased a
big area with a background rectangle and then redrew over the top of
it would do so only on the off-screen pixmap, and the updates would
only be copied to the visible window after it was all done.

In GTK3, I don't think there's any need - this is all the usual way
things are done anyway, as far as I can see. So I've turned this call
back off, at least until I hear of a reason why I need it again.
2015-10-03 16:07:20 +01:00
1b2e4d525f GTK 3 port: change API functions for widget sizing.
set_usize is deprecated, and get_preferred_size is the GTK 3 thing we
should use in place of size_request.
2015-10-03 16:07:20 +01:00
90b73ebcb7 GTK 3 port: use GtkBox directly, not GtkHBox and GtkVBox.
I've done this by #defining the old names in terms of the new ones,
because the old ones are still more concise!
2015-10-03 16:07:19 +01:00
2fb189cc36 GTK 3 port: be prepared not to use GtkStock.
GTK 3 has deprecated it in favour of just making you specify fixed
strings as button labels, which seems like a step backwards to me but
there we go.
2015-10-03 16:07:19 +01:00
88b38f5168 GTK 3 port: use GdkRGBA for the window background colour.
Suits our internal API better, anyway, with RGB components being
floats ranging from 0 to 1.
2015-10-03 16:07:19 +01:00
d6210656b8 GTK 3 port: stop getting default bg colour from the window style.
GTK3 window styles don't reliably provide one, so we have to fall back
to just making one up.
2015-10-03 16:07:19 +01:00