aboutsummaryrefslogtreecommitdiff
path: root/gui/remotebrowser.h
diff options
context:
space:
mode:
authorAlexander Tkachev2016-07-04 14:06:34 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commit8972f28bc17b6d2f6fee69adcb025c9a561e851f (patch)
tree68c5e4c40dfba2168fb7cb9c1a8bd2f6d3174ba3 /gui/remotebrowser.h
parenta37c63998671ad8a341e1b88aead758f408e5fc2 (diff)
downloadscummvm-rg350-8972f28bc17b6d2f6fee69adcb025c9a561e851f.tar.gz
scummvm-rg350-8972f28bc17b6d2f6fee69adcb025c9a561e851f.tar.bz2
scummvm-rg350-8972f28bc17b6d2f6fee69adcb025c9a561e851f.zip
GUI: Add RemoteBrowser file list sorting
Because Dropbox has no means to specify files order.
Diffstat (limited to 'gui/remotebrowser.h')
-rw-r--r--gui/remotebrowser.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gui/remotebrowser.h b/gui/remotebrowser.h
index 0137c32dc0..be416154a1 100644
--- a/gui/remotebrowser.h
+++ b/gui/remotebrowser.h
@@ -66,6 +66,16 @@ protected:
void listDirectory(Cloud::StorageFile node);
void directoryListedCallback(Cloud::Storage::ListDirectoryResponse response);
void directoryListedErrorCallback(Networking::ErrorResponse error);
+
+ struct FileListOrder : public Common::BinaryFunction<Cloud::StorageFile, Cloud::StorageFile, bool> {
+ bool operator()(const Cloud::StorageFile &x, const Cloud::StorageFile &y) const {
+ if (x.isDirectory() != y.isDirectory()) {
+ return x.isDirectory(); //x < y (directory < not directory) or x > y (not directory > directory)
+ }
+
+ return x.name() < y.name();
+ }
+ };
};
} // End of namespace GUI