Ticket #8103: appleremote-prefs.trunk.diff

File appleremote-prefs.trunk.diff, 1.8 KB (added by ecronin, 15 years ago)
  • libs/libmythui/AppleRemote.cpp

     
    1818#include <sstream>
    1919
    2020#include "mythverbose.h"
     21#include "mythdb.h"
    2122
    2223AppleRemote*      AppleRemote::_instance = 0;
    2324const char* const AppleRemote::AppleRemoteDeviceName = "AppleIRController";
     
    5657{
    5758    if (queue != NULL)   // already listening
    5859        return;
    59  
     60
     61    if (GetMythDB()->GetNumSetting("AppleRemoteDisabled", 0))
     62        return;
     63
    6064    io_object_t hidDevice = _findAppleRemoteDevice();
    6165
    6266    if (hidDevice == 0) goto error;
  • programs/mythfrontend/globalsettings.cpp

     
    23102310    return ge;
    23112311}
    23122312
     2313static HostCheckBox *AppleRemoteDisabled()
     2314{
     2315    HostCheckBox *gc = new HostCheckBox("AppleRemoteDisabled");
     2316    gc->setLabel(QObject::tr("Disable listening to Apple IR Receiver"));
     2317    gc->setValue(false);
     2318    gc->setHelpText(QObject::tr("When enabled, MythTV will not take "
     2319                    "control of the Apple Remote receiver."));
     2320    return gc;
     2321}
     2322
    23132323static HostLineEdit *ScreenShotPath()
    23142324{
    23152325    HostLineEdit *ge = new HostLineEdit("ScreenShotPath");
     
    42544264    remotecontrol->setLabel(QObject::tr("Remote Control"));
    42554265    remotecontrol->addChild(LircDaemonDevice());
    42564266    remotecontrol->addChild(LircKeyPressedApp());
     4267#ifdef USING_APPLEREMOTE
     4268    remotecontrol->addChild(AppleRemoteDisabled());
     4269#endif
    42574270    remotecontrol->addChild(NetworkControlEnabled());
    42584271    remotecontrol->addChild(NetworkControlPort());
    42594272    addChild(remotecontrol);