Changeset 15606


Ignore:
Timestamp:
05/09/12 14:30:43 (11 years ago)
Author:
obi
Message:

[titan] fix mc enable view modis

Location:
titan
Files:
9 edited

Legend:

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

    r14161 r15606  
    99        char* filename = NULL;
    1010        char* currentdirectory = NULL;
    11         int rcret = 0, rcwait = 1000, playerret = 0, flag = 2, skip = 0, eof = 0, playinfobarcount = 0, playinfobarstatus = 1, count = 0, tmpview = 1, playlist = 0, playertype = 0;
     11        int rcret = 0, rcwait = 1000, playerret = 0, flag = 2, skip = 0, eof = 0, playinfobarcount = 0, playinfobarstatus = 1, count = 0, tmpview = 0, playlist = 0, playertype = 0;
    1212
    1313        // workaround for grey background mvi
     
    3939
    4040        // read configs
    41         int style = getconfigint("style", NULL);
    42         int view = getconfigint("view", NULL);
     41        int view = getconfigint("ap_view", NULL);
    4342        int screensaver_delay = getconfigint("screensaver_delay", NULL);
    4443
     
    5554        status.playspeed = 0, status.play = 0, status.pause = 0, status.random = 0;
    5655
    57         debug(50, "start screenmc_audioplayer style=%d, view=%d", style, view);
     56        debug(50, "start screenmc_audioplayer view=%d", view);
    5857
    5958        singlepicstart("/var/usr/local/share/titan/plugins/mc/skin/default.mvi", 0);
     
    6261                initscreensaver();
    6362
     63        tmpview = view;
    6464        mc_changeview(view, filelist);
    6565
     
    199199
    200200                                addconfiginttmp("dirsort", sort);
    201                                 mc_changeview(view, filelist);
     201                                mc_changeview(tmpview, filelist);
     202
     203                                delownerrc(apskin);     
    202204                                getfilelist(apskin, filelistpath, filelist, filelistpath->text, filemask, tmpview, filelist->select->text);
     205                                addscreenrc(apskin, filelist);
     206                                drawscreen(apskin, 0);                 
    203207                        }
    204208                }
     
    214218                                debug(50, "rcmenu: settings");
    215219
     220                                view = getconfigint("ap_view", NULL);
    216221                                screenmc_audioplayer_settings();
    217                                 view = getconfigint("view", NULL);
    218                                 mc_changeview(view, filelist);
     222                               
     223                                if(view != getconfigint("ap_view", NULL))
     224                                {
     225                                        printf("view changed > change tmpview\n");
     226                                        tmpview = getconfigint("ap_view", NULL);
     227                                }
     228                               
     229                                mc_changeview(tmpview, filelist);
     230
     231                                delownerrc(apskin);     
     232                                getfilelist(apskin, filelistpath, filelist, filelistpath->text, filemask, tmpview, filelist->select->text);
     233                                addscreenrc(apskin, filelist);
     234
    219235                                screensaver_delay = getconfigint("screensaver_delay", NULL);
    220236                                deinitscreensaver();
     
    289305                        playlist = 0;
    290306                        writevfd("Mediacenter");
     307                       
     308                        printf("exit: view=%d tmpview=%d\n", view, tmpview);                   
     309                        status.filelistextend = 0;
    291310                        break;
    292311                }
     
    431450        delownerrc(apskin);
    432451        clearscreen(apskin);
    433         if(style == 1)
    434         {
    435                 delmarkedpic(1010);
    436                 delmarkedpic(1011);
    437                 delmarkedpic(1012);
    438                 delmarkedpic(1013);
    439         }
    440452
    441453        free(filename), filename = NULL;
  • titan/plugins/mc/mc_audioplayer_settings.h

    r15521 r15606  
    2727        setchoiceboxselection(dirsort, getconfig("dirsort", NULL));
    2828
    29         addchoicebox(view, "0", _("default")); 
    30 //      addchoicebox(view, "1", _("big"));     
    31 //      addchoicebox(view, "2", _("fullcover"));
    32 //      addchoicebox(view, "3", _("details"));
    33 //      addchoicebox(view, "4", _("smal"));
    34 //      addchoicebox(view, "5", _("fast"));
    35         setchoiceboxselection(view, getconfig("view", NULL));
     29        addchoicebox(view, "0", _("fast"));
     30        addchoicebox(view, "1", _("big"));     
     31        addchoicebox(view, "2", _("cover"));   
     32        addchoicebox(view, "3", _("default"));
     33        addchoicebox(view, "4", _("details"));
     34//      addchoicebox(view, "5", _("fullcover"));
     35        setchoiceboxselection(view, getconfig("ap_view", NULL));
     36
    3637
    3738        addchoicebox(ap_autostart_playlist, "0", _("no"));     
     
    7374                {
    7475                        addconfigscreencheck("dirsort", dirsort, NULL);
    75                         addconfigscreencheck("view", view, NULL);
     76                        addconfigscreencheck("ap_view", view, NULL);
    7677                        addconfigscreencheck("ap_autostart_playlist", ap_autostart_playlist, NULL);                                             
    7778//                      addconfigscreencheck("dimmer", dimmer, NULL);
  • titan/plugins/mc/mc_global.h

    r15259 r15606  
    8989                filelist->transparent = 40;
    9090                filelist->posx = 20;
    91         }       
     91        }
    9292}
    9393
  • titan/plugins/mc/mc_pictureplayer.h

    r15245 r15606  
    3636
    3737        // read configs
    38         int style = getconfigint("style", NULL);
    39         int view = getconfigint("view", NULL);
     38        int view = getconfigint("pp_view", NULL);
    4039        char* sound = getconfig("sound", NULL);
    4140
     
    4847        status.playspeed = 0, status.play = 0, status.pause = 0, status.random = 0;
    4948
    50         debug(50, "start screenmc_pictureplayer style=%d, view=%d", style, view);
     49        debug(50, "start screenmc_pictureplayer view=%d", view);
    5150
    5251        singlepicstart("/var/usr/local/share/titan/plugins/mc/skin/default.mvi", 0);
     
    5756        tmpview = view;
    5857        mc_changeview(view, filelist);
    59 
    6058        getfilelist(apskin, filelistpath, filelist, currentdirectory, filemask, tmpview, NULL);
    61         mc_changeview(view, filelist);
    6259        addscreenrc(apskin, filelist);
    6360
     
    142139                                        int sort = screenmc_sort();
    143140                                        debug(50, "rcred: tmpsort=%d", sort);
    144 
    145141                                        addconfiginttmp("dirsort", sort);
     142
    146143                                        mc_changeview(view, filelist);
     144                                        delownerrc(apskin);
    147145                                        getfilelist(apskin, filelistpath, filelist, filelistpath->text, filemask, tmpview, filelist->select->text);
     146                                        addscreenrc(apskin, filelist);
     147                                        drawscreen(apskin, 0);
    148148                                }
    149149                        }
     
    171171                                debug(50, "rcmenu: settings");
    172172
    173                                 view = getconfigint("view", NULL);
     173                                view = getconfigint("pp_view", NULL);
    174174                                screenmc_pictureplayer_settings();
    175                                
    176                                 if(view != getconfigint("view", NULL))
     175                                if(view != getconfigint("pp_view", NULL))
    177176                                {
    178177                                        printf("view changed > change tmpview\n");
    179                                         tmpview = getconfigint("view", NULL);
    180                                 }
    181                                 mc_changeview(tmpview, filelist);
     178                                        tmpview = getconfigint("pp_view", NULL);
     179                                }
    182180
    183181                                sound = getconfig("sound", NULL);
     
    200198                                        playerstop();
    201199
     200                                mc_changeview(tmpview, filelist);
     201
    202202                                delownerrc(apskin);     
    203                                 drawscreen(skin, 0);
    204203                                getfilelist(apskin, filelistpath, filelist, filelistpath->text, filemask, tmpview, filelist->select->text);
    205204                                addscreenrc(apskin, filelist);
    206                                                        
     205
    207206                                drawscreen(apskin, 0);
    208207                        }
     
    271270                        writevfd("Mediacenter");
    272271                        playinfobarcount = 0;
    273 status.filelistextend = 0;
     272
     273                        printf("exit: view=%d tmpview=%d\n", view, tmpview);                   
     274                        status.filelistextend = 0;
    274275                        break;
    275276                }
     
    418419        clearscreen(apskin);
    419420        clearscreen(picscreen);
    420         if(style == 1)
    421         {
    422                 delmarkedpic(1010);
    423                 delmarkedpic(1011);
    424                 delmarkedpic(1012);
    425                 delmarkedpic(1013);
    426         }
    427421
    428422        free(track), track = NULL;
  • titan/plugins/mc/mc_pictureplayer_settings.h

    r15521 r15606  
    2626        addchoicebox(showpictitle, "0", _("off"));     
    2727        addchoicebox(showpictitle, "1", _("on"));       
    28         setchoiceboxselection(view, getconfig("showpictitle", NULL));
     28        setchoiceboxselection(showpictitle, getconfig("showpictitle", NULL));
    2929       
    3030        addchoicebox(dirsort, "0", _("alpha"));
     
    3636        setchoiceboxselection(dirsort, getconfig("dirsort", NULL));
    3737
    38         addchoicebox(view, "0", "fast");
    39 //      addchoicebox(view, "1", "big");
    40 //      addchoicebox(view, "2", "cover");       
    41 //      addchoicebox(view, "3", "default");
    42 //      addchoicebox(view, "4", "details");
    43 ////    addchoicebox(view, "5", "fullcover");
    44         setchoiceboxselection(view, getconfig("view", NULL));
     38        addchoicebox(view, "0", _("fast"));
     39        addchoicebox(view, "1", _("big"));     
     40        addchoicebox(view, "2", _("cover"));   
     41        addchoicebox(view, "3", _("default"));
     42        addchoicebox(view, "4", _("details"));
     43//      addchoicebox(view, "5", _("fullcover"));
     44        setchoiceboxselection(view, getconfig("pp_view", NULL));
    4545
    4646        addchoicebox(sound, "http://stream.mth-house.de:8500/", _("MTH House"));
     
    7171                {
    7272                        addconfigscreen("dirsort", dirsort);
    73                         addconfigscreen("view", view);
     73                        addconfigscreen("pp_view", view);
    7474                        addconfigscreen("sound", sound);
    7575                        addconfigscreen("pp_interval", pp_interval);
  • titan/plugins/mc/mc_videoplayer.h

    r15245 r15606  
    1010        char* tmppolicy = NULL;
    1111        char* currentdirectory = NULL;
     12        char* selectedfile = NULL;
    1213        int rcret = 0, rcwait = 1000, playerret = 0, flag = 1, skip = 0, eof = 0, playinfobarcount = 0, playinfobarstatus = 1, tmpview = 0, playlist = 0, playertype = 0;
    1314        // workaround for grey background mvi
     
    2829                       
    2930        currentdirectory = ostrcat(currentdirectory, getconfig("mc_videoplayerpath", NULL), 1, 0);
     31        selectedfile = ostrcat(selectedfile, getconfig("mc_selectedfile", NULL), 1, 0);
    3032
    3133        // enable listbox and set hidden
     
    3537
    3638        // read configs
    37         int style = getconfigint("style", NULL);
    38         int view = getconfigint("view", NULL);
     39        int view = getconfigint("vp_view", NULL);
    3940        int skip13 = getconfigint("skip13", NULL);
    4041        int skip46 = getconfigint("skip46", NULL);
     
    5657        status.playspeed = 0, status.play = 0, status.pause = 0, status.random = 0;
    5758
    58         debug(50, "start screenmc_videoplayer style=%d, view=%d", style, view);
     59        debug(50, "start screenmc_videoplayer view=%d", view);
    5960
    6061        singlepicstart("/var/usr/local/share/titan/plugins/mc/skin/default.mvi", 0);
     
    6667        mc_changeview(view, filelist);
    6768
    68         getfilelist(apskin, filelistpath, filelist, currentdirectory, filemask, tmpview, NULL);
     69        getfilelist(apskin, filelistpath, filelist, currentdirectory, filemask, tmpview, selectedfile);
    6970        addscreenrc(apskin, filelist);
    7071
     
    245246
    246247                                        addconfiginttmp("dirsort", sort);
    247 //                                      mc_changeview(tmpview, filelist);
     248                                        mc_changeview(tmpview, filelist);
     249
     250                                        delownerrc(apskin);     
    248251                                        getfilelist(apskin, filelistpath, filelist, filelistpath->text, filemask, tmpview, filelist->select->text);
     252                                        addscreenrc(apskin, filelist);
     253                                        drawscreen(apskin, 0);
    249254                                }
    250255                        }
     
    272277                                debug(50, "rcmenu: settings");
    273278                                singlepicstart("/var/usr/local/share/titan/plugins/mc/skin/default.mvi", 0);
    274                                 view = getconfigint("view", NULL);
     279                                view = getconfigint("vp_view", NULL);
    275280                                screenmc_videoplayer_settings();
    276281                               
    277                                 if(view != getconfigint("view", NULL))
     282                                if(view != getconfigint("vp_view", NULL))
    278283                                {
    279284                                        printf("view changed > change tmpview\n");
    280                                         tmpview = getconfigint("view", NULL);
     285                                        tmpview = getconfigint("vp_view", NULL);
    281286                                }
    282287                               
     
    286291                                getfilelist(apskin, filelistpath, filelist, filelistpath->text, filemask, tmpview, filelist->select->text);
    287292                                addscreenrc(apskin, filelist);
    288 
    289293                                drawscreen(apskin, 0);
    290294                        }
     
    349353                                if(ostrcmp(getconfig("mc_videoplayerpath", NULL), filelistpath->text) != 0)
    350354                                        addconfig("mc_videoplayerpath", filelistpath->text);
     355                                if(ostrcmp(getconfig("mc_selectedfile", NULL), filelist->select->name) != 0)
     356                                        addconfig("mc_selectedfile", filelist->select->name);
    351357                        }
    352358
     
    369375                        writevfd("Mediacenter");
    370376                        playinfobarcount = 0;
    371         printf("exit: view=%d tmpview=%d\n", view, tmpview);                   
     377       
     378                        printf("exit: view=%d tmpview=%d\n", view, tmpview);                   
    372379                        status.filelistextend = 0;
    373380                        break;
     
    494501                                        //addconfig("mc_videoplayerpath", filelistpath->text);
    495502                                        currentdirectory = ostrcat("", getconfig("mc_videoplayerpath", NULL), 0, 0);
     503                                        selectedfile = ostrcat(selectedfile, getconfig("mc_selectedfile", NULL), 0, 0);
    496504
    497505                                        mc_mounter_main(0,filename,filelistpath,filelist,apskin,filemask,tmpview,currentdirectory);
     
    576584        delownerrc(apskin);
    577585        clearscreen(apskin);
    578         if(style == 1)
    579         {
    580                 delmarkedpic(1010);
    581                 delmarkedpic(1011);
    582                 delmarkedpic(1012);
    583                 delmarkedpic(1013);
    584         }
    585586
    586587        free(filename), filename = NULL;
    587588        free(currentdirectory), currentdirectory = NULL;
     589        free(selectedfile), selectedfile = NULL;
    588590
    589591        free(status.playfile); status.playfile = NULL;
  • titan/plugins/mc/mc_videoplayer_settings.h

    r15521 r15606  
    2222        setchoiceboxselection(dirsort, getconfig("dirsort", NULL));
    2323
    24         addchoicebox(view, "0", "fast");
    25 //      addchoicebox(view, "1", "big");
    26 //      addchoicebox(view, "2", "cover");       
    27 //      addchoicebox(view, "3", "default");
    28 //      addchoicebox(view, "4", "details");
    29 //      addchoicebox(view, "5", "fullcover");
    30 
    31 //      addchoicebox(view, "0", _("default")); 
    32 //      addchoicebox(view, "1", _("cover"));   
    33 //      addchoicebox(view, "2", _("size"));
    34 //      addchoicebox(view, "3", _("details"));
    35 //      addchoicebox(view, "4", _("smal"));
    36 //      addchoicebox(view, "5", _("fast"));
    37         setchoiceboxselection(view, getconfig("view", NULL));
     24        addchoicebox(view, "0", _("fast"));
     25        addchoicebox(view, "1", _("big"));     
     26        addchoicebox(view, "2", _("cover"));   
     27        addchoicebox(view, "3", _("default"));
     28        addchoicebox(view, "4", _("details"));
     29        addchoicebox(view, "5", _("fullcover"));
     30        setchoiceboxselection(view, getconfig("vp_view", NULL));
    3831
    3932        addchoicebox(vp_autostart_playlist, "0", _("no"));     
     
    9386                {
    9487                        addconfigscreencheck("dirsort", dirsort, NULL);
    95                         addconfigscreencheck("view", view, NULL);
     88                        addconfigscreencheck("vp_view", view, NULL);
    9689                        addconfigscreencheck("imdb_directory", imdb_directory, NULL);
    9790                        addconfigscreencheck("vp_autostart_playlist", vp_autostart_playlist, NULL);             
  • titan/skins/mc/skin.xml

    r15395 r15606  
    6666<node name=mc_filelistpath valign=middle bordersize=1 posx=center posy=100 width=95% height=30>
    6767<node fontsize=30 bordercol=bordercol scrollbar=auto type=listbox name=listbox posx=center posy=140 width=92% height=50%>
    68 <node hspace=10 picmem=skin/folder.png textposx=30 fontsize=20 bordersize=0 bordercol=bordercol scrollbar=auto type=filelist name=mc_filelist posx=center posy=140 width=92% height=50%>
     68<node hspace=10 picmem=skin/ext_directory.png textposx=30 fontsize=25 bordersize=0 bordercol=bordercol scrollbar=auto type=filelist name=mc_filelist posx=center posy=140 width=92% height=480>
    6969<node name=b1 text="Sorting" halign=center valign=middle bordercol=bgcol bordersize=0 posx=15% posy=90% width=150 height=30/>
    7070<node name=b1 text="Sorting" halign=center valign=middle bordercol=red bordersize=2 posx=15% posy=95% width=150 height=2/>
     
    110110<node fontsize=30 bordercol=bordercol scrollbar=auto type=listbox name=listbox posx=center posy=140 width=92% height=480>
    111111<node name=mc_filelistpath valign=middle bordersize=1 posx=center posy=100 width=95% height=30>
    112 <node hspace=10 picmem=skin/folder.png textposx=30 fontsize=40 bordersize=0 bordercol=bordercol scrollbar=auto type=filelist name=mc_filelist posx=center posy=140 width=92% height=480>
     112<node hspace=10 picmem=skin/ext_directory.png textposx=30 fontsize=40 bordersize=0 bordercol=bordercol scrollbar=auto type=filelist name=mc_filelist posx=center posy=140 width=92% height=480>
    113113<node name=b1 text="Sorting" halign=center valign=middle bordercol=bgcol bordersize=0 posx=15% posy=90% width=150 height=30/>
    114114<node name=b1 text="Sorting" halign=center valign=middle bordercol=red bordersize=2 posx=15% posy=95% width=150 height=2/>
  • titan/titan/filelist.h

    r15298 r15606  
    722722        int view = 0;           
    723723        if (tmpview == -1)
    724                 view = getconfigint("view", NULL);
     724                view = 0;
    725725        else
    726726                view = tmpview;
Note: See TracChangeset for help on using the changeset viewer.