[gnome-mahjongg/gnome-3-8] Sort scores by duration of the game
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-mahjongg/gnome-3-8] Sort scores by duration of the game
- Date: Sun, 3 Nov 2013 14:35:43 +0000 (UTC)
commit 8121d7beb39898005ce267c8b9dddfa247402faf
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sun Nov 3 08:33:30 2013 -0600
Sort scores by duration of the game
i.e. display the highest scores first. The date should be used as a
tiebreaker, not the primary factor.
https://bugzilla.gnome.org/show_bug.cgi?id=701844
src/gnome-mahjongg.vala | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/gnome-mahjongg.vala b/src/gnome-mahjongg.vala
index 4dec602..c04cc49 100644
--- a/src/gnome-mahjongg.vala
+++ b/src/gnome-mahjongg.vala
@@ -864,6 +864,8 @@ public class ScoreDialog : Gtk.Dialog
var d = strcmp (a.name, b.name);
if (d != 0)
return d;
+ if (a.duration != b.duration)
+ return (int) a.duration - (int) b.duration;
return a.date.compare (b.date);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]