Changeset 15298
- Timestamp:
- 04/16/12 21:34:50 (12 years ago)
- Location:
- titan/titan
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/filelist.h
r15285 r15298 521 521 posx += child->width; 522 522 523 if( (cmpfilenameext(filelist[i]->d_name, ".jpg") == 0) || (cmpfilenameext(filelist[i]->d_name, ".png") == 0))523 if(cmpfilenameext(filelist[i]->d_name, ".png") == 0) 524 524 { 525 525 tmpstr = ostrcat(createpath(node->input, "/"), filelist[i]->d_name, 1, 0); … … 528 528 child->picwidth = 1; 529 529 child->picheight = 1; 530 } 531 else if(cmpfilenameext(filelist[i]->d_name, ".jpg") == 0) 532 { 533 if(status.createthumb == 1) 534 { 535 //check if thumb exists 536 tmpstr = checkthumb(node->input, filelist[i]->d_name); 537 if(tmpstr == NULL) 538 { 539 addqueue(101, ostrcat((void*)node->input, NULL, 0, 0), strlen(node->input) + 1, ostrcat((void*)filelist[i]->d_name, NULL, 0, 0), strlen(filelist[i]->d_name) + 1, 0, NULL); 540 tmpstr = ostrcat(tmpstr, "skin/ext_grid_dummy.png", 1, 0); 541 child->picheight = 180; 542 child->picwidth = 180; 543 } 544 else 545 { 546 child->picwidth = 1; 547 child->picheight = 1; 548 } 549 } 530 550 } 531 551 else if(cmpfilenameext(filelist[i]->d_name, ".iso") == 0) … … 568 588 { 569 589 debug(10, "files: change pic"); 570 if(cmpfilenameext(filelist[i]->d_name, ".jpg") == 0) 571 { 572 char* thumbfile = NULL; 573 if(status.createthumb == 1) 574 { 575 //check if thumb exists 576 thumbfile = checkthumb(node->input, tmpstr); 577 if(thumbfile != NULL) 578 { 579 free(tmpstr); 580 tmpstr = thumbfile; 581 } 582 else 583 addqueue(101, ostrcat((void*)node->input, NULL, 0, 0), strlen(node->input) + 1, ostrcat((void*)tmpstr, NULL, 0, 0), strlen(tmpstr) + 1, 0, NULL); 584 } 585 changepic(child, tmpstr); 586 } 590 changepic(child, tmpstr); 587 591 free(tmpstr); tmpstr = NULL; 588 592 } -
titan/titan/thumb.h
r15297 r15298 31 31 while(qe != NULL) 32 32 { 33 buf = loadjpg((char*) qe->data, &width, &height, 16);33 buf = loadjpg((char*)ostrcat(createpath(qe->data, "/"), qe->data1, 0, 0), &width, &height, 16); 34 34 if(buf != NULL) 35 35 { … … 44 44 thumbfile = ostrcat(thumbfile, (char*)qe->data1, 1, 0); 45 45 46 debug(307, "create thumb: %s from %s ", thumbfile, (char*)qe->data);46 debug(307, "create thumb: %s from %s/%s", thumbfile, (char*)qe->data, (char*)qe->data1); 47 47 savejpg(thumbfile, 100, 100, buf); 48 48 }
Note: See TracChangeset
for help on using the changeset viewer.