wxBoxSizer* globalSizer = new wxBoxSizer(wxHORIZONTAL);
+#if wxCHECK_VERSION(2, 6, 0)
+ globalSizer->Add(notebook, 1, wxEXPAND, 0);
+#else
globalSizer->Add(new wxNotebookSizer(notebook), 1, wxEXPAND, 0);
+#endif
global->SetSizer( globalSizer );
globalSizer->SetSizeHints( global );
while (!tableparser->hasFinished() && !dt->hasFinished()) {
wxTheApp->Yield(true);
- ::wxUsleep(100);
+ wxbUtils::MilliSleep(100);
}
wxString str;
}
}
wxTheApp->Yield(true);
- ::wxUsleep(1);
+ wxbUtils::MilliSleep(1);
}
gauge->SetValue(tot);
wxStopWatch sw2;
while (sw2.Time() < 10000) {
wxTheApp->Yield(true);
- ::wxUsleep(100);
+ wxbUtils::MilliSleep(100);
}
if (ended) {
wxStopWatch sw;
while ((IsWorking()) && (cancelled != 2)) {
wxTheApp->Yield(true);
- ::wxUsleep(100);
+ wxbUtils::MilliSleep(100);
if (sw.Time() > 30000) { /* 30 seconds timeout */
if (status == choosing) {
wxbMainFrame::GetInstance()->Send("quit\n");
}
SetStatus(finished);
- ::wxUsleep(1000);
+ wxbUtils::MilliSleep(1000);
return;
}
}
default:
break;
}
- ::wxUsleep(1000);
+ wxbUtils::MilliSleep(1000);
SetStatus(finished);
}
while (!tableparser->hasFinished()) {
wxTheApp->Yield(true);
- ::wxUsleep(100);
+ wxbUtils::MilliSleep(100);
}
if (!tableparser->GetCount() == 0) {
if (file[8].GetChar(file[8].Length()-1) == '/') {
wxString itemStr;
+#if wxCHECK_VERSION(2, 6, 0)
+ wxTreeItemIdValue cookie;
+#else
long cookie;
+#endif
+
treeid = tree->GetFirstChild(item, cookie);
bool updated = false;
/* Sets a tree item state, and update its children, parents and list (if necessary) */
void wxbRestorePanel::SetTreeItemState(wxTreeItemId item, int newstate) {
+#if wxCHECK_VERSION(2, 6, 0)
+ wxTreeItemIdValue cookie;
+#else
long cookie;
+#endif
wxTreeItemId currentChild = tree->GetFirstChild(item, cookie);
wxbTreeItemData* itemdata;
int state = 0;
+#if wxCHECK_VERSION(2, 6, 0)
+ wxTreeItemIdValue cookie;
+#else
long cookie;
+#endif
wxTreeItemId currentChild = tree->GetFirstChild(item, cookie);
bool onechildmarked = false;
bool match;
for (int i = current.Count()-1; i >= 0; i--) {
+#if wxCHECK_VERSION(2, 6, 0)
+ wxTreeItemIdValue cookie;
+#else
long cookie;
+#endif
wxTreeItemId currentChild = tree->GetFirstChild(item, cookie);
match = false;
wxString itemStr;
+#if wxCHECK_VERSION(2, 6, 0)
+ wxTreeItemIdValue cookie;
+#else
long cookie;
+#endif
if (name.GetChar(name.Length()-1) == '/') {
wxTreeItemId currentChild = tree->GetFirstChild(currentTreeItem, cookie);
bool wxbUtils::inited = false;
+/* Sleeps during milliseconds (wrapper for wxUsleep (2.4) or wxMilliSleep (2.6)) */
+void wxbUtils::MilliSleep(unsigned long milliseconds) {
+#if wxCHECK_VERSION(2, 6, 0)
+ ::wxMilliSleep(milliseconds);
+#else
+ ::wxUsleep(milliseconds);
+#endif
+}
+
/* Initialization */
void wxbUtils::Init() {
inited = true;
while (!tableParser->hasFinished()) {
//innerThread->Yield();
wxTheApp->Yield(true);
- ::wxUsleep(100);
+ wxbUtils::MilliSleep(100);
//if (base+15 < wxDateTime::Now().GetTicks()) break;
}
return tableParser;
while (!promptParser->hasFinished()) {
//innerThread->Yield();
wxTheApp->Yield(true);
- ::wxUsleep(100);
+ wxbUtils::MilliSleep(100);
//if (base+15 < wxDateTime::Now().GetTicks()) break;
}
while (!datatokenizer->hasFinished()) {
//innerThread->Yield();
wxTheApp->Yield(true);
- ::wxUsleep(100);
+ wxbUtils::MilliSleep(100);
//if (base+15 < wxDateTime::Now().GetTicks()) break;
}