]> Pileus Git - ~andy/gtk/commitdiff
Use the correct comparison function (kudos to Christian Persch and Claudio
authorEmmanuele Bassi <ebassi@gnome.org>
Thu, 3 Jan 2008 12:29:16 +0000 (12:29 +0000)
committerEmmanuele Bassi <ebassi@src.gnome.org>
Thu, 3 Jan 2008 12:29:16 +0000 (12:29 +0000)
2008-01-03  Emmanuele Bassi  <ebassi@gnome.org>

* gtk/gtkfilechooserdefault.c (recent_sort_mru): Use the
correct comparison function (kudos to Christian Persch and
Claudio Saavedra for spotting this)

* gtk/gtkrecentchooserutils.c:
(sort_recent_items_mru),
(sort_recent_items_lru): Ditto as above.

svn path=/trunk/; revision=19302

ChangeLog
gtk/gtkfilechooserdefault.c
gtk/gtkrecentchooserutils.c

index e7d9a969fbcf624c74bc1ee6ac16178ee7ee6742..af7f2c491540bef36a377497118b4a5221ef1d9e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-01-03  Emmanuele Bassi  <ebassi@gnome.org>
+
+       * gtk/gtkfilechooserdefault.c (recent_sort_mru): Use the
+       correct comparison function (kudos to Christian Persch and
+       Claudio Saavedra for spotting this)
+
+       * gtk/gtkrecentchooserutils.c:
+       (sort_recent_items_mru),
+       (sort_recent_items_lru): Ditto as above.
+
 2008-01-03  Johan Dahlin  <johan@gnome.org>
 
        * tests/defaultvaluetest.c: Make it pass again.
index 75a149f0e596693bf46a2b8997f8556f5399fb5b..46892cacbae779fe42396b8ee19fea4977e2b393 100644 (file)
@@ -9850,7 +9850,7 @@ recent_sort_mru (gconstpointer a,
   GtkRecentInfo *info_a = (GtkRecentInfo *) a;
   GtkRecentInfo *info_b = (GtkRecentInfo *) b;
 
-  return (gtk_recent_info_get_modified (info_a) < gtk_recent_info_get_modified (info_b));
+  return (gtk_recent_info_get_modified (info_b) - gtk_recent_info_get_modified (info_a));
 }
 
 static gint
index 06665ede505ef948e7a9a19ae2989bba407bd12c..29a772aaa93b551cee0148c2b611e700b93a02f1 100644 (file)
@@ -302,7 +302,7 @@ sort_recent_items_mru (GtkRecentInfo *a,
 {
   g_assert (a != NULL && b != NULL);
   
-  return (gtk_recent_info_get_modified (a) < gtk_recent_info_get_modified (b));
+  return gtk_recent_info_get_modified (b) - gtk_recent_info_get_modified (a);
 }
 
 static gint
@@ -312,7 +312,7 @@ sort_recent_items_lru (GtkRecentInfo *a,
 {
   g_assert (a != NULL && b != NULL);
   
-  return (gtk_recent_info_get_modified (a) > gtk_recent_info_get_modified (b));
+  return -1 * (gtk_recent_info_get_modified (b) - gtk_recent_info_get_modified (a));
 }
 
 typedef struct