Ticket #3753: frontend-generalsettings-cleanup-180707.diff

File frontend-generalsettings-cleanup-180707.diff, 4.9 KB (added by devel@…, 17 years ago)

Rearrangement of some parts of general/appearance settings

  • mythtv/programs/mythfrontend/globalsettings.cpp

     
    15231534    return gc;
    15241535}
    15251536
    1526 
    15271537static HostComboBox *XineramaMonitorAspectRatio()
    15281538{
    15291539    HostComboBox *gc = new HostComboBox("XineramaMonitorAspectRatio");
     
    26232633    return gs;
    26242634}
    26252635
     2636class NetworkControlSettings : public TriggeredConfigurationGroup
     2637{
     2638  public:
     2639     NetworkControlSettings() :
     2640         TriggeredConfigurationGroup(false, false, true, true)
     2641     {
     2642         setLabel(QObject::tr("Network Control"));
     2643         setUseLabel(false);
     2644
     2645         Setting* controlEnabled = NetworkControlEnabled();
     2646         addChild(controlEnabled);
     2647         setTrigger(controlEnabled);
     2648
     2649         ConfigurationGroup* settings = new VerticalConfigurationGroup(false, true);
     2650         settings->addChild(NetworkControlPort());
     2651         addTarget("1", settings);
     2652
     2653         // show nothing if fillEnabled is off
     2654         addTarget("0", new VerticalConfigurationGroup(false, true));
     2655     };
     2656};
     2657
    26262658static HostCheckBox *RealtimePriority()
    26272659{
    26282660    HostCheckBox *gc = new HostCheckBox("RealtimePriority");
     
    30713103         Setting* logEnabled = LogEnabled();
    30723104         addChild(logEnabled);
    30733105         setTrigger(logEnabled);
    3074          addChild(LogMaxCount());
    30753106
    30763107         ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
     3108         settings->addChild(LogMaxCount());
    30773109         settings->addChild(LogPrintLevel());
    30783110         settings->addChild(LogCleanEnabled());
    30793111         settings->addChild(LogCleanPeriod());
    (this hunk was shorter than expected) 
    35373569    AudioSettings *audio = new AudioSettings();
    35383570    addChild(audio);
    35393571
     3572    VerticalConfigurationGroup* misc = new VerticalConfigurationGroup(false);
     3573    misc->setLabel(QObject::tr("Miscellaneous"));
     3574    ConfigurationGroup *pin = new HorizontalConfigurationGroup();
     3575    pin->setLabel(QObject::tr("Settings Access"));
     3576    pin->addChild(SetupPinCodeRequired());
     3577    pin->addChild(SetupPinCode());
     3578    misc->addChild(pin);
     3579    VerticalConfigurationGroup* shutdownSettings = new VerticalConfigurationGroup(true);
     3580    shutdownSettings->setLabel(QObject::tr("Shutdown Settings"));
     3581    shutdownSettings->addChild(HaltCommand());
     3582    misc->addChild(shutdownSettings);
     3583    addChild(misc);
     3584
    35403585    VerticalConfigurationGroup* general = new VerticalConfigurationGroup(false);
    3541     general->setLabel(QObject::tr("General"));
     3586    general->setLabel(QObject::tr("Control"));
    35423587    general->addChild(AllowQuitShutdown());
    35433588    general->addChild(NoPromptOnExit());
    3544     general->addChild(HaltCommand());
    35453589    general->addChild(LircKeyPressedApp());
    35463590    general->addChild(UseArrowAccels());
    3547     general->addChild(NetworkControlEnabled());
    3548     general->addChild(NetworkControlPort());
     3591    general->addChild(UseVirtualKeyboard());
     3592    NetworkControlSettings *controlSettings = new NetworkControlSettings();
     3593    general->addChild(controlSettings);
    35493594    addChild(general);
    35503595
    35513596    general = new VerticalConfigurationGroup(false);
     3597
    35523598    general->setLabel(QObject::tr("General"));
    35533599
    3554     ConfigurationGroup *pin = new HorizontalConfigurationGroup();
    3555     pin->setLabel(QObject::tr("Settings Access"));
    3556     pin->addChild(SetupPinCodeRequired());
    3557     pin->addChild(SetupPinCode());
    3558 
    35593600    ConfigurationGroup *mediaMon = new VerticalConfigurationGroup();
    35603601    mediaMon->setLabel(QObject::tr("Removable Media"));
    35613602    mediaMon->addChild(EnableMediaMon());
    35623603    mediaMon->addChild(IgnoreMedia());
    35633604
    3564     general->addChild(pin);
    35653605    general->addChild(mediaMon);
    35663606    general->addChild(EnableXbox());
    35673607    addChild(general);
     
    38623903    screen->addChild(HideMouseCursor());
    38633904    screen->addChild(RunInWindow());
    38643905    addChild(screen);
     3906   
     3907    VerticalConfigurationGroup* qttheme = new VerticalConfigurationGroup(false);
     3908    qttheme->setLabel(QObject::tr("QT / Appearance"));
     3909    qttheme->addChild(QtFontSmall());
     3910    qttheme->addChild(QtFontMedium());
     3911    qttheme->addChild(QtFontBig());
     3912    qttheme->addChild(QtFonTweak());
     3913    qttheme->addChild(PlayBoxTransparency());
     3914    qttheme->addChild(PlayBoxShading());
     3915    addChild(qttheme );
    38653916
    38663917#if defined(USING_XRANDR) || defined(CONFIG_DARWIN)
    38673918    const vector<DisplayResScreen> scr = GetVideoModes();
     
    38783929    dates->addChild(MythTimeFormat());
    38793930    addChild(dates);
    38803931
    3881     VerticalConfigurationGroup* qttheme = new VerticalConfigurationGroup(false);
    3882     qttheme->setLabel(QObject::tr("QT"));
    3883     qttheme->addChild(QtFontSmall());
    3884     qttheme->addChild(QtFontMedium());
    3885     qttheme->addChild(QtFontBig());
    3886     qttheme->addChild(QtFonTweak());
    3887     qttheme->addChild(PlayBoxTransparency());
    3888     qttheme->addChild(PlayBoxShading());
    3889     qttheme->addChild(UseVirtualKeyboard());
    3890     addChild(qttheme );
    3891 
    38923932    addChild(new LcdSettings());
    38933933}
    38943934