Changeset 3268 in orxonox.OLD for orxonox/branches/updater/src/gui/orxonox_gui_update.cc
- Timestamp:
- Dec 24, 2004, 4:25:41 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/updater/src/gui/orxonox_gui_update.cc
r3267 r3268 158 158 info->Bar = (ProgressBar*)bar; 159 159 PRINTF(3)("Preparing to download file %s.\n", info->fileName); 160 // downloadThread (info); 161 162 if (downloadThreadID == NULL) 163 { 164 if ( (downloadThreadID =g_thread_create(&downloadThread, info, TRUE, NULL)) == 0 ) 165 PRINTF(1)("can't create the thread"); 166 } 167 else 168 PRINTF(1)("thread already in use\n"); 169 160 download(info); 170 161 } 171 162 … … 198 189 int OrxonoxGuiUpdate::curlProgressFunc (ProgressBar* Bar, double totalSize, double progress, double upTotal, double upProgress) 199 190 { 200 gdk_threads_enter();201 191 Bar->setProgress(progress); 202 192 Bar->setTotalSize(totalSize); 203 gdk_threads_leave();204 193 return 0; 205 206 } 207 208 GThread* OrxonoxGuiUpdate::downloadThreadID = NULL; 209 210 void* OrxonoxGuiUpdate::downloadThread (void* fileInfo) 194 } 195 196 197 void* OrxonoxGuiUpdate::download (void* fileInfo) 211 198 { 212 199 … … 241 228 curl_easy_cleanup(curl); 242 229 } 243 downloadThreadID = NULL;244 230 return NULL; 245 231 } 232 233 #ifdef HAVE_GTK2 234 gint OrxonoxGuiUpdate::cancelDownload(GtkWidget* w, GdkEventKey* event, void* bar) 235 { 236 } 237 #endif /* HAVE_GTK2 */ 246 238 247 239 #endif /* HAVE_CURL */
Note: See TracChangeset
for help on using the changeset viewer.