[gnome-tetravex] Multiple history files.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tetravex] Multiple history files.
- Date: Sat, 12 Oct 2019 04:55:12 +0000 (UTC)
commit c029e852139507c574d0207e707eb09944a1c1cf
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sat Oct 12 06:54:42 2019 +0200
Multiple history files.
You can regularly finish fast
if playing with less than ten
colors. Save score elsewhere.
src/gnome-tetravex.vala | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/gnome-tetravex.vala b/src/gnome-tetravex.vala
index d055173..b59a7a8 100644
--- a/src/gnome-tetravex.vala
+++ b/src/gnome-tetravex.vala
@@ -161,7 +161,12 @@ private class Tetravex : Gtk.Application
Builder builder = new Builder.from_resource ("/org/gnome/Tetravex/gnome-tetravex.ui");
- history = new History (Path.build_filename (Environment.get_user_data_dir (), "gnome-tetravex",
"history"));
+ string history_path;
+ if (colors == 10)
+ history_path = Path.build_filename (Environment.get_user_data_dir (), "gnome-tetravex",
"history");
+ else
+ history_path = Path.build_filename (Environment.get_user_data_dir (), "gnome-tetravex",
"history-" + colors.to_string ());
+ history = new History (history_path);
CssProvider css_provider = new CssProvider ();
css_provider.load_from_resource ("/org/gnome/Tetravex/tetravex.css");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]