[hitori] Remove status bar
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hitori] Remove status bar
- Date: Thu, 19 Jun 2014 14:35:44 +0000 (UTC)
commit daf4243cbe8eafedfe58f422491077a8b9dea4b8
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Thu Jun 5 22:46:05 2014 -0500
Remove status bar
Center the timer beneath the grid, and use a clock icon instead of a
text label.
I tried placing the timer in the header bar instead, but that did not
look as good as expected.
https://bugzilla.gnome.org/show_bug.cgi?id=731312
data/hitori.ui | 24 ++++++++++++++++++++----
src/main.c | 7 ++++---
2 files changed, 24 insertions(+), 7 deletions(-)
---
diff --git a/data/hitori.ui b/data/hitori.ui
index bf49278..ddb0da2 100644
--- a/data/hitori.ui
+++ b/data/hitori.ui
@@ -146,7 +146,9 @@
</object>
</child>
</object>
-
+ <packing>
+ <property name="pack_type">end</property>
+ </packing>
</child>
</object>
</child>
@@ -163,13 +165,27 @@
</object>
</child>
<child>
- <object class="GtkStatusbar" id="hitori_statusbar">
+ <object class="GtkBox">
+ <property name="orientation">horizontal</property>
+ <property name="halign">center</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkImage" id="timer_image">
+ <property
name="icon_name">preferences-system-time-symbolic</property>
+ <property name="icon_size">1</property>
+ <property name="valign">center</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
<child>
- <object class="GtkLabel" id="hitori_timer"/>
+ <object class="GtkLabel" id="hitori_timer">
+ <property name="valign">center</property>
+ <property name="visible">True</property>
+ </object>
</child>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="padding">6</property>
</packing>
</child>
</object>
diff --git a/src/main.c b/src/main.c
index 98e573b..b59835a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -372,9 +372,10 @@ hitori_disable_events (Hitori *hitori)
static void
set_timer_label (Hitori *hitori)
{
- /* Translators: this is the format for the timer label. The first parameter is the number of minutes
which have elapsed since the start of the
- * game; the second parameter is the number of seconds. */
- gchar *text = g_strdup_printf (_("Time: %02u:%02u"), hitori->timer_value / 60, hitori->timer_value %
60);
+ /* Translators: this is the format for the timer label. The first parameter is the number of minutes
which have
+ * elapsed since the start of the game; the second parameter is the number of seconds. In between is
the ratio
+ * character and a LTR mark to force minutes on the left in RTL locales. You can probably leave this
unchanged. */
+ gchar *text = g_strdup_printf (_("%02u\xE2\x88\xB6\xE2\x80\x8E%02u"), hitori->timer_value / 60,
hitori->timer_value % 60);
gtk_label_set_text (hitori->timer_label, text);
g_free (text);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]