Ticket #3442: show_cycle_visualizer_2.patch

File show_cycle_visualizer_2.patch, 2.6 KB (added by wilhelm.eger@…, 14 years ago)

Updated patch. The first one was malformed.

  • mythplugins/mythmusic/mythmusic/playbackbox.h

     
    195195    GenericTree *playlist_tree;
    196196
    197197    bool cycle_visualizer;
     198    bool show_cycle_visualizer;
    198199    bool random_visualizer;
    199200    bool show_album_art;
    200201    bool show_whole_tree;
  • mythplugins/mythmusic/mythmusic/playbackbox.cpp

     
    9090    showrating = gContext->GetNumSetting("MusicShowRatings", 0);
    9191    listAsShuffled = gContext->GetNumSetting("ListAsShuffled", 0);
    9292    cycle_visualizer = gContext->GetNumSetting("VisualCycleOnSongChange", 0);
     93    show_cycle_visualizer = gContext->GetNumSetting("ShowVisualCycleOnSongChange", 0);
    9394    show_album_art = gContext->GetNumSetting("VisualAlbumArtOnSongChange", 0);
    9495    random_visualizer = gContext->GetNumSetting("VisualRandomize", 0);
    9596
     
    13161317        mainvisual->setVisual("Blank");
    13171318        mainvisual->setVisual(visual_modes[current_visual]);
    13181319    }
    1319 
    1320     bannerEnable(tr("Visualization: ") + visual_modes[current_visual], 4000);
     1320    if (show_cycle_visualizer)
     1321    {
     1322        bannerEnable(tr("Visualization: ") + visual_modes[current_visual], 4000);
     1323    }
     1324    else
     1325    {
     1326        bannerEnable(curMeta, show_album_art);
     1327    }
    13211328}
    13221329
    13231330void PlaybackBoxMusic::setTrackOnLCD(Metadata *mdata)
  • mythplugins/mythmusic/mythmusic/globalsettings.cpp

     
    381381    return gc;
    382382};
    383383
     384static HostCheckBox *ShowVisualCycleOnSongChange()
     385{
     386    HostCheckBox *gc = new HostCheckBox("ShowVisualCycleOnSongChange");
     387    gc->setLabel(QObject::tr("Show the type of visualizer on each song instead of song information"));
     388    gc->setValue(false);
     389    gc->setHelpText(QObject::tr("Show the changed visualizer when the song "
     390                    "changes. Otherwise song information will be shown."));
     391    return gc;
     392};
     393
    384394static HostCheckBox *ShowAlbumArtOnSongChange()
    385395{
    386396    HostCheckBox *gc = new HostCheckBox("VisualAlbumArtOnSongChange");
     
    641651    connect(button, SIGNAL(pressed()), SLOT(showVisEditor()));
    642652
    643653    playersettings3->addChild(VisualCycleOnSongChange());
     654    playersettings3->addChild(ShowVisualCycleOnSongChange());
    644655    playersettings3->addChild(ShowAlbumArtOnSongChange());
    645656    playersettings3->addChild(VisualRandomize());
    646657    playersettings3->addChild(VisualModeDelay());