[gnome-control-center] datetime: make s/_/ / simpler



commit 7fa7ed9c8d6d1709265dca907b0c0ba68720ea00
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Sep 21 14:05:48 2010 +0100

    datetime: make s/_/ / simpler
    
    By using the same code as in the main panel code.

 panels/datetime/cc-timezone-map.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/panels/datetime/cc-timezone-map.c b/panels/datetime/cc-timezone-map.c
index daf78a1..5258f8a 100644
--- a/panels/datetime/cc-timezone-map.c
+++ b/panels/datetime/cc-timezone-map.c
@@ -355,7 +355,7 @@ cc_timezone_map_expose_event (GtkWidget      *widget,
       PangoRectangle rect;
       gint width, height;
       gdouble x1, y1, radius = 5;
-      gchar *zone, *s;
+      gchar *zone;
 
       pointx = convert_longtitude_to_x (priv->location->longitude, alloc.width);
       pointy = convert_latitude_to_y (priv->location->latitude, alloc.height);
@@ -369,9 +369,7 @@ cc_timezone_map_expose_event (GtkWidget      *widget,
       zone = g_strdup (priv->location->zone);
 
       /* convert underscores to spaces */
-      for (s = zone; *s; s++)
-        if (*s == '_')
-          *s = ' ';
+      g_strdelimit (zone, "_", ' ');
 
       layout = gtk_widget_create_pango_layout (widget, zone);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]