Commit 6f1d571c authored by Emmanuele Bassi's avatar Emmanuele Bassi Committed by Emmanuele Bassi

Use the correct comparison function (kudos to Christian Persch and Claudio

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
parent caba82cf
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> 2008-01-03 Johan Dahlin <johan@gnome.org>
* tests/defaultvaluetest.c: Make it pass again. * tests/defaultvaluetest.c: Make it pass again.
......
...@@ -9850,7 +9850,7 @@ recent_sort_mru (gconstpointer a, ...@@ -9850,7 +9850,7 @@ recent_sort_mru (gconstpointer a,
GtkRecentInfo *info_a = (GtkRecentInfo *) a; GtkRecentInfo *info_a = (GtkRecentInfo *) a;
GtkRecentInfo *info_b = (GtkRecentInfo *) b; 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 static gint
......
...@@ -302,7 +302,7 @@ sort_recent_items_mru (GtkRecentInfo *a, ...@@ -302,7 +302,7 @@ sort_recent_items_mru (GtkRecentInfo *a,
{ {
g_assert (a != NULL && b != NULL); 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 static gint
...@@ -312,7 +312,7 @@ sort_recent_items_lru (GtkRecentInfo *a, ...@@ -312,7 +312,7 @@ sort_recent_items_lru (GtkRecentInfo *a,
{ {
g_assert (a != NULL && b != NULL); 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 typedef struct
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment