[gnome-control-center/wip/datetime-panel: 11/15] datetime: replace underscores with spaces for location display name
- From: Thomas Wood <thos src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/datetime-panel: 11/15] datetime: replace underscores with spaces for location display name
- Date: Mon, 28 Jun 2010 17:10:01 +0000 (UTC)
commit 402d7dce0391a5895f12750fe6c37fd5940f2d01
Author: Thomas Wood <thomas wood intel com>
Date: Mon Jun 28 11:15:18 2010 +0100
datetime: replace underscores with spaces for location display name
panels/datetime/cc-datetime-panel.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/panels/datetime/cc-datetime-panel.c b/panels/datetime/cc-datetime-panel.c
index fc8598c..51b17f3 100644
--- a/panels/datetime/cc-datetime-panel.c
+++ b/panels/datetime/cc-datetime-panel.c
@@ -184,10 +184,23 @@ location_changed_cb (CcTimezoneMap *map,
CcDateTimePanel *self)
{
GtkWidget *label;
+ gchar *s, *p;
label = (GtkWidget *) gtk_builder_get_object (self->priv->builder,
"label_current_location");
- gtk_label_set_text (GTK_LABEL (label), location->zone);
+
+ /* replace underscores with spaces */
+ p = s = g_strdup (location->zone);
+ while (*p)
+ {
+ if (*p == '_')
+ *p = ' ';
+ p++;
+ }
+
+ gtk_label_set_text (GTK_LABEL (label), s);
+
+ g_free (s);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]