[gucharmap] Revert "Use locale-aware string comparision to sort the chapters"
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gucharmap] Revert "Use locale-aware string comparision to sort the chapters"
- Date: Sat, 13 Dec 2014 19:30:25 +0000 (UTC)
commit c12be81555ec7ae15826a59075b1fad9910a4ca3
Author: Christian Persch <chpe gnome org>
Date: Sat Dec 13 20:17:36 2014 +0100
Revert "Use locale-aware string comparision to sort the chapters"
This reverts commit afd8c4af41d48fe4e913608a2e05f6aaa46c64fd.
gucharmap/gucharmap-block-chapters-model.c | 2 +-
gucharmap/gucharmap-script-chapters-model.c | 25 -------------------------
2 files changed, 1 insertions(+), 26 deletions(-)
---
diff --git a/gucharmap/gucharmap-block-chapters-model.c b/gucharmap/gucharmap-block-chapters-model.c
index 05cbb23..65ce885 100644
--- a/gucharmap/gucharmap-block-chapters-model.c
+++ b/gucharmap/gucharmap-block-chapters-model.c
@@ -56,7 +56,7 @@ compare_iters (GtkTreeModel *model,
gtk_tree_model_get (model, iter_a, BLOCK_CHAPTERS_MODEL_LABEL, &label_a, -1);
gtk_tree_model_get (model, iter_b, BLOCK_CHAPTERS_MODEL_LABEL, &label_b, -1);
- ret = g_utf8_collate (label_a, label_b);
+ ret = strcmp (label_a, label_b);
g_free (label_a);
g_free (label_b);
diff --git a/gucharmap/gucharmap-script-chapters-model.c b/gucharmap/gucharmap-script-chapters-model.c
index 30f8c4b..da6a2ab 100644
--- a/gucharmap/gucharmap-script-chapters-model.c
+++ b/gucharmap/gucharmap-script-chapters-model.c
@@ -27,26 +27,6 @@
#include "gucharmap.h"
#include "gucharmap-private.h"
-static int
-compare_iters (GtkTreeModel *model,
- GtkTreeIter *iter_a,
- GtkTreeIter *iter_b,
- gpointer user_data)
-{
- char *label_a, *label_b;
- int ret;
-
- gtk_tree_model_get (model, iter_a, GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL, &label_a, -1);
- gtk_tree_model_get (model, iter_b, GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL, &label_b, -1);
-
- ret = g_utf8_collate (label_a, label_b);
-
- g_free (label_a);
- g_free (label_b);
-
- return ret;
-}
-
static void
gucharmap_script_chapters_model_init (GucharmapScriptChaptersModel *model)
{
@@ -71,11 +51,6 @@ gucharmap_script_chapters_model_init (GucharmapScriptChaptersModel *model)
-1);
}
g_free (unicode_scripts);
-
- gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (model),
- GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL,
- (GtkTreeIterCompareFunc) compare_iters,
- NULL, NULL);
}
static GucharmapCodepointList *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]