Changeset 15216


Ignore:
Timestamp:
04/11/12 06:08:52 (12 years ago)
Author:
obi
Message:

[titan] update grid filelist and enable changing in mc vp

Location:
titan
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • titan/plugins/mc/mc_videoplayer.h

    r14393 r15216  
    1010        char* tmppolicy = NULL;
    1111        char* currentdirectory = NULL;
    12         int rcret = 0, rcwait = 1000, playerret = 0, flag = 1, skip = 0, eof = 0, playinfobarcount = 0, playinfobarstatus = 1, tmpview = 1, playlist = 0, playertype = 0;
     12        int rcret = 0, rcwait = 1000, playerret = 0, flag = 1, skip = 0, eof = 0, playinfobarcount = 0, playinfobarstatus = 1, tmpview = 0, playlist = 0, playertype = 0;
    1313        // workaround for grey background mvi
    1414        struct skin* blackscreen = getscreen("blackscreen");
     
    6060                initscreensaver();
    6161
     62        tmpview = view;
    6263        mc_changeview(view, filelist);
    6364
     65        printf("111111111: view=%d tmpview=%d\n", view, tmpview);
     66//      getfilelist(apskin, filelistpath, filelist, currentdirectory, filemask, view, NULL);
     67        filelist->fontsize = 25;
    6468        getfilelist(apskin, filelistpath, filelist, currentdirectory, filemask, tmpview, NULL);
    6569        addscreenrc(apskin, filelist);
     
    205209
    206210                                        addconfiginttmp("dirsort", sort);
    207                                         mc_changeview(view, filelist);
    208                                         getfilelist(apskin, filelistpath, filelist, filelistpath->text, filemask, tmpview, filelist->select->text);
     211//                                      mc_changeview(tmpview, filelist);
     212                                        getfilelist(apskin, filelistpath, filelist, filelistpath->name, filemask, tmpview, filelist->select->name);
    209213                                }
    210214                        }
     
    232236                                debug(50, "rcmenu: settings");
    233237
     238                                view = getconfigint("view", NULL);
    234239                                screenmc_videoplayer_settings();
    235                                 view = getconfigint("view", NULL);
     240                               
     241                                if(view != getconfigint("view", NULL))
     242                                {
     243                                        printf("view changed > change tmpview\n");
     244                                        tmpview = getconfigint("view", NULL);
     245                                }
     246
    236247                                mc_changeview(view, filelist);
     248
     249//new
     250//                              clearscreen(apskin);
     251
     252
     253                                delownerrc(apskin);     
     254                                getfilelist(apskin, filelistpath, filelist, filelistpath->name, filemask, tmpview, filelist->select->name);
     255                                addscreenrc(apskin, filelist);
     256                                drawscreen(skin, 0);
     257//                              status.filelistextend = view;
    237258
    238259                                drawscreen(apskin, 0);
     
    293314                else if(rcret == getrcconfigint("rcexit", NULL))
    294315                {
    295                         debug(50, "exit - save mc_videoplayerpath: %s", filelistpath->text);
     316                        debug(50, "exit - save mc_videoplayerpath: %s", filelistpath->name);
    296317                        if(playlist == 0)
    297318                        {
    298                                 if(ostrcmp(getconfig("mc_videoplayerpath", NULL), filelistpath->text) != 0)
    299                                         addconfig("mc_videoplayerpath", filelistpath->text);
     319                                if(ostrcmp(getconfig("mc_videoplayerpath", NULL), filelistpath->name) != 0)
     320                                        addconfig("mc_videoplayerpath", filelistpath->name);
    300321                        }
    301322
     
    318339                        writevfd("Mediacenter");
    319340                        playinfobarcount = 0;
     341        printf("exit: view=%d tmpview=%d\n", view, tmpview);                   
     342                        status.filelistextend = 0;
    320343                        break;
    321344                }
     
    422445                        else if(filelist->select != NULL && filelist->select->input == NULL)
    423446                        {
    424                                 if(ostrcmp(getconfig("mc_videoplayerpath", NULL), filelistpath->text) != 0)
    425                                         addconfig("mc_videoplayerpath", filelistpath->text);
    426 
    427                                 debug(50, "filelist->select->text: %s", filelist->select->text);
    428                                 filename = createpath(filelistpath->text, filelist->select->text);
     447                                if(ostrcmp(getconfig("mc_videoplayerpath", NULL), filelistpath->name) != 0)
     448                                        addconfig("mc_videoplayerpath", filelistpath->name);
     449
     450                                debug(50, "filelist->select->name: %s", filelist->select->name);
     451                                filename = createpath(filelistpath->name, filelist->select->name);
    429452
    430453                                if(getconfigint("playertype", NULL) == 1 && (cmpfilenameext(filename, ".ts") == 0 || cmpfilenameext(filename, ".mts") == 0 || cmpfilenameext(filename, ".m2ts") == 0))         
     
    436459                                {
    437460                                        debug(50, "mc_mounter_main filename: %s", filename);
    438                                         //addconfig("mc_videoplayerpath", filelistpath->text);
     461                                        //addconfig("mc_videoplayerpath", filelistpath->name);
    439462                                        currentdirectory = ostrcat("", getconfig("mc_videoplayerpath", NULL), 0, 0);
    440463
     
    458481                       
    459482                                if(screensaver != NULL && screensaver->type == 0)
    460                                         screensaver->value = (void*)filelist->select->text;
     483                                        screensaver->value = (void*)filelist->select->name;
    461484
    462485                                debug(50, "playerstop");
  • titan/plugins/mc/mc_videoplayer_settings.h

    r13500 r15216  
    2222        setchoiceboxselection(dirsort, getconfig("dirsort", NULL));
    2323
    24         addchoicebox(view, "0", _("default")); 
    25         addchoicebox(view, "1", _("big"));     
    26         addchoicebox(view, "2", _("fullcover"));
    27         addchoicebox(view, "3", _("details"));
    28         addchoicebox(view, "4", _("smal"));
    29         addchoicebox(view, "5", _("fast"));
     24
     25        addchoicebox(view, "0", "default");     
     26        addchoicebox(view, "1", "cover");       
     27        addchoicebox(view, "2", "size");
     28        addchoicebox(view, "3", "details");
     29       
     30//      addchoicebox(view, "0", _("default")); 
     31//      addchoicebox(view, "1", _("cover"));   
     32//      addchoicebox(view, "2", _("size"));
     33//      addchoicebox(view, "3", _("details"));
     34//      addchoicebox(view, "4", _("smal"));
     35//      addchoicebox(view, "5", _("fast"));
    3036        setchoiceboxselection(view, getconfig("view", NULL));
    3137
  • titan/titan/filelist.h

    r15201 r15216  
    217217        }
    218218
    219         if(flag == 1) node->type |= GRID;
     219        if(status.filelistextend == 1) node->type |= GRID;
    220220
    221221        status.tmp = node->input;
     
    252252        parentdir = addscreennode(screen, NULL, child);
    253253
    254         if(flag == 1 && parentdir != NULL)
     254/*
     2550 fast
     2561 cover (grid)
     2572 big (list)
     2583 default (liste + grösse)
     2594 details (liste + date)
     2605 cover1 (list + imdb)
     2616 cover2 (list + imdb)
     2627 cover3 (list + imdb)
     2638 fullcover (list)
     264*/
     265
     266        if(status.filelistextend == 1 && parentdir != NULL)
    255267        {
    256268                parentdir->picheight = 180;
     
    303315                        if(child != NULL)
    304316                        {
    305                                 if(flag == 1)
     317                                if(status.filelistextend == 1)
    306318                                {
    307319                                        if(gridbr == 0) child->type = GRIDBR;
     
    341353                                                {
    342354        //                                              tmpstr = ostrcat(tmpstr, "/var/swap/imdbfolder/", 1, 0);
    343                                                         tmpstr = ostrcat(tmpstr, "/media/autofs/DEBIAN/autofs/xvid/imdbfolder/", 1, 0);
     355                                                        tmpstr = ostrcat(tmpstr, "/media/autofs/DEBIAN/imdbfolder/", 1, 0);
    344356                                                        int fast = 0;
    345357                                                        if(fast == 1)
     
    391403                                }                       
    392404
    393                                 if(flag == 0)
     405                                child->bordercol = node->bordercol;
     406                               
     407                                if(status.filelistextend != 1)
    394408                                {
    395409                                        if(node->pic != NULL)
    396410                                                changepic(child, node->pic);
    397                                 }
    398 
    399                                 child->bordercol = node->bordercol;
    400                                 if(flag == 0)
    401                                 {
     411
    402412                                        child->valign = MIDDLE;
    403                                         child->width = 100;
     413                                        child->width = 200;
    404414                                        child->prozwidth = 1;
    405415                                        child->height = node->fontsize + 2 + (node->bordersize * 2);
     
    408418                                changename(child, filelist[i]->d_name);
    409419                                child->parentpointer = node;
    410                                
    411                                 child->textposx = node->textposx;
     420
     421                                if(status.filelistextend != 1)
     422                                {
     423                                        child->width = 100;
     424                                        child->prozwidth = 1;
     425                                        child->height = node->fontsize + 2 + (node->bordersize * 2);
     426                                        child->textposx = node->textposx;
     427                                }
     428                                else
     429                                        child->textposx = 1;
     430
    412431                                child->del = FILELISTDELMARK;
    413432                                tmpstr = createpath(node->input, child->text);
     
    415434                                free(tmpstr); tmpstr = NULL;
    416435
    417                                 if(status.filelistextend > 0)
     436                                if(status.filelistextend > 1)
    418437                                {
    419438                                        child->filelist = (struct filelist*)malloc(sizeof(struct filelist));
     
    428447                                        child->filelist->path = createpath(node->input, "");
    429448
    430                                         if(status.filelistextend == 1)
     449                                        if(status.filelistextend == 4)
    431450                                        {
    432451                                                char* filename = NULL;
     
    474493                                if(child != NULL)
    475494                                {
    476                                         if(flag == 1)
     495                                        if(status.filelistextend == 1)
    477496                                        {
    478497                                                if(gridbr == 0) child->type = GRIDBR;
     
    526545//                                                              printf("4filename: %s\n",filename);
    527546
    528                                                                 tmpstr = ostrcat(tmpstr, "/media/autofs/DEBIAN/autofs/xvid/imdb/", 1, 0);
     547                                                                tmpstr = ostrcat(tmpstr, "/media/autofs/DEBIAN/imdb/", 1, 0);
    529548                                                                tmpstr = ostrcat(tmpstr, filename, 1, 0);
    530549                                                                free(filename); filename = NULL;
     
    558577                                                tmpstr = ostrcat(tmpstr, getfilenameext(filelist[i]->d_name), 1, 0);
    559578                                                tmpstr = ostrcat(tmpstr, ".png", 1, 0);
    560                                                 changepic(child, tmpstr);
     579                                                if(tmpstr != NULL)
     580                                                        changepic(child, tmpstr);
    561581                                                free(tmpstr); tmpstr = NULL;
    562582                                        }
    563583
    564584                                        child->bordercol = node->bordercol;
    565                                         if(flag == 0)
     585                                        if(status.filelistextend != 1)
    566586                                        {
    567587                                                child->width = 100;
     
    581601                                        changeinput(child, NULL);
    582602
    583                                         if(status.filelistextend > 0)
     603                                        if(status.filelistextend > 1)
    584604                                        {
    585605                                                child->filelist = (struct filelist*)malloc(sizeof(struct filelist));
     
    594614                                                child->filelist->path = createpath(node->input, "");
    595615
    596                                                 if(status.filelistextend == 1)
     616                                                if(status.filelistextend == 4)
    597617                                                {
    598618                                                        char* filename = NULL;
     
    659679        delmarkedscreennodes(input, FILELISTDELMARK);
    660680
    661         int view = 0;
    662        
     681
     682        int view = 0;           
    663683        if (tmpview == -1)
    664684                view = getconfigint("view", NULL);
     
    666686                view = tmpview;
    667687
    668         if (view == 0)
    669                 status.filelistextend=2;
    670         else if (view == 2)
    671                 status.filelistextend=1;
    672         else if (view == 3)
    673                 status.filelistextend=3;
    674         else
    675                 status.filelistextend=0;
    676        
    677         createfilelist(input, filelist, 1);
     688        status.filelistextend = view;
     689        printf("getfilelist: view=%d status=%d\n", view, status.filelistextend);
     690
     691//      clearscreen(input);
     692        createfilelist(input, filelist, 0);
    678693        drawscreen(input, 0);
    679694        debug(1000, "out");
Note: See TracChangeset for help on using the changeset viewer.