summaryrefslogtreecommitdiffstats
path: root/creator_thread.cpp
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-07-16 23:26:14 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2012-07-16 23:26:14 +0200
commit9894c2b26607d847b84c6b3015b71192f66e32d9 (patch)
tree060bee8d570f7f1f3f1136b9e55f24712266370d /creator_thread.cpp
parentad265610a696852968cb35bd7586e96c7e6029c9 (diff)
downloadalpine-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.cpp25
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;
+}
+