[libdazzle] util: flip the order of compare func data
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] util: flip the order of compare func data
- Date: Wed, 5 Jul 2017 02:46:48 +0000 (UTC)
commit e92b573d7bba8cad6ca267ad3927c7715494edf5
Author: Christian Hergert <chergert redhat com>
Date: Tue Jul 4 19:46:00 2017 -0700
util: flip the order of compare func data
The rest of the code assumes the opposite ordering for these
parameters, so flip them around.
src/util/dzl-gtk.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/util/dzl-gtk.c b/src/util/dzl-gtk.c
index 473205d..f0b7920 100644
--- a/src/util/dzl-gtk.c
+++ b/src/util/dzl-gtk.c
@@ -459,8 +459,8 @@ dzl_gtk_widget_mux_action_groups (GtkWidget *widget,
* @compare_column must be the index of a column that is a %G_TYPE_POINTER,
* %G_TYPE_BOXED or %G_TYPE_OBJECT based column.
*
- * @compare_func will be called with @key as the first parameter, and the
- * value from the column as the second parameter. The final parameter will
+ * @compare_func will be called with the column data as the first
+ * parameter and @key as the second parameter. The final parameter will
* be the @compare_data passed to this function.
*
* Since: 3.26
@@ -522,7 +522,7 @@ dzl_gtk_list_store_insert_sorted (GtkListStore *store,
gtk_tree_model_iter_nth_child (model, &cur, NULL, middle);
gtk_tree_model_get_value (model, &cur, compare_column, &value);
- cmpval = compare_func (key, get_func (&value), compare_data);
+ cmpval = compare_func (get_func (&value), key, compare_data);
g_value_reset (&value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]