Changeset 3284 in orxonox.OLD for orxonox/branches/updater/src/gui/orxonox_gui_update.cc
- Timestamp:
- Dec 26, 2004, 12:53:21 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/updater/src/gui/orxonox_gui_update.cc
r3283 r3284 288 288 if (!isDownloading) 289 289 { 290 isDownloading = true; 290 pthread_join(*downloadThreadFinishID, NULL); 291 292 info->stateButton->disconnectSignal(info->buttonSignal); 293 info->buttonSignal = info->stateButton->connectSignal("button_press_event", info, cancelDownload); 294 #ifdef HAVE_PTHREAD_H 295 info->stateButton->setTitle("cancel"); 296 #else /* HAVE_PTHREAD_H */ 297 info->stateButton->setTitle("please wait"); 298 #endif /* HAVE_PTHREAD_H */ 299 291 300 //! \todo check if threads really were created. 292 301 #ifdef HAVE_PTHREAD_H 293 pthread_join(*downloadThreadFinishID, NULL);294 302 pthread_create(downloadThreadID, NULL, downloadThread, info); 295 303 pthread_create(downloadThreadFinishID, NULL, downloadThreadFinished, info); … … 318 326 void* OrxonoxGuiUpdate::downloadThread(void* fileInfo) 319 327 { 320 #ifdef HAVE_PTHREAD_H 321 pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); 322 gdk_threads_enter(); 323 #endif /* HAVE_PTHREAD_H */ 324 FileInfo* info = (FileInfo*)fileInfo; 325 info->stateButton->disconnectSignal(info->buttonSignal); 326 info->buttonSignal = info->stateButton->connectSignal("button_press_event", info, cancelDownload); 327 #ifdef HAVE_PTHREAD_H 328 info->stateButton->setTitle("cancel"); 329 gdk_threads_leave(); 330 #else /* HAVE_PTHREAD_H */ 331 info->stateButton->setTitle("please wait"); 332 #endif /* HAVE_PTHREAD_H */ 333 pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); 334 328 isDownloading = true; 335 329 curl_easy_perform(curlHandle); 336 330 }
Note: See TracChangeset
for help on using the changeset viewer.