Changeset 15272 for titan/titan


Ignore:
Timestamp:
04/15/12 02:53:11 (12 years ago)
Author:
nit
Message:

[titan] hold bgpic in memory

Location:
titan/titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/defaults.h

    r15271 r15272  
    7777        status.listboxselecttype = getskinconfigint("listboxselecttype", NULL);
    7878        status.borderradius = getskinconfigint("borderradius", NULL);
    79         status.bgpic = getskinconfig("bgpic", NULL);
    8079        status.httpauth = ostrcat(getconfig("httpauth", NULL), NULL, 0, 0);
    8180        status.showchanneltimeline = getconfigint("showchanneltimeline", NULL);
     
    8685        status.topoffset = getconfigint("fbtopoffset", NULL);
    8786        status.bottomoffset = getconfigint("fbbottomoffset", NULL);
     87       
     88        status.bgpic = getskinconfig("bgpic", NULL);
     89        if(status.bgpic != NULL)
     90        {
     91                unsigned long width = 0, height = 0, rowbytes = 0;
     92                int channels = 0, memfd = -1, length = 0;
     93                unsigned char* buf = NULL;
     94               
     95                status.bgpic = changepicpath(status.bgpic);
     96               
     97                length = strlen(status.bgpic);
     98                if(status.bgpic[length - 1] == 'g' && status.bgpic[length - 2] == 'n' && status.bgpic[length - 3] == 'p')
     99                {
     100                        buf = readpng(status.bgpic, &width, &height, &rowbytes, &channels, 0, 0, 0, 0, 0, 0);
     101                        addpic(status.bgpic, buf, memfd, width, height, rowbytes, channels, del, NULL);
     102                }
     103        }
    88104
    89105        for(i = 0; i < MAXLONGKEY; i++)
  • titan/titan/titan.c

    r15237 r15272  
    311311                free(status.boxtype);
    312312                free(status.httpauth);
     313                free(status.bgpic);
    313314
    314315                freeservice();
Note: See TracChangeset for help on using the changeset viewer.