diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:09:45 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:09:45 +0200 |
commit | 88c8801298cbf6fec9cdce254c7b3cb9e066a421 (patch) | |
tree | 35a35acf48eb227bac30abc8f87ea9b1c3c57b68 /library/icon_buffer.cpp | |
parent | 3.12 (diff) | |
download | FreeFileSync-88c8801298cbf6fec9cdce254c7b3cb9e066a421.tar.gz FreeFileSync-88c8801298cbf6fec9cdce254c7b3cb9e066a421.tar.bz2 FreeFileSync-88c8801298cbf6fec9cdce254c7b3cb9e066a421.zip |
3.13
Diffstat (limited to 'library/icon_buffer.cpp')
-rw-r--r-- | library/icon_buffer.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/library/icon_buffer.cpp b/library/icon_buffer.cpp index 20ff60f7..e03ec8c4 100644 --- a/library/icon_buffer.cpp +++ b/library/icon_buffer.cpp @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // #include "icon_buffer.h" @@ -9,6 +9,7 @@ #include <map> #include <queue> #include <set> +#include <wx/log.h> #ifdef FFS_WIN #include <wx/msw/wrapwin.h> //includes "windows.h" @@ -321,7 +322,7 @@ void IconBuffer::WorkerThread::operator()() //thread entry } catch (const std::exception& e) //exceptions must be catched per thread { - wxMessageBox(wxString::FromAscii(e.what()), wxString(_("An exception occurred!")) + wxT("(Icon buffer)"), wxOK | wxICON_ERROR); + wxSafeShowMessage(wxString(_("An exception occurred!")) + wxT("(Icon buffer)"), wxString::FromAscii(e.what())); //simple wxMessageBox won't do for threads } } @@ -364,7 +365,7 @@ void IconBuffer::WorkerThread::doWork() //--------------------------------------------------------------------------------------------------- -class IconBuffer::IconDB : public std::map<BasicString, IconBuffer::IconHolder> {}; //entryName/icon -> ATTENTION: avoid ref-counting for this shared data structure! +class IconBuffer::IconDB : public std::map<BasicString, IconBuffer::IconHolder, LessFilename> {}; //entryName/icon -> ATTENTION: avoid ref-counting for this shared data structure! class IconBuffer::IconDbSequence : public std::queue<BasicString> {}; //entryName //--------------------------------------------------------------------------------------------------- @@ -427,7 +428,7 @@ void IconBuffer::insertIntoBuffer(const BasicString& entryName, const IconHolder assert(buffer->size() == bufSequence->size()); //remove elements if buffer becomes too big: - if (buffer->size() > BUFFER_SIZE) //limit buffer size: critical because GDI resources are limited (e.g. 10000 on XP per process) + if (buffer->size() > BUFFER_SIZE_MAX) //limit buffer size: critical because GDI resources are limited (e.g. 10000 on XP per process) { //remove oldest element buffer->erase(bufSequence->front()); |