[gnome-initial-setup] timezone: AM/PM format should always be available
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] timezone: AM/PM format should always be available
- Date: Mon, 12 Jun 2017 16:36:49 +0000 (UTC)
commit 57b865206b37154b592b4360b427247f2708da6b
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Jun 7 11:55:07 2017 -0700
timezone: AM/PM format should always be available
This is equivalent to
https://git.gnome.org/browse/gnome-control-center/commit/panels/datetime?id=85cd910af5e021f4ad1e34b4ae539a38aa712a61
for gnome-initial-setup.
https://bugzilla.gnome.org/show_bug.cgi?id=783526
configure.ac | 2 +-
.../pages/timezone/gis-timezone-page.c | 11 +----------
2 files changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 3abb8b3..62e44d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@ AM_GLIB_GNU_GETTEXT
LIBNM_REQUIRED_VERSION=1.2
LIBNMA_REQUIRED_VERSION=1.0
-GLIB_REQUIRED_VERSION=2.46.0
+GLIB_REQUIRED_VERSION=2.53.0
GTK_REQUIRED_VERSION=3.11.3
PANGO_REQUIRED_VERSION=1.32.5
IBUS_REQUIRED_VERSION=1.4.99
diff --git a/gnome-initial-setup/pages/timezone/gis-timezone-page.c
b/gnome-initial-setup/pages/timezone/gis-timezone-page.c
index 9deb6ac..a090db2 100644
--- a/gnome-initial-setup/pages/timezone/gis-timezone-page.c
+++ b/gnome-initial-setup/pages/timezone/gis-timezone-page.c
@@ -31,7 +31,6 @@
#include <stdlib.h>
#include <string.h>
-#include <langinfo.h>
#define GNOME_DESKTOP_USE_UNSTABLE_API
#include <libgnome-desktop/gnome-languages.h>
@@ -70,7 +69,6 @@ struct _GisTimezonePagePrivate
GnomeWallClock *clock;
GDesktopClockFormat clock_format;
- gboolean ampm_available;
gboolean in_search;
};
typedef struct _GisTimezonePagePrivate GisTimezonePagePrivate;
@@ -257,7 +255,7 @@ update_timezone (GisTimezonePage *page, TzLocation *location)
GDateTime *date;
gboolean use_ampm;
- if (priv->clock_format == G_DESKTOP_CLOCK_FORMAT_12H && priv->ampm_available)
+ if (priv->clock_format == G_DESKTOP_CLOCK_FORMAT_12H)
use_ampm = TRUE;
else
use_ampm = FALSE;
@@ -367,7 +365,6 @@ gis_timezone_page_constructed (GObject *object)
GisTimezonePage *page = GIS_TIMEZONE_PAGE (object);
GisTimezonePagePrivate *priv = gis_timezone_page_get_instance_private (page);
GError *error;
- const char *ampm;
GSettings *settings;
G_OBJECT_CLASS (gis_timezone_page_parent_class)->constructed (object);
@@ -387,12 +384,6 @@ gis_timezone_page_constructed (GObject *object)
priv->clock = g_object_new (GNOME_TYPE_WALL_CLOCK, NULL);
g_signal_connect (priv->clock, "notify::clock", G_CALLBACK (on_clock_changed), page);
- ampm = nl_langinfo (AM_STR);
- if (ampm == NULL || ampm[0] == '\0')
- priv->ampm_available = FALSE;
- else
- priv->ampm_available = TRUE;
-
settings = g_settings_new (CLOCK_SCHEMA);
priv->clock_format = g_settings_get_enum (settings, CLOCK_FORMAT_KEY);
g_object_unref (settings);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]