Changeset 15298


Ignore:
Timestamp:
04/16/12 21:34:50 (12 years ago)
Author:
obi
Message:

[titan] update grid jpg filelist

Location:
titan/titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/filelist.h

    r15285 r15298  
    521521                                                posx += child->width;
    522522
    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)
    524524                                                {
    525525                                                        tmpstr = ostrcat(createpath(node->input, "/"), filelist[i]->d_name, 1, 0);
     
    528528                                                        child->picwidth = 1;
    529529                                                        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                                                        }
    530550                                                }
    531551                                                else if(cmpfilenameext(filelist[i]->d_name, ".iso") == 0)
     
    568588                                                {
    569589                                                        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);
    587591                                                        free(tmpstr); tmpstr = NULL;
    588592                                                }
  • titan/titan/thumb.h

    r15297 r15298  
    3131                while(qe != NULL)
    3232                {
    33                         buf = loadjpg((char*)qe->data, &width, &height, 16);
     33                        buf = loadjpg((char*)ostrcat(createpath(qe->data, "/"), qe->data1, 0, 0), &width, &height, 16);         
    3434                        if(buf != NULL)
    3535                        {
     
    4444                                        thumbfile = ostrcat(thumbfile, (char*)qe->data1, 1, 0);
    4545
    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);
    4747                                        savejpg(thumbfile, 100, 100, buf);
    4848                                }
Note: See TracChangeset for help on using the changeset viewer.