Ticket #3377: mythwelcome-setup.diff

File mythwelcome-setup.diff, 2.4 KB (added by anonymous, 17 years ago)
  • programs/mythwelcome/welcomedialog.h

     
    2828  protected slots:
    2929    void startFrontendClick(void);
    3030    void startFrontend(void);
     31    void startSetup(void);
    3132    void updateAll(void);
    3233    void updateStatus(void);
    3334    void updateScreen(void);
  • programs/mythwelcome/welcomedialog.cpp

     
    7777    myth_system(startFECmd.ascii());
    7878}
    7979
     80void WelcomeDialog::startSetup(void)
     81{
     82
     83    cancelPopup();
     84    QString startSUCmd = gContext->GetSetting("MythWelcomeStartSUCmd",
     85                         m_installDir + "/bin/mythtv-setup");
     86   
     87    myth_system(startSUCmd.ascii());
     88}
     89
    8090void WelcomeDialog::startFrontendClick(void)
    8191{
    8292    // this makes sure the button appears to click properly
     
    694704                         SLOT(runEPGGrabber()));
    695705    popup->addButton(tr("Shutdown Now"), this,
    696706                         SLOT(shutdownNow()));
     707    popup->addButton(tr("Run Setup"), this,
     708                         SLOT(startSetup()));
    697709    popup->addButton(tr("Exit"), this,
    698710                         SLOT(closeDialog()));
    699711    popup->addButton(tr("Cancel"), this, SLOT(cancelPopup()));
  • programs/mythwelcome/welcomesettings.cpp

     
    173173    return gc;
    174174};
    175175
     176static HostLineEdit *MythShutdownStartSUCmd()
     177{
     178    HostLineEdit *gc = new HostLineEdit("MythWelcomeStartSUCmd");
     179    gc->setLabel(QObject::tr("Command to run to start Setup"));
     180    gc->setValue(gContext->GetInstallPrefix() + "/bin/mythtv-setup");
     181    gc->setHelpText(QObject::tr("Command to start mythtv-setup."));
     182    return gc;
     183};
     184
    176185static HostLineEdit *MythShutdownXTermCmd()
    177186{
    178187    HostLineEdit *gc = new HostLineEdit("MythShutdownXTermCmd");
     
    197206    vcg->addChild(MythShutdownPowerOff());
    198207    vcg->addChild(MythShutdownXTermCmd());
    199208    vcg->addChild(MythShutdownStartFECmd());
     209    vcg->addChild(MythShutdownStartSUCmd());
    200210
    201211    addChild(vcg);
    202212}