[gnome-2048] Scores are now loaded in the Context constructor
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-2048] Scores are now loaded in the Context constructor
- Date: Sun, 20 Sep 2015 19:15:11 +0000 (UTC)
commit eeddf3f8560290e62392274d866385f70ec8bce5
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sun Sep 20 14:14:28 2015 -0500
Scores are now loaded in the Context constructor
So, the categories need to be ready before creating the Context.
src/application.vala | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/application.vala b/src/application.vala
index aad63b3..1799d27 100644
--- a/src/application.vala
+++ b/src/application.vala
@@ -334,12 +334,13 @@ public class Application : Gtk.Application
private void _create_scores ()
{
- // FIXME: The second parameter should be _("Grid Size:") but we're in string freeze.
- _scores_ctx = new Scores.Context ("gnome-2048", "", _window, category_request,
Scores.Style.PLAIN_DESCENDING);
// FIXME: The category names should be marked for translation and use the × character.
_grid4_cat = new Scores.Category ("grid4", "Grid 4 x 4");
_grid5_cat = new Scores.Category ("grid5", "Grid 5 x 5");
+ // FIXME: The second parameter should be _("Grid Size:") but we're in string freeze.
+ _scores_ctx = new Scores.Context ("gnome-2048", "", _window, category_request,
Scores.Style.PLAIN_DESCENDING);
+
if (!_scores_ctx.has_scores ())
((SimpleAction) lookup_action ("scores")).set_enabled (false);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]