[gnome-desktop] wall-clock: 12h time format is now always available
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop] wall-clock: 12h time format is now always available
- Date: Tue, 4 Apr 2017 15:58:52 +0000 (UTC)
commit 226fe725ef2cb26e7251d409703d03e51111952f
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Apr 3 09:30:12 2017 -0700
wall-clock: 12h time format is now always available
Following a change in GDateTime, AM/PM format is now always available
even if the support is missing in the locale used.
Remove the code used to detect AM/PM support in the locale, and bump the
GLib requirements to the version that includes this GDateTime change.
See https://bugzilla.gnome.org/show_bug.cgi?id=761889
https://bugzilla.gnome.org/show_bug.cgi?id=780877
configure.ac | 2 +-
libgnome-desktop/gnome-wall-clock.c | 10 +---------
2 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7e142e9..800d3a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -105,7 +105,7 @@ dnl it too, or it will never make it into the spec file!
GDK_PIXBUF_REQUIRED=2.36.5
GTK_REQUIRED=3.3.6
-GLIB_REQUIRED=2.44.0
+GLIB_REQUIRED=2.53.0
XRANDR_REQUIRED=1.3
GSETTINGS_DESKTOP_SCHEMAS_REQUIRED=3.5.91
XEXT_REQUIRED=1.1
diff --git a/libgnome-desktop/gnome-wall-clock.c b/libgnome-desktop/gnome-wall-clock.c
index e75965a..f5c9d0a 100644
--- a/libgnome-desktop/gnome-wall-clock.c
+++ b/libgnome-desktop/gnome-wall-clock.c
@@ -25,7 +25,6 @@
#include "config.h"
#include <glib/gi18n-lib.h>
-#include <langinfo.h>
#define GNOME_DESKTOP_USE_UNSTABLE_API
#include "gnome-wall-clock.h"
@@ -43,7 +42,6 @@ struct _GnomeWallClockPrivate {
GSettings *desktop_settings;
gboolean time_only;
- gboolean ampm_available;
};
enum {
@@ -70,7 +68,6 @@ static void
gnome_wall_clock_init (GnomeWallClock *self)
{
GFile *tz;
- const char *ampm;
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GNOME_TYPE_WALL_CLOCK, GnomeWallClockPrivate);
@@ -87,10 +84,6 @@ gnome_wall_clock_init (GnomeWallClock *self)
self->priv->desktop_settings = g_settings_new ("org.gnome.desktop.interface");
g_signal_connect (self->priv->desktop_settings, "changed", G_CALLBACK (on_schema_change), self);
- ampm = nl_langinfo (AM_STR);
- if (ampm != NULL && *ampm != '\0')
- self->priv->ampm_available = TRUE;
-
update_clock (self);
}
@@ -284,8 +277,7 @@ gnome_wall_clock_string_for_datetime (GnomeWallClock *self,
{
const char *format_string;
- if (clock_format == G_DESKTOP_CLOCK_FORMAT_24H ||
- self->priv->ampm_available == FALSE) {
+ if (clock_format == G_DESKTOP_CLOCK_FORMAT_24H) {
if (show_full_date) {
/* Translators: This is the time format with full date used
in 24-hour mode. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]