[gnome-2048] Fix build after libgames-support API change
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-2048] Fix build after libgames-support API change
- Date: Sat, 19 Sep 2015 23:41:00 +0000 (UTC)
commit 2199aeb5a9e3f57d16f602f3863bc993206652ad
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Sep 19 18:38:51 2015 -0500
Fix build after libgames-support API change
src/application.vala | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/application.vala b/src/application.vala
index 016e006..2cbb12b 100644
--- a/src/application.vala
+++ b/src/application.vala
@@ -320,21 +320,21 @@ public class Application : Gtk.Application
_congrats_message = builder.get_object ("messagelabel") as Gtk.Label;
}
+ private Games.Scores.Category category_request (string key)
+ {
+ if (key == "grid4")
+ return _grid4_cat;
+ else if (key == "grid5")
+ return _grid5_cat;
+ assert_not_reached ();
+ }
+
private void _create_scores ()
{
- _scores_ctx = new Scores.Context ("gnome-2048", "", _window, Scores.Style.PLAIN_DESCENDING);
+ _scores_ctx = new Scores.Context ("gnome-2048", "", _window, category_request,
Scores.Style.PLAIN_DESCENDING);
_grid4_cat = new Scores.Category ("grid4", "Grid 4 x 4");
_grid5_cat = new Scores.Category ("grid5", "Grid 5 x 5");
- _scores_ctx.category_request.connect ( (s, key) => {
- if (key == "grid4")
- return _grid4_cat;
- else if (key == "grid5")
- return _grid5_cat;
- else
- return null;
- });
-
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]