[gnome-clocks] Use unicode RATIO and THIN SPACE in time strings
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks] Use unicode RATIO and THIN SPACE in time strings
- Date: Sat, 2 Mar 2013 14:15:57 +0000 (UTC)
commit d72e612ef6bf75a3e3cc286a731ef1f9abb34830
Author: Paolo Borelli <pborelli gnome org>
Date: Sat Mar 2 15:06:23 2013 +0100
Use unicode RATIO and THIN SPACE in time strings
src/alarm.ui | 2 +-
src/stopwatch.vala | 15 +++++++++------
src/timer.ui | 4 ++--
src/timer.vala | 3 ++-
src/utils.vala | 3 ++-
5 files changed, 16 insertions(+), 11 deletions(-)
---
diff --git a/src/alarm.ui b/src/alarm.ui
index 32bebed..c299d36 100644
--- a/src/alarm.ui
+++ b/src/alarm.ui
@@ -211,7 +211,7 @@
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">:</property>
+ <property name="label">∶</property>
</object>
<packing>
<property name="left_attach">2</property>
diff --git a/src/stopwatch.vala b/src/stopwatch.vala
index e74c694..4fe5c0d 100644
--- a/src/stopwatch.vala
+++ b/src/stopwatch.vala
@@ -166,18 +166,20 @@ public class MainPanel : Gtk.Box, Clocks.Clock {
var n_label = "<span color='dimgray'> %d </span>".printf (current_lap);
+ // Note that the format uses unicode RATIO character
+
string split_label;
if (split_h > 0) {
- split_label = "%i:%02i:%05.2f".printf (split_h, split_m, split_s);
+ split_label = "%i∶%02i∶%05.2f".printf (split_h, split_m, split_s);
} else {
- split_label = "%02i:%05.2f".printf (split_m, split_s);
+ split_label = "%02i∶%05.2f".printf (split_m, split_s);
}
string tot_label;
if (h > 0) {
- tot_label = "%i:%02i:%05.2f".printf (h, m, s);
+ tot_label = "%i∶%02i∶%05.2f".printf (h, m, s);
} else {
- tot_label = "%02i:%05.2f".printf (m, s);
+ tot_label = "%02i∶%05.2f".printf (m, s);
}
Gtk.TreeIter i;
@@ -211,10 +213,11 @@ public class MainPanel : Gtk.Box, Clocks.Clock {
Utils.time_to_hms (timer.elapsed (), out h, out m, out s);
}
+ // Note that the format uses unicode RATIO character
if (h > 0) {
- time_label.set_text ("%i:%02i:%04.1f".printf (h, m, s));
+ time_label.set_text ("%i∶%02i∶%04.1f".printf (h, m, s));
} else {
- time_label.set_text ("%02i:%04.1f".printf (m, s));
+ time_label.set_text ("%02i∶%04.1f".printf (m, s));
}
return true;
diff --git a/src/timer.ui b/src/timer.ui
index ae26f83..59476bd 100644
--- a/src/timer.ui
+++ b/src/timer.ui
@@ -104,7 +104,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="label" translatable="yes">:</property>
+ <property name="label">∶</property>
<attributes>
<attribute name="font-desc" value="64"/>
</attributes>
@@ -121,7 +121,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="label" translatable="yes">:</property>
+ <property name="label">∶</property>
<attributes>
<attribute name="font-desc" value="64"/>
</attributes>
diff --git a/src/timer.vala b/src/timer.vala
index af451c3..5ba3c8f 100644
--- a/src/timer.vala
+++ b/src/timer.vala
@@ -216,7 +216,8 @@ public class MainPanel : Gd.Stack, Clocks.Clock {
}
private void update_countdown_label (int h, int m, int s) {
- time_label.set_text ("%02i:%02i:%02i".printf (h, m, s));
+ // Note that the format uses unicode RATIO character
+ time_label.set_text ("%02i∶%02i∶%02i".printf (h, m, s));
}
}
diff --git a/src/utils.vala b/src/utils.vala
index a55e730..61a2786 100644
--- a/src/utils.vala
+++ b/src/utils.vala
@@ -124,7 +124,8 @@ public class WallClock : Object {
}
public string format_time (GLib.DateTime date_time) {
- return date_time.format (format == Format.TWELVE ? "%I:%M %p" : "%H:%M");
+ // Note that the format uses unicode RATIO and THIN SPACE characters
+ return date_time.format (format == Format.TWELVE ? "%I∶%M %p" : "%H∶%M");
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]