Changeset 38709


Ignore:
Timestamp:
09/11/16 11:07:42 (7 years ago)
Author:
obi
Message:

change skinstyle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/skinadjust.h

    r38702 r38709  
    154154        setchoiceboxselection(channellist_sel, getskinconfig("channellist_selection", NULL));
    155155
    156         if(file_exist(getconfig("skinpath", NULL)))
     156        char* skinpath = NULL;
     157        if(ostrcmp(getconfig("skinpath", NULL), "/var/usr/local/share/titan/skin/default") != 0)
     158                skinpath = ostrcat("/mnt/config", NULL, 0, 0);
     159        else
     160                skinpath = ostrcat(getconfig("skinpath", NULL), NULL, 0, 0);
     161
     162        if(file_exist(skinpath))
    157163        {
    158164                delmarkedscreennodes(skinadjust, FILELISTDELMARK);
    159                 changeinput(filelist, getconfig("skinpath", NULL));
     165                changeinput(filelist, skinpath);
    160166                changemask(filelist, "*");
    161167                createfilelist(skinadjust, filelist, 0);
     
    477483                                        cmd = ostrcat(cmd, getconfig("skinconfig", NULL), 1, 0);
    478484                                        cmd = ostrcat(cmd, " \"", 1, 0);
    479                                         cmd = ostrcat(cmd, getconfig("skinpath", NULL), 1, 0);
    480                                         cmd = ostrcat(cmd, "/skinconfig.user.", 1, 0);
     485                                        cmd = ostrcat(cmd, skinpath, 1, 0);
     486                                        cmd = ostrcat(cmd, "/skinconfig.", 1, 0);
    481487                                        cmd = ostrcat(cmd, search, 1, 0);
    482488                                        cmd = ostrcat(cmd, "\"", 1, 0);
     
    499505                        if(ostrcmp(skinstyle_sel->ret, "skinconfig.default") != 0)
    500506                        {
    501                                 tmpstr = string_replace("skinconfig.user.", "", skinstyle_sel->ret, 0);
     507                                tmpstr = string_replace("skinconfig.", "", skinstyle_sel->ret, 0);
    502508                                char* msg = ostrcat(_("Remove Skinstyle"), NULL, 0, 0);
    503509                                msg = ostrcat(msg, " '", 1, 0);
     
    510516                                        char* cmd = NULL;
    511517                                        cmd = ostrcat(cmd, "rm \"", 1, 0);
    512                                         cmd = ostrcat(cmd, getconfig("skinpath", NULL), 1, 0);
     518                                        cmd = ostrcat(cmd, skinpath, 1, 0);
    513519                                        cmd = ostrcat(cmd, "/", 1, 0);
    514520                                        cmd = ostrcat(cmd, skinstyle_sel->ret, 1, 0);
     
    910916                                char* cmd = NULL;
    911917                                cmd = ostrcat(cmd, "cp -a ", 1, 0);
    912                                 cmd = ostrcat(cmd, getconfig("skinpath", NULL), 1, 0);
     918                                cmd = ostrcat(cmd, skinpath, 1, 0);
    913919                                cmd = ostrcat(cmd, "/", 1, 0);
    914920                                cmd = ostrcat(cmd, skinstyle_sel->ret, 1, 0);
     
    960966                        writeskinconfigtmp();
    961967
     968                        if(ostrcmp(skinstyle_sel->ret, "skinconfig.default") != 0)
     969                        {
     970                                char* cmd = NULL;
     971                                cmd = ostrcat(cmd, "cp -a ", 1, 0);
     972                                cmd = ostrcat(cmd, getconfig("skinconfig", NULL), 1, 0);
     973                                cmd = ostrcat(cmd, " ", 1, 0);
     974                                cmd = ostrcat(cmd, skinpath, 1, 0);
     975                                cmd = ostrcat(cmd, "/", 1, 0);
     976                                cmd = ostrcat(cmd, skinstyle_sel->ret, 1, 0);
     977                                printf("cmd: %s\n", cmd);
     978                                system(cmd);
     979                                free(cmd); cmd = NULL;
     980                        }
     981
    962982                        if(reboot == 1)
    963983                        {
Note: See TracChangeset for help on using the changeset viewer.