From 6ef6635ad3d5e8f6440e9ac2b67f1db8589e77b5 Mon Sep 17 00:00:00 2001 From: Dees_Troy Date: Thu, 21 Feb 2013 08:26:57 -0600 Subject: Check for root and root perms and offer to install/fix Also fix sort order for file selector by date and file sizes Change-Id: Idff9fe4232c19d4ed1082e78fabe6f921aa0a114 --- gui/fileselector.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gui/fileselector.cpp') diff --git a/gui/fileselector.cpp b/gui/fileselector.cpp index 66bf80f78..bc10f917d 100644 --- a/gui/fileselector.cpp +++ b/gui/fileselector.cpp @@ -790,19 +790,19 @@ bool GUIFileSelector::fileSort(FileData d1, FileData d2) case 3: // by size largest first if (d1.fileSize == d2.fileSize || d1.fileType == DT_DIR) // some directories report a different size than others - but this is not the size of the files inside the directory, so we just sort by name on directories return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) < 0); - return d1.fileSize > d2.fileSize; + return d1.fileSize < d2.fileSize; case -3: // by size smallest first if (d1.fileSize == d2.fileSize || d1.fileType == DT_DIR) // some directories report a different size than others - but this is not the size of the files inside the directory, so we just sort by name on directories return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) > 0); - return d1.fileSize < d2.fileSize; + return d1.fileSize > d2.fileSize; case 2: // by last modified date newest first if (d1.lastModified == d2.lastModified) return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) < 0); - return d1.lastModified > d2.lastModified; + return d1.lastModified < d2.lastModified; case -2: // by date oldest first if (d1.lastModified == d2.lastModified) return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) > 0); - return d1.lastModified < d2.lastModified; + return d1.lastModified > d2.lastModified; case -1: // by name descending return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) > 0); default: // should be a 1 - sort by name ascending -- cgit v1.2.3