summaryrefslogtreecommitdiff
path: root/src/Thumbnail.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/Thumbnail.vala')
-rw-r--r--src/Thumbnail.vala9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Thumbnail.vala b/src/Thumbnail.vala
index c33d43b..4ce9e81 100644
--- a/src/Thumbnail.vala
+++ b/src/Thumbnail.vala
@@ -1,4 +1,4 @@
-/* Copyright 2009-2014 Yorba Foundation
+/* Copyright 2009-2015 Yorba Foundation
*
* This software is licensed under the GNU LGPL (version 2.1 or later).
* See the COPYING file in this distribution.
@@ -161,8 +161,7 @@ public class Thumbnail : MediaSourceItem {
}
public static int64 title_ascending_comparator(void *a, void *b) {
- int64 result = strcmp(((Thumbnail *) a)->media.get_name(), ((Thumbnail *) b)->media.get_name());
-
+ int64 result = strcmp(((Thumbnail *) a)->get_natural_collation_key(), ((Thumbnail *) b)->get_natural_collation_key());
return (result != 0) ? result : photo_id_ascending_comparator(a, b);
}
@@ -194,6 +193,10 @@ public class Thumbnail : MediaSourceItem {
return alteration.has_detail("metadata", "exposure-time");
}
+ public static bool filename_comparator_predicate(DataObject object, Alteration alteration) {
+ return alteration.has_detail("metadata", "filename");
+ }
+
public static int64 filename_ascending_comparator(void *a, void *b) {
string path_a = ((Thumbnail *) a)->media.get_file().get_basename().down();
string path_b = ((Thumbnail *) b)->media.get_file().get_basename().down();