Ticket #5888: osd_input_timeout_trunk@18947.diff
File osd_input_timeout_trunk@18947.diff, 3.6 KB (added by , 15 years ago) |
---|
-
libs/libmythtv/tv_play.h
467 467 bool arrowAccel; 468 468 int osd_general_timeout; 469 469 int osd_prog_info_timeout; 470 int osd_input_timeout; 470 471 471 472 enum commSkipMode autoCommercialSkip; 472 473 bool tryUnflaggedSkip; … … 579 580 /// Lock used so that input QStrings can be used across threads, and so 580 581 /// that queuedChanNumExpr can be used safely in Qt 3.2 and earlier. 581 582 mutable QMutex queuedInputLock; 583 /// Timer for entering channel numbers 584 MythTimer enterChanTimer; 582 585 583 586 int unmuteTimeout; ///< For temp. audio muting during channel changes 584 587 MythTimer unmuteTimer; ///< For temp. audio muting during channel changes -
libs/libmythtv/tv_play.cpp
539 539 jumptime(0), smartChannelChange(false), 540 540 MuteIndividualChannels(false), arrowAccel(false), 541 541 osd_general_timeout(2), osd_prog_info_timeout(3), 542 osd_input_timeout(0), 542 543 autoCommercialSkip(CommSkipOff), tryUnflaggedSkip(false), 543 544 smartForward(false), stickykeys(0), 544 545 ff_rew_repos(1.0f), ff_rew_reverse(false), … … 661 662 persistentbrowsemode = gContext->GetNumSetting("PersistentBrowseMode", 0); 662 663 osd_general_timeout = gContext->GetNumSetting("OSDGeneralTimeout", 2); 663 664 osd_prog_info_timeout= gContext->GetNumSetting("OSDProgramInfoTimeout", 3); 665 osd_input_timeout = gContext->GetNumSetting("OSDInputTimeout", 0); 664 666 autoCommercialSkip = (enum commSkipMode)gContext->GetNumSetting( 665 667 "AutoCommercialSkip", CommSkipOff); 666 668 tryUnflaggedSkip = gContext->GetNumSetting("TryUnflaggedSkip", 0); … … 2422 2424 nvp->SetMuted(false); 2423 2425 } 2424 2426 2427 if (enterChanTimer.isRunning() && 2428 (enterChanTimer.elapsed() >= osd_input_timeout)) 2429 { 2430 enterChanTimer.stop(); 2431 CommitQueuedInput(); 2432 } 2425 2433 2426 2434 if (prevChanTimer.isRunning() && 2427 2435 (prevChanTimer.elapsed() >= kPrevChanTimeout)) … … 4879 4887 (smartChannelChange || browsemode)) 4880 4888 { 4881 4889 commitSmart = ProcessSmartChannel(inputStr); 4890 if (osd_input_timeout > 0) 4891 enterChanTimer.start(); 4882 4892 } 4883 4893 4884 4894 // Handle OSD... -
programs/mythfrontend/globalsettings.cpp
1597 1597 return gs; 1598 1598 } 1599 1599 1600 static HostSpinBox *OSDInputTimeout() 1601 { 1602 HostSpinBox *gs = new HostSpinBox("OSDInputTimeout", 0, 5000, 100); 1603 gs->setLabel(QObject::tr("Maximum timeout between entering to digits for channel selection until input was commited.")); 1604 gs->setValue(0); 1605 gs->setHelpText(QObject::tr("How many milliseconds the input parser waits for an additional" 1606 " digit before committing channel number. If 0 the input will be committed after OSD fade-out (old behaviour)")); 1607 return gs; 1608 } 1609 1600 1610 static HostSpinBox *ThemeCacheSize() 1601 1611 { 1602 1612 HostSpinBox *gs = new HostSpinBox("ThemeCacheSize", 1, 1000, 1, true); … … 4795 4805 osd->addChild(OSDThemeFontSizeType()); 4796 4806 osd->addChild(EnableMHEG()); 4797 4807 osd->addChild(PersistentBrowseMode()); 4808 osd->addChild(OSDInputTimeout()); 4798 4809 addChild(osd); 4799 4810 4800 4811 VerticalConfigurationGroup *udp = new VerticalConfigurationGroup(false);