[gthumb] catalog: preserve ther list order after saving the properties
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] catalog: preserve ther list order after saving the properties
- Date: Mon, 27 Jan 2020 17:14:04 +0000 (UTC)
commit 3567a3046628b0664c23bcdb3d5d9a069c9b0b64
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Jan 20 10:28:55 2020 +0100
catalog: preserve ther list order after saving the properties
gthumb/gth-file-store.c | 29 +++++++++++++----------------
1 file changed, 13 insertions(+), 16 deletions(-)
---
diff --git a/gthumb/gth-file-store.c b/gthumb/gth-file-store.c
index e4c2883f..8d99c79c 100644
--- a/gthumb/gth-file-store.c
+++ b/gthumb/gth-file-store.c
@@ -703,22 +703,6 @@ compare_row_func (gconstpointer a,
}
-static void
-_gth_file_store_sort (GthFileStore *file_store,
- gconstpointer pbase,
- gint total_elems)
-{
- if (file_store->priv->cmp_func == NULL)
- return;
-
- g_qsort_with_data (pbase,
- total_elems,
- (gsize) sizeof (GthFileRow *),
- compare_row_func,
- file_store);
-}
-
-
static int
compare_by_pos (gconstpointer a,
gconstpointer b,
@@ -736,6 +720,19 @@ compare_by_pos (gconstpointer a,
}
+static void
+_gth_file_store_sort (GthFileStore *file_store,
+ gconstpointer pbase,
+ gint total_elems)
+{
+ g_qsort_with_data (pbase,
+ total_elems,
+ (gsize) sizeof (GthFileRow *),
+ (file_store->priv->cmp_func != NULL) ? compare_row_func : compare_by_pos,
+ file_store);
+}
+
+
static void
_gth_file_store_compact_rows (GthFileStore *file_store)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]