Backport from trunk

2008-01-03  Emmanuele Bassi  <ebassi@gnome.org>

	Backport from trunk

	* 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=/branches/gtk-2-12/; revision=19303
This commit is contained in:
Emmanuele Bassi
2008-01-03 12:43:00 +00:00
committed by Emmanuele Bassi
parent 688bcfb9af
commit 90df66719e
3 changed files with 15 additions and 3 deletions

View File

@@ -1,3 +1,15 @@
2008-01-03 Emmanuele Bassi <ebassi@gnome.org>
Backport from trunk
* 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.
2007-12-30 Johannes Schmid <jhs@gnome.org>
* gtk/gtknotebook.c: (gtk_notebook_stop_reorder):

View File

@@ -9861,7 +9861,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

View 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