diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-04-03 13:14:53 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-04-03 13:14:53 +0200 |
commit | c43dfb815a4951b8248f4f0e98babe4f80204f03 (patch) | |
tree | 82745ed2353757c41ea1865bad9ac7a1b0a8a366 /src/Thumbnail.vala | |
parent | 2785a691b958a79a1dd606c445188c71c3f58b3c (diff) |
Imported Upstream version 0.22.0upstream/0.22.0
Diffstat (limited to 'src/Thumbnail.vala')
-rw-r--r-- | src/Thumbnail.vala | 9 |
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(); |