summaryrefslogtreecommitdiff
path: root/library/iconBuffer.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:01:29 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:01:29 +0200
commit9a2a524f1e311853d08050be2dcdddc09ac7759a (patch)
treed8e4a24169fce88c2d89931d58514889a0bcb0ea /library/iconBuffer.cpp
parent2.3 (diff)
downloadFreeFileSync-9a2a524f1e311853d08050be2dcdddc09ac7759a.tar.gz
FreeFileSync-9a2a524f1e311853d08050be2dcdddc09ac7759a.tar.bz2
FreeFileSync-9a2a524f1e311853d08050be2dcdddc09ac7759a.zip
3.0
Diffstat (limited to 'library/iconBuffer.cpp')
-rw-r--r--library/iconBuffer.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/library/iconBuffer.cpp b/library/iconBuffer.cpp
index cf21104e..2f1e2915 100644
--- a/library/iconBuffer.cpp
+++ b/library/iconBuffer.cpp
@@ -45,12 +45,12 @@ private:
WorkerThread::WorkerThread(IconBuffer* iconBuff) :
- wxThread(wxTHREAD_JOINABLE),
- threadHasMutex(false),
- threadExitIsRequested(false),
- threadIsListening(),
- continueWork(threadIsListening),
- iconBuffer(iconBuff)
+ wxThread(wxTHREAD_JOINABLE),
+ threadHasMutex(false),
+ threadExitIsRequested(false),
+ threadIsListening(),
+ continueWork(threadIsListening),
+ iconBuffer(iconBuff)
{
if (Create() != wxTHREAD_NO_ERROR)
throw std::runtime_error("Error creating icon buffer worker thread!");
@@ -98,7 +98,8 @@ wxThread::ExitCode WorkerThread::Entry()
try
{
wxMutexLocker dummy(threadIsListening); //this lock needs to be called from WITHIN the thread => calling it from constructor(Main thread) would be useless
- { //this mutex STAYS locked all the time except of continueWork.Wait()!
+ {
+ //this mutex STAYS locked all the time except of continueWork.Wait()!
wxCriticalSectionLocker dummy2(lockWorkload);
threadHasMutex = true;
}
@@ -117,7 +118,7 @@ wxThread::ExitCode WorkerThread::Entry()
}
catch (const std::exception& e) //exceptions must be catched per thread
{
- wxMessageBox(wxString::From8BitData(e.what()), _("An exception occured!"), wxOK | wxICON_ERROR);
+ wxMessageBox(wxString::FromAscii(e.what()), _("An exception occured!"), wxOK | wxICON_ERROR);
return 0;
}
}
@@ -162,7 +163,8 @@ void WorkerThread::doWork()
SHGFI_ICON | SHGFI_SMALLICON) &&
fileInfo.hIcon != 0) //fix for weird error: SHGetFileInfo() might return successfully WITHOUT filling fileInfo.hIcon!!
- { //bug report: https://sourceforge.net/tracker/?func=detail&aid=2768004&group_id=234430&atid=1093080
+ {
+ //bug report: https://sourceforge.net/tracker/?func=detail&aid=2768004&group_id=234430&atid=1093080
wxIcon newIcon; //attention: wxIcon uses reference counting!
newIcon.SetHICON(fileInfo.hIcon);
@@ -198,10 +200,10 @@ IconBuffer& IconBuffer::getInstance()
IconBuffer::IconBuffer() :
- lockIconDB( new wxCriticalSection),
- buffer( new IconDB),
- bufSequence(new IconDbSequence),
- worker( new WorkerThread(this)) //might throw exceptions!
+ lockIconDB( new wxCriticalSection),
+ buffer( new IconDB),
+ bufSequence(new IconDbSequence),
+ worker( new WorkerThread(this)) //might throw exceptions!
{}
bgstack15