Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3283 in orxonox.OLD for orxonox/branches/updater/src/gui


Ignore:
Timestamp:
Dec 26, 2004, 12:24:18 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/updater: now also works, if no pthread is found, but gthread is.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/updater/src/gui/orxonox_gui_update.cc

    r3282 r3283  
    318318void* OrxonoxGuiUpdate::downloadThread(void* fileInfo)
    319319{
     320#ifdef HAVE_PTHREAD_H
    320321  pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
    321322  gdk_threads_enter();
     323#endif /* HAVE_PTHREAD_H */
    322324  FileInfo* info = (FileInfo*)fileInfo;
    323325  info->stateButton->disconnectSignal(info->buttonSignal);
     
    325327#ifdef HAVE_PTHREAD_H
    326328  info->stateButton->setTitle("cancel");
     329  gdk_threads_leave();
    327330#else /* HAVE_PTHREAD_H */
    328331  info->stateButton->setTitle("please wait");
    329332#endif /* HAVE_PTHREAD_H */
    330   gdk_threads_leave();
    331333  pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
    332334
     
    343345#ifdef HAVE_PTHREAD_H
    344346  pthread_join (*downloadThreadID, NULL);
    345 #endif /* HAVE_PTHREAD_H */
    346347  gdk_threads_enter();
     348#endif /* HAVE_PTHREAD_H */
    347349  if (curlHandle)
    348350    curl_easy_cleanup(curlHandle);
     
    358360  info->buttonSignal = info->stateButton->connectSignal("button_press_event", info, updateDataFunc);
    359361  isDownloading = false;
     362#ifdef HAVE_PTHREAD_H
    360363  gdk_threads_leave();
     364#endif /* HAVE_PTHREAD_H */
    361365
    362366}
Note: See TracChangeset for help on using the changeset viewer.