Index: orxonox/branches/updater/src/gui/orxonox_gui_update.cc
===================================================================
--- orxonox/branches/updater/src/gui/orxonox_gui_update.cc	(revision 3283)
+++ orxonox/branches/updater/src/gui/orxonox_gui_update.cc	(revision 3284)
@@ -288,8 +288,16 @@
       if (!isDownloading)
 	{
-	  isDownloading = true;
+	  pthread_join(*downloadThreadFinishID, NULL);
+
+	  info->stateButton->disconnectSignal(info->buttonSignal);
+	  info->buttonSignal = info->stateButton->connectSignal("button_press_event", info, cancelDownload);
+#ifdef HAVE_PTHREAD_H
+	  info->stateButton->setTitle("cancel");
+#else /* HAVE_PTHREAD_H */
+	  info->stateButton->setTitle("please wait");
+#endif /* HAVE_PTHREAD_H */
+	  
 	  //! \todo check if threads really were created.
 #ifdef HAVE_PTHREAD_H
-	  pthread_join(*downloadThreadFinishID, NULL);
 	  pthread_create(downloadThreadID, NULL, downloadThread, info);
 	  pthread_create(downloadThreadFinishID, NULL, downloadThreadFinished, info);  
@@ -318,19 +326,5 @@
 void* OrxonoxGuiUpdate::downloadThread(void* fileInfo)
 {
-#ifdef HAVE_PTHREAD_H
-  pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
-  gdk_threads_enter();
-#endif /* HAVE_PTHREAD_H */
-  FileInfo* info = (FileInfo*)fileInfo;
-  info->stateButton->disconnectSignal(info->buttonSignal);
-  info->buttonSignal = info->stateButton->connectSignal("button_press_event", info, cancelDownload);
-#ifdef HAVE_PTHREAD_H
-  info->stateButton->setTitle("cancel");
-  gdk_threads_leave();
-#else /* HAVE_PTHREAD_H */
-  info->stateButton->setTitle("please wait");
-#endif /* HAVE_PTHREAD_H */
-  pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
-
+  isDownloading = true;
   curl_easy_perform(curlHandle);
 }
Index: orxonox/branches/updater/src/gui/orxonox_gui_update.h
===================================================================
--- orxonox/branches/updater/src/gui/orxonox_gui_update.h	(revision 3283)
+++ orxonox/branches/updater/src/gui/orxonox_gui_update.h	(revision 3284)
@@ -24,21 +24,21 @@
 {
  private:
-  Frame* updateFrame;          //!< The Frame that holds the updateOptions.
-  Box* updateBox;              //!< The Box that holds the updateOptions.
-  CheckButton* autoUpdate;     //!< A Checkbutton to enable the automatic Updating.
+  Frame* updateFrame;                   //!< The Frame that holds the updateOptions.
+  Box* updateBox;                       //!< The Box that holds the updateOptions.
+  CheckButton* autoUpdate;              //!< A Checkbutton to enable the automatic Updating.
 
   
-  Button* updateDataWindowButton;//!< A Button to update the Data of orxonox.
-  Window* updateDataWindow;    //!< A Window for the data-update.
-  Box* updateDataBox;          //!< A Box for the Window for the Data-update.
-  ProgressBar* updateDataBar;  //!< A Bar to display the progress of the download.
-  Button* updateDataBegin;     //!< A Button to start the process.
+  Button* updateDataWindowButton;       //!< A Button to update the Data of orxonox.
+  Window* updateDataWindow;             //!< A Window for the data-update.
+  Box* updateDataBox;                   //!< A Box for the Window for the Data-update.
+  ProgressBar* updateDataBar;           //!< A Bar to display the progress of the download.
+  Button* updateDataBegin;              //!< A Button to start the process.
 
-  Button* updateSourceWindowButton;//!< A Button to update the Source of orxonox. \todo tricky
-  Window* updateSourceWindow;  //!< A Window for the Source-update.
-  Box* updateSourceBox;  //!< A Box for the Window for the Source-update.
-  ProgressBar* updateSourceBar;//!< A Bar to display the progress of the download.
+  Button* updateSourceWindowButton;     //!< A Button to update the Source of orxonox. \todo tricky
+  Window* updateSourceWindow;           //!< A Window for the Source-update.
+  Box* updateSourceBox;                 //!< A Box for the Window for the Source-update.
+  ProgressBar* updateSourceBar;         //!< A Bar to display the progress of the download.
 
-  Button* test;  //!< will be deleted soon.
+  Button* test;                         //!< will be deleted soon.
   
 #ifdef HAVE_GTK2 
@@ -51,12 +51,12 @@
   struct FileInfo
   {
-    char* fileName;       //!< The Name of the file we want to get.
-    char* webRoot;        //!< The Root of the File on The Web
-    char* localRoot;      //!< The Root directory to put the files on the local disk.
-    FILE* fileHandle;     //!< A fileHandler.
+    char* fileName;                     //!< The Name of the file we want to get.
+    char* webRoot;                      //!< The Root of the File on The Web
+    char* localRoot;                    //!< The Root directory to put the files on the local disk.
+    FILE* fileHandle;                   //!< A fileHandler.
 
-    Button* stateButton;  //!< A button that shows either start or cancel;
-    long int buttonSignal;//!< The Signal of the stateButton.
-    ProgressBar* bar;     //!< The ProgressBar, that sould be updated.
+    Button* stateButton;                //!< A button that shows either start or cancel;
+    long int buttonSignal;              //!< The Signal of the stateButton.
+    ProgressBar* bar;                   //!< The ProgressBar, that sould be updated.
   };
 
@@ -88,7 +88,4 @@
   Widget* getWidget ();
   
-  //  void updateWindowCreate (void);
-  //  Button* updateWindowGetButton(void);
-
   void updateDataWindowCreate (void);
   Button* updateDataWindowGetButton(void);
