[Xfce4-commits] <exo:master> Replace deprecated function g_strcasecmp (bug #8647).

Nick Schermer noreply at xfce.org
Fri Apr 13 17:42:03 CEST 2012


Updating branch refs/heads/master
         to fe90dfba3d3f8e2324fa8ec712120b9e88559da6 (commit)
       from dd229d13b4da667a220e695539b4d690137dbe74 (commit)

commit fe90dfba3d3f8e2324fa8ec712120b9e88559da6
Author: Nick Schermer <nick at xfce.org>
Date:   Fri Apr 13 17:40:17 2012 +0200

    Replace deprecated function g_strcasecmp (bug #8647).

 exo/exo-icon-chooser-model.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/exo/exo-icon-chooser-model.c b/exo/exo-icon-chooser-model.c
index 7b70bf8..dcef7c2 100644
--- a/exo/exo-icon-chooser-model.c
+++ b/exo/exo-icon-chooser-model.c
@@ -572,11 +572,15 @@ exo_icon_chooser_model_icon_theme_changed (GtkIconTheme        *icon_theme,
 
 
 static gint
-exo_icon_chooser_model_item_compare (gconstpointer item_a,
-                                     gconstpointer item_b)
+exo_icon_chooser_model_item_compare (gconstpointer data_a,
+                                     gconstpointer data_b)
 {
-  return g_strcasecmp (((const ExoIconChooserModelItem *) item_a)->icon_name,
-                       ((const ExoIconChooserModelItem *) item_b)->icon_name);
+  const ExoIconChooserModelItem *item_a = data_a;
+  const ExoIconChooserModelItem *item_b = data_b;
+
+  /* the case is not much of a problem in icon themes, so
+   * therefore we only use good utf-8 sorting */
+  return g_utf8_collate (item_a->icon_name, item_b->icon_name);
 }
 
 


More information about the Xfce4-commits mailing list