After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 732504 - Hitori should store board size in gsettings
Hitori should store board size in gsettings
Status: RESOLVED FIXED
Product: hitori
Classification: Applications
Component: General
git master
Other Linux
: Normal enhancement
: ---
Assigned To: Michael Catanzaro
hitori-maint
Depends on:
Blocks:
 
 
Reported: 2014-06-30 16:23 UTC by Michael Catanzaro
Modified: 2014-07-07 12:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Store board size in gsettings (6.22 KB, patch)
2014-07-05 23:55 UTC, Michael Catanzaro
reviewed Details | Review
Store board size in gsettings (6.14 KB, patch)
2014-07-06 15:49 UTC, Michael Catanzaro
needs-work Details | Review
Store board size in gsettings (7.07 KB, patch)
2014-07-07 00:30 UTC, Michael Catanzaro
committed Details | Review

Description Michael Catanzaro 2014-06-30 16:23:13 UTC
When I open Hitori, the initial board size should be whatever it was when I last closed the game.
Comment 1 Michael Catanzaro 2014-07-05 23:55:46 UTC
Created attachment 279968 [details] [review]
Store board size in gsettings

Remember the user's preferred board size
Comment 2 Philip Withnall 2014-07-06 12:06:06 UTC
Review of attachment 279968 [details] [review]:

::: src/main.c
@@ +179,3 @@
+		size_str = g_settings_get_string (self->settings, "board-size");
+		self->board_size = g_ascii_strtoull (size_str, NULL, 10);
+		g_settings_delay (self->settings);

Why is this delayed?
Comment 3 Michael Catanzaro 2014-07-06 15:48:07 UTC
I guess there's no need for it here.  It's a habit to avoid extra writes when resizing a window where the window size is stored in gsettings. The advantage to not delaying the writes is that if hitori crashes, the changed board size won't be forgotten.
Comment 4 Michael Catanzaro 2014-07-06 15:49:23 UTC
Created attachment 279993 [details] [review]
Store board size in gsettings

Remember the user's preferred board size
Comment 5 Philip Withnall 2014-07-06 22:55:43 UTC
Review of attachment 279993 [details] [review]:

Please mention in the commit message that this bumps the required GLib version to 2.32.

::: Makefile.am
@@ +75,3 @@
 
+# GSettings
+gsettings_SCHEMAS = data/org.gnome.hitori.gschema.xml

Whoops, the patch seems to be missing this file. Sorry, I should have spotted this earlier.
Comment 6 Michael Catanzaro 2014-07-07 00:30:24 UTC
Created attachment 280016 [details] [review]
Store board size in gsettings

Remember the user's preferred board size

* Bump GLib dependency to 2.32, for g_settings_get_action()
* Bump intltool dependency to 0.50.2, for automatic gsettings support
Comment 7 Philip Withnall 2014-07-07 07:09:47 UTC
Review of attachment 280016 [details] [review]:

++
Comment 8 Michael Catanzaro 2014-07-07 12:55:30 UTC
Attachment 280016 [details] pushed as e82fe40 - Store board size in gsettings