From b338e29fd3eaf700f8c8360aa0310048ba941d54 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:12:46 +0200 Subject: 3.19 --- library/custom_grid.cpp | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'library/custom_grid.cpp') diff --git a/library/custom_grid.cpp b/library/custom_grid.cpp index c2b87b5d..97b608fb 100644 --- a/library/custom_grid.cpp +++ b/library/custom_grid.cpp @@ -5,7 +5,6 @@ // ************************************************************************** // #include "custom_grid.h" -#include "../shared/system_constants.h" #include "resources.h" #include #include "../shared/util.h" @@ -283,16 +282,16 @@ protected: switch (colType_) { case xmlAccess::FULL_PATH: - value = zToWx(fileObj.getFullName().BeforeLast(common::FILE_NAME_SEPARATOR)); + value = toWx(fileObj.getFullName().BeforeLast(FILE_NAME_SEPARATOR)); break; case xmlAccess::FILENAME: //filename - value = zToWx(fileObj.getShortName()); + value = toWx(fileObj.getShortName()); break; case xmlAccess::REL_PATH: //relative path - value = zToWx(fileObj.getParentRelativeName()); + value = toWx(fileObj.getParentRelativeName()); break; case xmlAccess::DIRECTORY: - value = zToWx(fileObj.getBaseDirPf()); + value = toWx(fileObj.getBaseDirPf()); break; case xmlAccess::SIZE: //file size value = zen::toStringSep(fileObj.getFileSize()); @@ -301,7 +300,7 @@ protected: value = zen::utcTimeToLocalString(fileObj.getLastWriteTime()); break; case xmlAccess::EXTENSION: //file extension - value = zToWx(fileObj.getExtension()); + value = toWx(fileObj.getExtension()); break; } } @@ -311,16 +310,16 @@ protected: switch (colType_) { case xmlAccess::FULL_PATH: - value = zToWx(linkObj.getFullName().BeforeLast(common::FILE_NAME_SEPARATOR)); + value = toWx(linkObj.getFullName().BeforeLast(FILE_NAME_SEPARATOR)); break; case xmlAccess::FILENAME: //filename - value = zToWx(linkObj.getShortName()); + value = toWx(linkObj.getShortName()); break; case xmlAccess::REL_PATH: //relative path - value = zToWx(linkObj.getParentRelativeName()); + value = toWx(linkObj.getParentRelativeName()); break; case xmlAccess::DIRECTORY: - value = zToWx(linkObj.getBaseDirPf()); + value = toWx(linkObj.getBaseDirPf()); break; case xmlAccess::SIZE: //file size value = _(""); @@ -339,16 +338,16 @@ protected: switch (colType_) { case xmlAccess::FULL_PATH: - value = zToWx(dirObj.getFullName()); + value = toWx(dirObj.getFullName()); break; case xmlAccess::FILENAME: - value = zToWx(dirObj.getShortName()); + value = toWx(dirObj.getShortName()); break; case xmlAccess::REL_PATH: - value = zToWx(dirObj.getParentRelativeName()); + value = toWx(dirObj.getParentRelativeName()); break; case xmlAccess::DIRECTORY: - value = zToWx(dirObj.getBaseDirPf()); + value = toWx(dirObj.getBaseDirPf()); break; case xmlAccess::SIZE: //file size value = _(""); @@ -1264,7 +1263,8 @@ public: icon = IconBuffer::getFileIcon(); //better than nothing } - dc.DrawIcon(icon, rectShrinked.GetX() + LEFT_BORDER, rectShrinked.GetY()); + if (icon.IsOk()) + dc.DrawIcon(icon, rectShrinked.GetX() + LEFT_BORDER, rectShrinked.GetY()); //----------------------------------------------------------------------------------------------- //save status of last icon load -> used for async. icon loading @@ -1374,20 +1374,20 @@ void CustomGridRim::setTooltip(const wxMouseEvent& event) virtual void visit(const FileMapping& fileObj) { - tipMsg_ = zToWx(fileObj.getRelativeName()) + wxT("\n") + - _("Size") + wxT(": ") + zen::formatFilesizeToShortString(fileObj.getFileSize()) + wxT("\n") + - _("Date") + wxT(": ") + zen::utcTimeToLocalString(fileObj.getLastWriteTime()); + tipMsg_ = toWx(fileObj.getRelativeName()) + "\n" + + _("Size") + ": " + zen::formatFilesizeToShortString(fileObj.getFileSize()) + "\n" + + _("Date") + ": " + zen::utcTimeToLocalString(fileObj.getLastWriteTime()); } virtual void visit(const SymLinkMapping& linkObj) { - tipMsg_ = zToWx(linkObj.getRelativeName()) + wxT("\n") + - _("Date") + wxT(": ") + zen::utcTimeToLocalString(linkObj.getLastWriteTime()); + tipMsg_ = toWx(linkObj.getRelativeName()) + "\n" + + _("Date") + ": " + zen::utcTimeToLocalString(linkObj.getLastWriteTime()); } virtual void visit(const DirMapping& dirObj) { - tipMsg_ = zToWx(dirObj.getRelativeName()); + tipMsg_ = toWx(dirObj.getRelativeName()); } wxString& tipMsg_; -- cgit