Changeset 38559 for titan/titan/skin.h


Ignore:
Timestamp:
09/04/16 17:03:16 (7 years ago)
Author:
obi
Message:

fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/skin.h

    r38558 r38559  
    361361{
    362362        int ret = -1;
    363         char *buf = NULL, *tmpstr = NULL;
    364         tmpstr = ostrcat(value, NULL, 0, 0);
     363        char *buf = NULL;
    365364
    366365        if(strcasecmp(value, "left") == 0)
     
    432431        else if(strcasecmp(value, "minitvsize") == 0)
    433432        {
    434                 free(tmpstr), tmpstr = NULL;
    435433                if(getskinconfigint("minitv", NULL) == 1)
    436                         tmpstr = ostrcat("100%", NULL, 0, 0);
     434                        value = getskinconfig("minitvsizemax", NULL);
    437435                else
    438                         tmpstr = getskinconfig(value, NULL);
    439 printf("11111111=%s tmpstr=%s ret=%d\n", value, tmpstr, ret);
    440 
     436                        value = getskinconfig(value, NULL);
     437
     438                if(value == NULL)
     439                        value = ostrcat("100%", NULL, 0, 0);
    441440        }
    442441
    443442        if(proz != NULL && ret == -1)
    444443        {
    445                 buf = strchr(tmpstr, '%');
    446 
     444                buf = strchr(value, '%');
    447445                if(buf != NULL)
    448446                {
    449447                        buf[0] = '\0';
    450                         ret = atoi(tmpstr);
     448                        ret = atoi(value);
    451449                        *proz = 1;
    452450                        buf[0] = '%';
    453451                }
    454452                else
    455                         ret = atoi(tmpstr);
    456         }
    457 //      free(tmpstr), tmpstr = NULL;
     453                        ret = atoi(value);
     454        }
     455        printf("55555555\n");
    458456
    459457        return ret;
    460458}
     459
    461460
    462461struct skin* checkscreen(char* screenname)
     
    32793278        node->flag = setbit(node->flag, 0);
    32803279
    3281         if(node->name != NULL && ostrstr(node->name, "minitvbg") != NULL && getskinconfigint("minitv", NULL) == 1)
    3282         {
    3283                 printf("hid node: %s\n", node->name );
    3284                 node->hidden = YES;
    3285         }
    3286 
    32873280        if(node->bordersize > 0)
    32883281        {
     
    40204013                                        free(status.drawallwaysbg[i]);
    40214014                                status.drawallwaysbg[i] = savescreen(status.drawallways[i]);
     4015       
    40224016                                ret = drawscreen(status.drawallways[i], screencalc, 1);
    40234017                        }
     
    40374031                drawnode(node, 1);
    40384032        drawscreenalways(node, screencalc);
     4033
    40394034        blitfb(0);
    40404035        m_unlock(&status.drawingmutex, 0);
     
    42714266                        parent = oldparent;
    42724267
     4268                // hid minitvbg
     4269                if(child->name != NULL && ostrstr(child->name, "minitvbg") != NULL && getskinconfigint("minitv", NULL) == 1)
     4270                        child->hidden = YES;
     4271
    42734272                if(setnodeattr(child, parent, screencalc) == 0 && screencalc == 0)
    42744273                        drawnode(child, 1);
Note: See TracChangeset for help on using the changeset viewer.