Changeset 23970


Ignore:
Timestamp:
09/28/13 19:17:50 (9 years ago)
Author:
nit
Message:

[titan] update picons

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/global.h

    r23914 r23970  
    16911691char* createpiconpath(struct channel* chnode, int flag)
    16921692{
    1693         char* tmpstr = NULL, *tmpnr = NULL;
     1693        char* tmpstr = NULL, *picon = NULL;
    16941694
    16951695        if(chnode != NULL)
    16961696        {
    1697                 tmpstr = ostrcat(tmpstr, getconfig("piconpath", NULL), 1, 0);
    1698                 if(flag==1)
    1699                         tmpstr = ostrcat(tmpstr, "/alternate/", 1, 0);
     1697                picon = ostrcat("/", oitoa(chnode->serviceid), 0, 1);
     1698                picon = ostrcat(picon, "-", 1, 0);
     1699                picon = ostrcat(picon, ollutoa(chnode->transponderid), 1, 1);
     1700                picon = ostrcat(picon, ".png", 1, 0);
     1701
     1702                if(flag == 1)
     1703                        tmpstr = ostrcat("/mnt/swapextensions/usr/local/share/titan/picons/alternate", picon, 1, 0);
    17001704                else
    1701                         tmpstr = ostrcat(tmpstr, "/", 1, 0);
    1702                 tmpnr = oitoa(chnode->serviceid);
    1703                 tmpstr = ostrcat(tmpstr, tmpnr, 1, 1);
    1704                 tmpnr = NULL;
    1705                 tmpstr = ostrcat(tmpstr, "-", 1, 0);
    1706                 tmpnr = ollutoa(chnode->transponderid);
    1707                 tmpstr = ostrcat(tmpstr, tmpnr, 1, 1);
    1708                 tmpnr = NULL;
    1709                 tmpstr = ostrcat(tmpstr, ".png", 1, 0);
    1710         }
    1711         if(!isfile(tmpstr))
    1712         {
     1705                        tmpstr = ostrcat("/mnt/swapextensions/usr/local/share/titan/picons", picon, 1, 0);
     1706                if(isfile(tmpstr))
     1707                {
     1708                        free(picon);
     1709                        return tmpstr;
     1710                }
     1711               
    17131712                free(tmpstr); tmpstr = NULL;
    1714                 //tmpstr = ostrcat(tmpstr, getconfig("piconpath", NULL), 1, 0);
    1715                 //tmpstr = ostrcat(tmpstr, "/", 1, 0);
    1716                 //tmpstr = ostrcat(tmpstr, "default.png", 1, 0);
    1717                 tmpstr = ostrcat(tmpstr, getconfig("defskinpath", NULL), 1, 0);
    1718                 tmpstr = ostrcat(tmpstr, "/skin/", 1, 0);
    1719                 tmpstr = ostrcat(tmpstr, "defpicon.png", 1, 0);
    1720         }
    1721 
     1713                if(flag == 1)
     1714                        tmpstr = ostrcat("/var/swap/usr/local/share/titan/picons/alternate", picon, 1, 0);
     1715                else
     1716                        tmpstr = ostrcat("/var/swap/usr/local/share/titan/picons", picon, 1, 0);
     1717                if(isfile(tmpstr))
     1718                {
     1719                        free(picon);
     1720                        return tmpstr;
     1721                }
     1722               
     1723                free(tmpstr); tmpstr = NULL;
     1724                if(flag == 1)
     1725                        tmpstr = ostrcat("/var/usr/local/share/titan/picons/alternate", picon, 1, 0);
     1726                else
     1727                        tmpstr = ostrcat("/var/usr/local/share/titan/picons", picon, 1, 0);
     1728                if(isfile(tmpstr))
     1729                {
     1730                        free(picon);
     1731                        return tmpstr;
     1732                }
     1733        }
     1734       
     1735        free(tmpstr); tmpstr = NULL;
     1736        tmpstr = ostrcat(tmpstr, getconfig("defskinpath", NULL), 1, 0);
     1737        tmpstr = ostrcat(tmpstr, "/skin/", 1, 0);
     1738        tmpstr = ostrcat(tmpstr, "defpicon.png", 1, 0);
     1739
     1740        free(picon);
    17221741        return tmpstr;
    17231742}
Note: See TracChangeset for help on using the changeset viewer.