1 | #include "../../titan/struct.h" |
---|
2 | #include "../../titan/debug.h" |
---|
3 | #include "../../titan/header.h" |
---|
4 | |
---|
5 | char pluginname[] = "MultiImage"; |
---|
6 | char plugindesc[] = "Start Images from USB device"; |
---|
7 | char pluginpic[] = "%pluginpath%/multiimage/MultiImage.png"; |
---|
8 | |
---|
9 | int pluginaktiv = 0; |
---|
10 | //int pluginversion = PLUGINVERSION; |
---|
11 | int pluginversion = 999999; |
---|
12 | |
---|
13 | struct stimerthread* Multi_Image_thread = NULL; |
---|
14 | |
---|
15 | void multiimage_thread() |
---|
16 | { |
---|
17 | while (Multi_Image_thread->aktion != STOP) |
---|
18 | { |
---|
19 | sleep(3); |
---|
20 | if(file_exist("/tmp/multiende") == 1) |
---|
21 | { |
---|
22 | textbox(_("Message"), _("INFO\nImage extracted"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 500, 200, 0, 0); |
---|
23 | remove("/tmp/multiende"); |
---|
24 | break; |
---|
25 | } |
---|
26 | } |
---|
27 | if(Multi_Image_thread->aktion == STOP) |
---|
28 | { |
---|
29 | system("killall multi_unpack.sh"); |
---|
30 | system("killall ubireader_extract_files"); |
---|
31 | } |
---|
32 | Multi_Image_thread = NULL; |
---|
33 | } |
---|
34 | |
---|
35 | |
---|
36 | char* find_multiimage_dev() |
---|
37 | { |
---|
38 | char* mdev = NULL; |
---|
39 | char* path = NULL; |
---|
40 | |
---|
41 | char* pos = NULL; |
---|
42 | FILE* fd = NULL; |
---|
43 | char* fileline = NULL; |
---|
44 | fd = fopen("/proc/partitions", "r"); |
---|
45 | if(fd == NULL) |
---|
46 | { |
---|
47 | err("open /proc/partitions"); |
---|
48 | return NULL; |
---|
49 | } |
---|
50 | fileline = malloc(MINMALLOC); |
---|
51 | if(fileline == NULL) |
---|
52 | { |
---|
53 | err("no mem"); |
---|
54 | return NULL; |
---|
55 | } |
---|
56 | while(fgets(fileline, MINMALLOC, fd) != NULL) |
---|
57 | { |
---|
58 | pos = ostrstr(fileline, "sd"); |
---|
59 | if(pos != NULL) |
---|
60 | { |
---|
61 | pos = string_newline(pos); |
---|
62 | if(strlen(pos) == 4) |
---|
63 | { |
---|
64 | path = getconfig("mountpath", NULL); |
---|
65 | path = ostrcat(path, "/", 0, 0); |
---|
66 | path = ostrcat(path, pos, 1, 0); |
---|
67 | path = ostrcat(path, "/", 1, 0); |
---|
68 | path = ostrcat(path, "titan_multi", 1, 0); |
---|
69 | if(file_exist(path) == 1) |
---|
70 | { |
---|
71 | mdev = ostrcat(mdev, pos, 1, 0); |
---|
72 | } |
---|
73 | free(path); path = NULL; |
---|
74 | } |
---|
75 | } |
---|
76 | if(mdev != NULL) |
---|
77 | break; |
---|
78 | } |
---|
79 | free(fileline); |
---|
80 | fclose(fd); |
---|
81 | |
---|
82 | return mdev; |
---|
83 | } |
---|
84 | |
---|
85 | |
---|
86 | char* get_dir(char* path) |
---|
87 | { |
---|
88 | struct dirent* dirzeiger; |
---|
89 | char* dirall = NULL; |
---|
90 | DIR *dir = opendir(path); |
---|
91 | if (dir != 0) |
---|
92 | { |
---|
93 | struct dirent* dirzeiger; |
---|
94 | while(0 != (dirzeiger = readdir(dir))) |
---|
95 | { |
---|
96 | if(dirzeiger->d_name[0] != '.') |
---|
97 | { |
---|
98 | dirall = ostrcat(dirall, dirzeiger->d_name, 1, 0); |
---|
99 | dirall = ostrcat(dirall, " \n", 1, 0); |
---|
100 | } |
---|
101 | } |
---|
102 | closedir(dir); |
---|
103 | } |
---|
104 | return dirall; |
---|
105 | } |
---|
106 | |
---|
107 | |
---|
108 | int no_mdev() |
---|
109 | { |
---|
110 | char* mdev = NULL; |
---|
111 | char* path = NULL; |
---|
112 | char* dirall = NULL; |
---|
113 | char* cmd = NULL; |
---|
114 | struct skin* tmp = NULL; |
---|
115 | int ret = 0; |
---|
116 | int rcret = 0; |
---|
117 | |
---|
118 | struct skin* multipart = getscreen("multipart"); |
---|
119 | struct skin* listbox = getscreennode(multipart, "listbox"); |
---|
120 | struct skin* device = getscreennode(multipart, "device"); |
---|
121 | struct skin* text2 = getscreennode(multipart, "textbox2"); |
---|
122 | |
---|
123 | char* pos = NULL; |
---|
124 | FILE* fd = NULL; |
---|
125 | char* fileline = NULL; |
---|
126 | fd = fopen("/proc/partitions", "r"); |
---|
127 | if(fd == NULL) |
---|
128 | { |
---|
129 | err("open /proc/partitions"); |
---|
130 | return 1; |
---|
131 | } |
---|
132 | fileline = malloc(MINMALLOC); |
---|
133 | if(fileline == NULL) |
---|
134 | { |
---|
135 | err("no mem"); |
---|
136 | return 1; |
---|
137 | } |
---|
138 | while(fgets(fileline, MINMALLOC, fd) != NULL) |
---|
139 | { |
---|
140 | pos = ostrstr(fileline, "sd"); |
---|
141 | if(pos != NULL) |
---|
142 | { |
---|
143 | pos = string_newline(pos); |
---|
144 | if(strlen(pos) == 4) |
---|
145 | { |
---|
146 | if(mdev == NULL) |
---|
147 | mdev = ostrcat(mdev, pos, 1, 0); |
---|
148 | addchoicebox(device, pos, pos); |
---|
149 | } |
---|
150 | } |
---|
151 | } |
---|
152 | free(fileline); |
---|
153 | fclose(fd); |
---|
154 | if(mdev == NULL) |
---|
155 | { |
---|
156 | textbox("MultiImage", "No device available", _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 500, 200, 0, 0); |
---|
157 | return 1; |
---|
158 | } |
---|
159 | setchoiceboxselection(device, mdev); |
---|
160 | path = getconfig("mountpath", NULL); |
---|
161 | path = ostrcat(path, "/", 0, 0); |
---|
162 | path = ostrcat(path, mdev, 1, 0); |
---|
163 | |
---|
164 | dirall = get_dir(path); |
---|
165 | free(path); path = NULL; |
---|
166 | |
---|
167 | changetext(text2, dirall); |
---|
168 | free(dirall); dirall = NULL; |
---|
169 | |
---|
170 | free(mdev); mdev=NULL; |
---|
171 | |
---|
172 | drawscreen(multipart, 0, 0); |
---|
173 | addscreenrc(multipart, listbox); |
---|
174 | tmp = listbox->select; |
---|
175 | while(1) |
---|
176 | { |
---|
177 | addscreenrc(multipart, tmp); |
---|
178 | rcret = waitrc(multipart, 2000, 0); |
---|
179 | tmp = listbox->select; |
---|
180 | if(rcret == getrcconfigint("rcexit", NULL)) break; |
---|
181 | |
---|
182 | if((rcret == getrcconfigint("rcleft", NULL) || rcret == getrcconfigint("rcright", NULL)) && listbox->select != NULL && ostrcmp(listbox->select->name, "device") == 0) |
---|
183 | { |
---|
184 | mdev = ostrcat(mdev, device->ret, 1, 0); |
---|
185 | path = getconfig("mountpath", NULL); |
---|
186 | path = ostrcat(path, "/", 0, 0); |
---|
187 | path = ostrcat(path, mdev, 1, 0); |
---|
188 | dirall = get_dir(path); |
---|
189 | free(path); path = NULL; |
---|
190 | changetext(text2, dirall); |
---|
191 | free(dirall); dirall = NULL; |
---|
192 | free(mdev); mdev = NULL; |
---|
193 | } |
---|
194 | |
---|
195 | if(rcret == getrcconfigint("rcblue", NULL)) |
---|
196 | { |
---|
197 | mdev = ostrcat(mdev, device->ret, 1, 0); |
---|
198 | cmd = ostrcat("umount /dev/", mdev, 0, 0); |
---|
199 | debug(81, "unmount cmd: %s", cmd); |
---|
200 | ret = system(cmd); |
---|
201 | free(cmd); cmd = NULL; |
---|
202 | break; |
---|
203 | } |
---|
204 | drawscreen(multipart, 0, 0); |
---|
205 | } |
---|
206 | delownerrc(multipart); |
---|
207 | clearscreen(multipart); |
---|
208 | |
---|
209 | if(mdev == NULL) |
---|
210 | return 1; |
---|
211 | |
---|
212 | if(textbox("MultiImage", "All data on this device will be deleted!\nOK?", _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0) == 2) |
---|
213 | { |
---|
214 | free(mdev); mdev = NULL; |
---|
215 | return 1; |
---|
216 | } |
---|
217 | //cmd = ostrcat("/sbin/cmd.sh mkfs.ext2.gui /dev/" , mdev, 0, 0); |
---|
218 | cmd = ostrcat("mkfs.ext2.gui /dev/" , mdev, 0, 0); |
---|
219 | debug(81, "format cmd: %s", cmd); |
---|
220 | ret = system(cmd); |
---|
221 | free(cmd); cmd = NULL; |
---|
222 | if(ret != 0) |
---|
223 | { |
---|
224 | textbox(_("Message"), _("ERROR\nPartition could not be created"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 500, 200, 0, 0); |
---|
225 | return 1; |
---|
226 | } |
---|
227 | path = getconfig("mountpath", NULL); |
---|
228 | path = ostrcat(path, "/", 0, 0); |
---|
229 | path = ostrcat(path, mdev, 1, 0); |
---|
230 | cmd = ostrcat("mount /dev/" , mdev, 0, 0); |
---|
231 | cmd = ostrcat(cmd, " ", 1, 0); |
---|
232 | cmd = ostrcat(cmd, path, 1, 0); |
---|
233 | //system(cmd); |
---|
234 | free(cmd); cmd = NULL; |
---|
235 | cmd = ostrcat(path, "/", 0, 0); |
---|
236 | cmd = ostrcat(cmd, "titan_multi", 0, 0); |
---|
237 | mkdir(cmd, 777); |
---|
238 | free(cmd); cmd = NULL; |
---|
239 | free(path); path = NULL; |
---|
240 | free(mdev); mdev = NULL; |
---|
241 | |
---|
242 | return 0; |
---|
243 | } |
---|
244 | |
---|
245 | int multiimage_screen(char* mdev) |
---|
246 | { |
---|
247 | struct skin* tmp = NULL; |
---|
248 | char* path = NULL; |
---|
249 | char* cmd = NULL; |
---|
250 | struct dirent* dirzeiger; |
---|
251 | DIR *dir = NULL; |
---|
252 | int rcret = 0; |
---|
253 | int rc = 0; |
---|
254 | int test = 0; |
---|
255 | |
---|
256 | struct skin* multiimage = getscreen("multiimage"); |
---|
257 | struct skin* listbox = getscreennode(multiimage, "listbox"); |
---|
258 | struct skin* images = getscreennode(multiimage, "images"); |
---|
259 | struct skin* chnode1 = NULL; |
---|
260 | |
---|
261 | path = getconfig("mountpath", NULL); |
---|
262 | path = ostrcat(path, "/", 0, 0); |
---|
263 | path = ostrcat(path, mdev, 1, 0); |
---|
264 | path = ostrcat(path, "/", 1, 0); |
---|
265 | path = ostrcat(path,"titan_multi", 1, 0); |
---|
266 | |
---|
267 | delmarkedscreennodes(multiimage, 1); |
---|
268 | listbox->aktpage = -1; |
---|
269 | listbox->aktline = 1; |
---|
270 | |
---|
271 | dir = opendir(path); |
---|
272 | if (dir != 0) |
---|
273 | { |
---|
274 | while(0 != (dirzeiger = readdir(dir))) |
---|
275 | { |
---|
276 | if(dirzeiger->d_name[0] != '.') |
---|
277 | { |
---|
278 | test = 1; |
---|
279 | chnode1 = addlistbox(multiimage, listbox, chnode1, 1); |
---|
280 | if(chnode1 != NULL) |
---|
281 | { |
---|
282 | chnode1->posy = images->posy; |
---|
283 | chnode1->width = images->width; |
---|
284 | chnode1->height = images->height; |
---|
285 | chnode1->bordersize = images->bordersize; |
---|
286 | chnode1->bordercol = images->bordercol; |
---|
287 | chnode1->prozwidth = images->prozwidth; |
---|
288 | chnode1->deaktivcol = images->deaktivcol; |
---|
289 | chnode1->name = ostrcat(dirzeiger->d_name, NULL, 0, 0); |
---|
290 | changetext(chnode1, dirzeiger->d_name); |
---|
291 | } |
---|
292 | } |
---|
293 | } |
---|
294 | closedir(dir); |
---|
295 | if(test == 0) |
---|
296 | images->hidden = NO; |
---|
297 | else |
---|
298 | images->hidden = YES; |
---|
299 | } |
---|
300 | drawscreen(multiimage, 0, 0); |
---|
301 | addscreenrc(multiimage, listbox); |
---|
302 | tmp = listbox->select; |
---|
303 | while(1) |
---|
304 | { |
---|
305 | addscreenrc(multiimage, tmp); |
---|
306 | rcret = waitrc(multiimage, 2000, 0); |
---|
307 | tmp = listbox->select; |
---|
308 | if(rcret == getrcconfigint("rcexit", NULL)) |
---|
309 | { |
---|
310 | rc = 0; |
---|
311 | break; |
---|
312 | } |
---|
313 | if(rcret == getrcconfigint("rcred", NULL)) |
---|
314 | { |
---|
315 | if(listbox->select != NULL) |
---|
316 | { |
---|
317 | rc = 1; |
---|
318 | cmd = ostrcat("Soll Image ", listbox->select->name, 0, 0); |
---|
319 | cmd = ostrcat(cmd, " wirklich gelöscht werden?", 1, 0); |
---|
320 | if(textbox("MultiImage", cmd, _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0) == 1) |
---|
321 | { |
---|
322 | free(cmd); cmd= NULL; |
---|
323 | cmd = ostrcat("rm -r " , path, 0, 0); |
---|
324 | cmd = ostrcat(cmd , "/", 1, 0); |
---|
325 | cmd = ostrcat(cmd , listbox->select->name, 1, 0); |
---|
326 | debug(81, "delete cmd: %s", cmd); |
---|
327 | system(cmd); |
---|
328 | } |
---|
329 | free(cmd); cmd= NULL; |
---|
330 | break; |
---|
331 | } |
---|
332 | } |
---|
333 | if(rcret == getrcconfigint("rcgreen", NULL)) |
---|
334 | { |
---|
335 | rc = 2; |
---|
336 | break; |
---|
337 | } |
---|
338 | if(rcret == getrcconfigint("rcblue", NULL)) |
---|
339 | { |
---|
340 | rc = 3; |
---|
341 | break; |
---|
342 | } |
---|
343 | drawscreen(multiimage, 0, 0); |
---|
344 | } |
---|
345 | delownerrc(multiimage); |
---|
346 | delmarkedscreennodes(multiimage, 1); |
---|
347 | clearscreen(multiimage); |
---|
348 | free(path); path=NULL; |
---|
349 | |
---|
350 | return rc; |
---|
351 | } |
---|
352 | |
---|
353 | int multiimage_install(char* imagefile, char* mdev) |
---|
354 | { |
---|
355 | int rcret = 0; |
---|
356 | int rc = 0; |
---|
357 | char* path = NULL; |
---|
358 | char* path2 = NULL; |
---|
359 | char* path3 = NULL; |
---|
360 | char* cmd = NULL; |
---|
361 | char* tmp = NULL; |
---|
362 | char* iname = NULL; |
---|
363 | |
---|
364 | struct skin* tmp = NULL; |
---|
365 | struct skin* multiinstall = getscreen("multiinstall"); |
---|
366 | struct skin* listbox = getscreennode(multiinstall, "listbox"); |
---|
367 | struct skin* text1 = getscreennode(multiinstall, "text1"); |
---|
368 | struct skin* imagename = getscreennode(multiinstall, "imagename"); |
---|
369 | |
---|
370 | path = getconfig("mountpath", NULL); |
---|
371 | path = ostrcat(path, "/", 0, 0); |
---|
372 | path = ostrcat(path, mdev, 1, 0); |
---|
373 | |
---|
374 | path2 = ostrcat(path, "/", 0, 0); |
---|
375 | path2 = ostrcat(path2,"titan_multi", 1, 0); |
---|
376 | |
---|
377 | changetext(text1, imagefile); |
---|
378 | changeinput(imagename, "imagename"); |
---|
379 | |
---|
380 | drawscreen(multiinstall, 0, 0); |
---|
381 | addscreenrc(multiinstall, listbox); |
---|
382 | tmp = listbox->select; |
---|
383 | while(1) |
---|
384 | { |
---|
385 | addscreenrc(multiinstall, tmp); |
---|
386 | rcret = waitrc(multiinstall, 2000, 0); |
---|
387 | tmp = listbox->select; |
---|
388 | if(rcret == getrcconfigint("rcexit", NULL)) |
---|
389 | break; |
---|
390 | if(rcret == getrcconfigint("rcred", NULL)) |
---|
391 | { |
---|
392 | path3 = ostrcat(path2, "/", 0, 0); |
---|
393 | path3 = ostrcat(path3, imagename->ret, 1, 0); |
---|
394 | if(file_exist(path3) == 1) |
---|
395 | { |
---|
396 | free(path3); path3=NULL; |
---|
397 | textbox(_("Message"), _("ERROR\nImage already present!"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 500, 200, 0, 0); |
---|
398 | continue; |
---|
399 | } |
---|
400 | textbox(_("Message"), _("INFO\nExtracting will take a few minutes ..."), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0); |
---|
401 | iname = ostrcat(imagename->ret, NULL, 1, 0); |
---|
402 | rc = 1; |
---|
403 | break; |
---|
404 | } |
---|
405 | drawscreen(multiinstall, 0, 0); |
---|
406 | } |
---|
407 | delownerrc(multiinstall); |
---|
408 | clearscreen(multiinstall); |
---|
409 | if(rc == 1) |
---|
410 | { |
---|
411 | tmp = createpluginpath("/multiimage/ubireader/ubi_reader-master/scripts/ubireader_extract_files", 0); |
---|
412 | cmd = createpluginpath("/multiimage/multi_unpack.sh", 0); |
---|
413 | cmd = ostrcat(cmd, " ", 1, 0); |
---|
414 | cmd = ostrcat(cmd, imagefile, 1, 0); |
---|
415 | cmd = ostrcat(cmd, " ", 1, 0); |
---|
416 | cmd = ostrcat(cmd, iname, 1, 0); |
---|
417 | cmd = ostrcat(cmd, " ", 1, 0); |
---|
418 | cmd = ostrcat(cmd, path, 1, 0); |
---|
419 | cmd = ostrcat(cmd, " ", 1, 0); |
---|
420 | cmd = ostrcat(cmd, tmp, 1, 0); |
---|
421 | cmd = ostrcat(cmd, " &", 1, 0); |
---|
422 | system(cmd); |
---|
423 | free(cmd); cmd=NULL; |
---|
424 | free(tmp); cmd=NULL; |
---|
425 | textbox(_("Message"), _("INFO\nExtracting process is running in background.\nA message will be shown when finished."), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 250, 10, 0); |
---|
426 | |
---|
427 | Multi_Image_thread = addtimer(&multiimage_thread, START, 10000, 1, NULL, NULL, NULL); |
---|
428 | } |
---|
429 | |
---|
430 | free(path); path=NULL; |
---|
431 | free(path2); path2=NULL; |
---|
432 | free(path3); path3=NULL; |
---|
433 | return rc; |
---|
434 | } |
---|
435 | |
---|
436 | void multi_main(void) |
---|
437 | { |
---|
438 | char* mdev = NULL; |
---|
439 | char* imagefile = NULL; |
---|
440 | int ret = 0; |
---|
441 | |
---|
442 | mdev = find_multiimage_dev(); |
---|
443 | |
---|
444 | while (mdev == NULL) |
---|
445 | { |
---|
446 | if(textbox("MultiImage", "No MultiImage device found.\nCreate device?", _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 500, 200, 0, 0) == 2) |
---|
447 | return; |
---|
448 | if(no_mdev() != 0) |
---|
449 | return; |
---|
450 | mdev = find_multiimage_dev(); |
---|
451 | } |
---|
452 | while(1) |
---|
453 | { |
---|
454 | ret = multiimage_screen(mdev); |
---|
455 | |
---|
456 | if(ret == 0) |
---|
457 | break; |
---|
458 | if(ret == 2) |
---|
459 | { |
---|
460 | imagefile = screendir("/tmp", "*.zip", NULL, NULL, NULL, NULL, 0, "SELECT", 0, NULL, 0, NULL, 0, 1200, 0, 600, 0, 0); |
---|
461 | if(imagefile != NULL) |
---|
462 | { |
---|
463 | ret = multiimage_install(imagefile, mdev); |
---|
464 | free(imagefile); imagefile=NULL; |
---|
465 | if(ret == 1) |
---|
466 | return; |
---|
467 | } |
---|
468 | } |
---|
469 | if(ret == 3) |
---|
470 | { |
---|
471 | if(no_mdev() != 0) |
---|
472 | continue; |
---|
473 | free(mdev); mdev=NULL; |
---|
474 | mdev = find_multiimage_dev(); |
---|
475 | } |
---|
476 | } |
---|
477 | free(mdev); mdev=NULL; |
---|
478 | } |
---|
479 | |
---|
480 | |
---|
481 | |
---|
482 | //wird beim laden ausgefuehrt |
---|
483 | void init(void) |
---|
484 | { |
---|
485 | char* tmpstr = NULL; |
---|
486 | pluginaktiv = 1; |
---|
487 | |
---|
488 | tmpstr = createpluginpath("/multiimage/skin.xml", 0); |
---|
489 | readscreen(tmpstr, 122, 1); |
---|
490 | |
---|
491 | debug(10, "MultiImage Plugin loaded!!!"); |
---|
492 | } |
---|
493 | |
---|
494 | //wird beim entladen ausgefuehrt |
---|
495 | void deinit(void) |
---|
496 | { |
---|
497 | if(Multi_Image_thread != NULL) |
---|
498 | { |
---|
499 | Multi_Image_thread->aktion = STOP; |
---|
500 | while (Multi_Image_thread != NULL) |
---|
501 | { |
---|
502 | sleep(1); |
---|
503 | } |
---|
504 | } |
---|
505 | pluginaktiv = 0; |
---|
506 | debug(10, "MultiImage removed !!!"); |
---|
507 | delmarkedscreen(122); |
---|
508 | } |
---|
509 | |
---|
510 | //wird in der Pluginverwaltung bzw Menue ausfeguehrt |
---|
511 | void start(void) |
---|
512 | { |
---|
513 | if(Multi_Image_thread != NULL) |
---|
514 | { |
---|
515 | if(textbox("MultiImage", "Image creation running!!!\nStop process?", _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 500, 200, 0, 0) == 2) |
---|
516 | return; |
---|
517 | Multi_Image_thread->aktion = STOP; |
---|
518 | struct skin* load = getscreen("loading"); |
---|
519 | drawscreen(load, 0, 0); |
---|
520 | while (Multi_Image_thread != NULL) |
---|
521 | { |
---|
522 | sleep(1); |
---|
523 | } |
---|
524 | clearscreen(load); |
---|
525 | } |
---|
526 | |
---|
527 | multi_main(); |
---|
528 | } |
---|