diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-07-16 23:26:14 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-07-16 23:26:14 +0200 |
commit | 9894c2b26607d847b84c6b3015b71192f66e32d9 (patch) | |
tree | 060bee8d570f7f1f3f1136b9e55f24712266370d /creator_thread.cpp | |
parent | ad265610a696852968cb35bd7586e96c7e6029c9 (diff) | |
download | alpine-usb-creator-9894c2b26607d847b84c6b3015b71192f66e32d9.tar.bz2 alpine-usb-creator-9894c2b26607d847b84c6b3015b71192f66e32d9.tar.xz |
Add simple creator thread
Diffstat (limited to 'creator_thread.cpp')
-rw-r--r-- | creator_thread.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/creator_thread.cpp b/creator_thread.cpp new file mode 100644 index 0000000..2443c6b --- /dev/null +++ b/creator_thread.cpp @@ -0,0 +1,25 @@ +#include "creator_thread.h" + +CreatorThread::CreatorThread(Dialog *d) + : wxThread() +{ + m_dialog = d; +} + +void CreatorThread::OnExit() +{ +} + +wxThread::ExitCode CreatorThread::Entry() +{ + int i; + for (i = 0; i<=100; i++) { + wxMutexGuiEnter(); + m_dialog->SetProgress(i); + wxMutexGuiLeave(); + + wxMilliSleep(100); + } + return NULL; +} + |