Ticket #502: osd.patch

File osd.patch, 5.2 KB (added by mythtv@…, 16 years ago)

Proposed patch

  • libs/libmythtv/tv_play.cpp

     
    175175      baseFilters(""), fftime(0), rewtime(0),
    176176      jumptime(0), usePicControls(false), smartChannelChange(false),
    177177      MuteIndividualChannels(false), arrowAccel(false), osd_display_time(0),
     178      osd_program_display_time(0),
    178179      autoCommercialSkip(false), tryUnflaggedSkip(false),
    179180      smartForward(false), stickykeys(0),
    180181      ff_rew_repos(1.0f), ff_rew_reverse(false),
     
    275276    arrowAccel           = gContext->GetNumSetting("UseArrowAccels", 1);
    276277    persistentbrowsemode = gContext->GetNumSetting("PersistentBrowseMode", 0);
    277278    osd_display_time     = gContext->GetNumSetting("OSDDisplayTime");
     279    osd_program_display_time     = gContext->GetNumSetting("OSDProgramDisplayTime");
    278280    autoCommercialSkip   = gContext->GetNumSetting("AutoCommercialSkip", 0);
    279281    tryUnflaggedSkip     = gContext->GetNumSetting("TryUnflaggedSkip", 0);
    280282    smartForward         = gContext->GetNumSetting("SmartForward", 0);
     
    25002502        playbackinfo->ToMap(infoMap);
    25012503        GetOSD()->HideSet("status");
    25022504        GetOSD()->ClearAllText("program_info");
    2503         GetOSD()->SetText("program_info", infoMap, osd_display_time);
     2505        GetOSD()->SetText("program_info", infoMap, osd_program_display_time);
    25042506    }
    25052507    else
    25062508    {
    25072509        QString desc = "";
    25082510        int pos = nvp->calcSliderPos(desc);
    25092511        GetOSD()->HideSet("program_info");
    2510         GetOSD()->StartPause(pos, false, tr("Position"), desc, osd_display_time);
     2512        GetOSD()->StartPause(pos, false, tr("Position"), desc, osd_program_display_time);
    25112513        update_osd_pos = true;
    25122514    }
    25132515}
     
    25162518{
    25172519    bool muted = false;
    25182520
     2521    if (disptime == -999) disptime = osd_display_time;
     2522
    25192523    AudioOutput *aud = nvp->getAudioOutput();
    25202524    if (aud && !aud->GetMute())
    25212525    {
     
    32243233    {
    32253234        // Clear previous osd and add new info
    32263235        GetOSD()->ClearAllText("program_info");
    3227         GetOSD()->SetText("program_info", infoMap, osd_display_time);
     3236        GetOSD()->SetText("program_info", infoMap, osd_program_display_time);
    32283237        GetOSD()->ClearAllText("channel_number");
    3229         GetOSD()->SetText("channel_number", infoMap, osd_display_time);
     3238        GetOSD()->SetText("channel_number", infoMap, osd_program_display_time);
    32303239    }
    32313240}
    32323241
     
    33513360    //GetOSD()->SetText("signal_info", infoMap, -1);
    33523361
    33533362    GetOSD()->ClearAllText("channel_number");
    3354     GetOSD()->SetText("channel_number", infoMap, osd_display_time);
     3363    GetOSD()->SetText("channel_number", infoMap, osd_program_display_time);
    33553364
    33563365    infoMap["description"] = sigDesc;
    33573366    GetOSD()->ClearAllText("program_info");
    3358     GetOSD()->SetText("program_info", infoMap, osd_display_time);
     3367    GetOSD()->SetText("program_info", infoMap, osd_program_display_time);
    33593368
    33603369    lastSignalMsg.clear();
    33613370    lastSignalMsgTime.start();
  • libs/libmythtv/tv_play.h

     
    187187    void DoInfo(void);
    188188    void DoPlay(void);
    189189    void DoPause(void);
    190     bool UpdatePosOSD(float time, const QString &mesg, int disptime = 2);
     190    bool UpdatePosOSD(float time, const QString &mesg, int disptime = -999);
    191191    void DoSeek(float time, const QString &mesg);
    192192    enum ArbSeekWhence {
    193193        ARBSEEK_SET = 0,
     
    271271    bool    MuteIndividualChannels;
    272272    bool    arrowAccel;
    273273    int     osd_display_time;
     274    int     osd_program_display_time;
    274275
    275276    int     autoCommercialSkip;
    276277    bool    tryUnflaggedSkip;
  • programs/mythfrontend/globalsettings.cpp

     
    685685    return gc;
    686686}
    687687
     688static HostSpinBox *OSDProgramDisplayTime()
     689{
     690    HostSpinBox *gs = new HostSpinBox("OSDProgramDisplayTime", 0, 30, 1);
     691    gs->setLabel(QObject::tr("Number of seconds for OSD program information"));
     692    gs->setValue(3);
     693    gs->setHelpText(QObject::tr("How long the program information remains on "
     694                    "the On Screen Display after a channel change."));
     695    return gs;
     696}
     697
    688698static HostSpinBox *OSDDisplayTime()
    689699{
    690700    HostSpinBox *gs = new HostSpinBox("OSDDisplayTime", 0, 30, 1);
    691701    gs->setLabel(QObject::tr("Number of seconds for OSD information"));
    692702    gs->setValue(3);
    693     gs->setHelpText(QObject::tr("How long the program information remains on "
    694                     "the On Screen Display after a channel change."));
     703    gs->setHelpText(QObject::tr("How long the On Screen Display remains "
     704                    "on the screen in other situations."));
    695705    return gs;
    696706}
    697707
     
    30193029    VerticalConfigurationGroup* osd = new VerticalConfigurationGroup(false);
    30203030    osd->setLabel(QObject::tr("On-screen display"));
    30213031    osd->addChild(OSDTheme());
     3032    osd->addChild(OSDProgramDisplayTime());
    30223033    osd->addChild(OSDDisplayTime());
    30233034    osd->addChild(OSDFont());
    30243035    osd->addChild(OSDCCFont());