[gnome-sudoku/vala-port] Updated HeaderBar to show puzzle difficulty as subtitle
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sudoku/vala-port] Updated HeaderBar to show puzzle difficulty as subtitle
- Date: Mon, 19 May 2014 15:07:20 +0000 (UTC)
commit 53a981ed2e42c0c169ecd17634a5a9915f57a0ca
Author: Parin Porecha <parinporecha gmail com>
Date: Mon May 19 11:26:17 2014 +0530
Updated HeaderBar to show puzzle difficulty as subtitle
Also made the difficulty strings translatable
https://bugzilla.gnome.org/show_bug.cgi?id=710624
src/gnome-sudoku.vala | 2 +-
src/sudoku-solver.vala | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/gnome-sudoku.vala b/src/gnome-sudoku.vala
index b76763b..3e42b20 100644
--- a/src/gnome-sudoku.vala
+++ b/src/gnome-sudoku.vala
@@ -133,7 +133,7 @@ public class Sudoku : Gtk.Application
var rater = new SudokuRater(ref completed_board);
var rating = rater.get_difficulty ();
rating.pretty_print ();
- header_bar.title = "Sudoku - %s".printf (rating.get_catagory ().to_string ());
+ header_bar.set_subtitle ("%s".printf (rating.get_catagory ().to_string ()));
var show_possibilities = false;
var show_warnings = false;
diff --git a/src/sudoku-solver.vala b/src/sudoku-solver.vala
index c7c4ce7..b110923 100644
--- a/src/sudoku-solver.vala
+++ b/src/sudoku-solver.vala
@@ -764,15 +764,15 @@ public enum DifficultyCatagory {
switch (this)
{
case EASY:
- return "Easy";
+ return _("Easy");
case MEDIUM:
- return "Medium";
+ return _("Medium");
case HARD:
- return "Hard";
+ return _("Hard");
case VERY_HARD:
- return "Very hard";
+ return _("Very Hard");
default:
- return "Undefined";
+ return _("Undefined");
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]