diff options
author | fiaxh <git@mx.ax.lt> | 2017-04-12 22:42:23 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-04-13 14:13:57 +0200 |
commit | e3b69538bacd14283374f5e7619db610cafd81d6 (patch) | |
tree | ac3e1d04ee05355bdb995e1ffea55c5720e1dffb /main/src/ui/util.vala | |
parent | a37b5ac823cc5daefac6ab33a16d6f44c747ba9c (diff) | |
download | dino-e3b69538bacd14283374f5e7619db610cafd81d6.tar.gz dino-e3b69538bacd14283374f5e7619db610cafd81d6.zip |
gettext improvements (more strings, times, plural, de lang)
Diffstat (limited to 'main/src/ui/util.vala')
-rw-r--r-- | main/src/ui/util.vala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/src/ui/util.vala b/main/src/ui/util.vala index 4df785c0..696ce2d1 100644 --- a/main/src/ui/util.vala +++ b/main/src/ui/util.vala @@ -112,6 +112,13 @@ public class Util : Object { Gdk.RGBA bg = widget.get_style_context().get_background_color(StateFlags.NORMAL); return (bg.red < 0.5 && bg.green < 0.5 && bg.blue < 0.5); } + + public static bool is_24h_format() { + GLib.Settings settings = new GLib.Settings("org.gnome.desktop.interface"); + string settings_format = settings.get_string("clock-format"); + string p_format = (new DateTime.now_local()).format("%p"); + return settings_format == "24h" || p_format == " "; + } } }
\ No newline at end of file |