Changeset 33160


Ignore:
Timestamp:
02/18/15 10:36:28 (8 years ago)
Author:
obi
Message:

add skinadjust default button

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/skinadjust.h

    r33039 r33160  
    1919        struct skin* tithek_selectcol = getscreennode(skinadjust, "tithek_selectcol");
    2020        struct skin* filelistselect = getscreennode(skinadjust, "filelistselect");
     21        struct skin* buttonbar_bgcol = getscreennode(skinadjust, "buttonbar_bgcol");
    2122        struct skin* buttonbar_bgcol2 = getscreennode(skinadjust, "buttonbar_bgcol2");
     23        struct skin* buttonbar_bordercol = getscreennode(skinadjust, "buttonbar_bordercol");
     24        struct skin* buttonbar_fontcol = getscreennode(skinadjust, "buttonbar_fontcol");
     25        struct skin* titlebar_bgcol = getscreennode(skinadjust, "titlebar_bgcol");
     26        struct skin* titlebar_bgcol2 = getscreennode(skinadjust, "titlebar_bgcol2");
     27        struct skin* titlebar_bordercol = getscreennode(skinadjust, "titlebar_bordercol");
     28        struct skin* titlebar_fontcol = getscreennode(skinadjust, "titlebar_fontcol");
    2229        struct skin* bgcol = getscreennode(skinadjust, "bgcol");
    2330        struct skin* bgcol2 = getscreennode(skinadjust, "bgcol2");
     
    3340        struct skin* pic1 = getscreennode(skinadjust, "pic1");
    3441        struct skin* pic2 = getscreennode(skinadjust, "pic2");
    35         struct skin* b4 = getscreennode(skinadjust, "b4");
     42        struct skin* b5 = getscreennode(skinadjust, "b5");
    3643
    3744        struct skin* tmp = NULL;
     
    132139
    133140//      addchoicebox(listboxselect, "0", _("press red"));
    134 
    135141        addchoicebox(listboxselect, "0", getskinconfig("markcol", NULL));
    136142        addchoicebox(tithek_selectcol, "1", getskinconfig("tithek_selectcol", NULL));
    137143        addchoicebox(filelistselect, "2", getskinconfig("filelistselect", NULL));
    138         addchoicebox(buttonbar_bgcol2, "3", getskinconfig("buttonbar_bgcol2", NULL));
    139         addchoicebox(bgcol, "3", getskinconfig("bgcol", NULL));
    140         addchoicebox(bgcol2, "4", getskinconfig("bgcol2", NULL));
    141         addchoicebox(fontcol, "5", getskinconfig("fontcol", NULL));
    142         addchoicebox(bordercol, "6", getskinconfig("bordercol", NULL));
    143         addchoicebox(progresscol, "7", getskinconfig("progresscol", NULL));
    144         addchoicebox(titlebgcol, "8", getskinconfig("titlebgcol", NULL));
    145         addchoicebox(markcol, "9", getskinconfig("markcol", NULL));
    146 
    147         b4->hidden = YES;
     144        addchoicebox(buttonbar_bgcol, "3", getskinconfig("buttonbar_bgcol", NULL));
     145        addchoicebox(buttonbar_bgcol2, "4", getskinconfig("buttonbar_bgcol2", NULL));
     146        addchoicebox(buttonbar_bordercol, "5", getskinconfig("buttonbar_bordercol", NULL));
     147        addchoicebox(buttonbar_fontcol, "6", getskinconfig("buttonbar_fontcol", NULL));
     148        addchoicebox(titlebar_bgcol, "7", getskinconfig("titlebar_bgcol", NULL));
     149        addchoicebox(titlebar_bgcol2, "8", getskinconfig("titlebar_bgcol2", NULL));
     150        addchoicebox(titlebar_bordercol, "9", getskinconfig("titlebar_bordercol", NULL));
     151        addchoicebox(titlebar_fontcol, "10", getskinconfig("titlebar_fontcol", NULL));
     152        addchoicebox(bgcol, "11", getskinconfig("bgcol", NULL));
     153        addchoicebox(bgcol2, "12", getskinconfig("bgcol2", NULL));
     154        addchoicebox(fontcol, "13", getskinconfig("fontcol", NULL));
     155        addchoicebox(bordercol, "14", getskinconfig("bordercol", NULL));
     156        addchoicebox(progresscol, "15", getskinconfig("progresscol", NULL));
     157        addchoicebox(titlebgcol, "16", getskinconfig("titlebgcol", NULL));
     158        addchoicebox(markcol, "17", getskinconfig("markcol", NULL));
     159
     160        b5->hidden = YES;
    148161
    149162        drawscreen(skinadjust, 0, 0);
     
    210223                if(rcret == getrcconfigint("rcred", NULL))
    211224                {
     225                        if(ostrstr(getconfig("skinpath", NULL), "/var/usr/local/share/titan/skin/default") != NULL)
     226                                cmd = ostrcat("cp -a /etc/titan.restore/mnt/config/skinconfig ", getconfig("skinconfig", NULL), 0, 0);
     227                        else
     228                        {
     229                                cmd = ostrcat(cmd, "cp -a ", 1, 0);
     230                                cmd = ostrcat(cmd, getconfig("skinpath", NULL), 1, 0);
     231                                cmd = ostrcat(cmd, "/skinconfig ", 1, 0);
     232                                cmd = ostrcat(cmd, getconfig("skinconfig", NULL), 1, 0);
     233                        }
     234                        printf("cmd: %cmd\n"); 
     235                        system(cmd);
     236                        free(cmd); cmd = NULL;
     237
     238                        textbox(_("Message"), _("Titan will be restartet!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 600, 200, 0, 0);
     239                        oshutdown(3, 0);
     240
     241                        break;
     242                }
     243
     244                if(rcret == getrcconfigint("rcgreen", NULL))
     245                {
    212246                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "listboxselect") == 0)
    213247                        {
     
    237271                        }
    238272
     273                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_bgcol") == 0)
     274                        {
     275                                long oldbuttonbar_bgcol = convertcol("buttonbar_bgcol");
     276                                tmpstr = screencolorpicker(getskinconfig("buttonbar_bgcol", NULL), 0, 0, 0);
     277                                if(tmpstr != NULL)
     278                                        addskinconfigtmp("buttonbar_bgcol", tmpstr);
     279                                if(oldbuttonbar_bgcol != convertcol("buttonbar_bgcol")) reboot = 1;
     280                        }
     281
    239282                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_bgcol2") == 0)
    240283                        {
     
    244287                                        addskinconfigtmp("buttonbar_bgcol2", tmpstr);
    245288                                if(oldbuttonbar_bgcol2 != convertcol("buttonbar_bgcol2")) reboot = 1;
     289                        }
     290
     291                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_bordercol") == 0)
     292                        {
     293                                long oldbuttonbar_bordercol = convertcol("buttonbar_bordercol");
     294                                tmpstr = screencolorpicker(getskinconfig("buttonbar_bordercol", NULL), 0, 0, 0);
     295                                if(tmpstr != NULL)
     296                                        addskinconfigtmp("buttonbar_bordercol", tmpstr);
     297                                if(oldbuttonbar_bordercol != convertcol("buttonbar_bordercol")) reboot = 1;
     298                        }
     299
     300                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_fontcol") == 0)
     301                        {
     302                                long oldbuttonbar_fontcol = convertcol("buttonbar_fontcol");
     303                                tmpstr = screencolorpicker(getskinconfig("buttonbar_fontcol", NULL), 0, 0, 0);
     304                                if(tmpstr != NULL)
     305                                        addskinconfigtmp("buttonbar_fontcol", tmpstr);
     306                                if(oldbuttonbar_fontcol != convertcol("buttonbar_fontcol")) reboot = 1;
     307                        }
     308
     309                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_bgcol") == 0)
     310                        {
     311                                long oldtitlebar_bgcol = convertcol("titlebar_bgcol");
     312                                tmpstr = screencolorpicker(getskinconfig("titlebar_bgcol", NULL), 0, 0, 0);
     313                                if(tmpstr != NULL)
     314                                        addskinconfigtmp("titlebar_bgcol", tmpstr);
     315                                if(oldtitlebar_bgcol != convertcol("titlebar_bgcol")) reboot = 1;
     316                        }
     317
     318                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_bgcol2") == 0)
     319                        {
     320                                long oldtitlebar_bgcol2 = convertcol("titlebar_bgcol2");
     321                                tmpstr = screencolorpicker(getskinconfig("titlebar_bgcol2", NULL), 0, 0, 0);
     322                                if(tmpstr != NULL)
     323                                        addskinconfigtmp("titlebar_bgcol2", tmpstr);
     324                                if(oldtitlebar_bgcol2 != convertcol("titlebar_bgcol2")) reboot = 1;
     325                        }
     326
     327                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_bordercol") == 0)
     328                        {
     329                                long oldtitlebar_bordercol = convertcol("titlebar_bordercol");
     330                                tmpstr = screencolorpicker(getskinconfig("titlebar_bordercol", NULL), 0, 0, 0);
     331                                if(tmpstr != NULL)
     332                                        addskinconfigtmp("titlebar_bordercol", tmpstr);
     333                                if(oldtitlebar_bordercol != convertcol("titlebar_bordercol")) reboot = 1;
     334                        }
     335
     336                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_fontcol") == 0)
     337                        {
     338                                long oldtitlebar_fontcol = convertcol("titlebar_fontcol");
     339                                tmpstr = screencolorpicker(getskinconfig("titlebar_fontcol", NULL), 0, 0, 0);
     340                                if(tmpstr != NULL)
     341                                        addskinconfigtmp("titlebar_fontcol", tmpstr);
     342                                if(oldtitlebar_fontcol != convertcol("titlebar_fontcol")) reboot = 1;
    246343                        }
    247344
     
    355452
    356453                if(ostrcmp(listbox->select->name, "listboxselect") == 0)
    357                         b4->hidden = NO;
     454                        b5->hidden = NO;
    358455                else if(ostrcmp(listbox->select->name, "tithek_selectcol") == 0)
    359                         b4->hidden = NO;
     456                        b5->hidden = NO;
    360457                else if(ostrcmp(listbox->select->name, "filelistselect") == 0)
    361                         b4->hidden = NO;
     458                        b5->hidden = NO;
     459                else if(ostrcmp(listbox->select->name, "buttonbar_bgcol") == 0)
     460                        b5->hidden = NO;
    362461                else if(ostrcmp(listbox->select->name, "buttonbar_bgcol2") == 0)
    363                         b4->hidden = NO;
     462                        b5->hidden = NO;
     463                else if(ostrcmp(listbox->select->name, "buttonbar_bordercol") == 0)
     464                        b5->hidden = NO;
     465                else if(ostrcmp(listbox->select->name, "buttonbar_fontcol") == 0)
     466                        b5->hidden = NO;
     467                else if(ostrcmp(listbox->select->name, "titlebar_bgcol") == 0)
     468                        b5->hidden = NO;
     469                else if(ostrcmp(listbox->select->name, "titlebar_bgcol2") == 0)
     470                        b5->hidden = NO;
     471                else if(ostrcmp(listbox->select->name, "titlebar_bordercol") == 0)
     472                        b5->hidden = NO;
     473                else if(ostrcmp(listbox->select->name, "titlebar_fontcol") == 0)
     474                        b5->hidden = NO;
    364475                else if(ostrcmp(listbox->select->name, "bgcol") == 0)
    365                         b4->hidden = NO;
     476                        b5->hidden = NO;
    366477                else if(ostrcmp(listbox->select->name, "bgcol2") == 0)
    367                         b4->hidden = NO;
     478                        b5->hidden = NO;
    368479                else if(ostrcmp(listbox->select->name, "fontcol") == 0)
    369                         b4->hidden = NO;
     480                        b5->hidden = NO;
    370481                else if(ostrcmp(listbox->select->name, "bordercol") == 0)
    371                         b4->hidden = NO;
     482                        b5->hidden = NO;
    372483                else if(ostrcmp(listbox->select->name, "titlebgcol") == 0)
    373                         b4->hidden = NO;
     484                        b5->hidden = NO;
    374485                else if(ostrcmp(listbox->select->name, "progresscol") == 0)
    375                         b4->hidden = NO;
     486                        b5->hidden = NO;
    376487                else if(ostrcmp(listbox->select->name, "markcol") == 0)
    377                         b4->hidden = NO;
     488                        b5->hidden = NO;
    378489                else
    379                         b4->hidden = YES;
     490                        b5->hidden = YES;
    380491       
    381492                drawscreen(skinadjust, 0, 0);
Note: See TracChangeset for help on using the changeset viewer.