diff --git a/mythtv/libs/libmyth/mythcontext.cpp b/mythtv/libs/libmyth/mythcontext.cpp
index 130f4ec93fb..183b4884b20 100644
a
|
b
|
void MythContextPrivate::TempMainWindow(bool languagePrompt) |
292 | 292 | |
293 | 293 | SilenceDBerrors(); |
294 | 294 | |
295 | | loadSettingsCacheOverride(); |
296 | | |
297 | 295 | #ifdef Q_OS_MAC |
298 | 296 | // Qt 4.4 has window-focus problems |
299 | 297 | gCoreContext->OverrideSettingForSession("RunFrontendInWindow", "1"); |
… |
… |
bool MythContextPrivate::Init(const bool gui, |
353 | 351 | { |
354 | 352 | gCoreContext->GetDB()->IgnoreDatabase(ignoreDB); |
355 | 353 | m_gui = gui; |
| 354 | loadSettingsCacheOverride(); |
356 | 355 | |
357 | 356 | if (gCoreContext->IsFrontend()) |
358 | 357 | needsBackend = true; |
… |
… |
QString MythContextPrivate::TestDBconnection(bool prompt) |
848 | 847 | {"start","dbAwake","dbStarted","dbConnects","beWOL","beAwake", |
849 | 848 | "success" }; |
850 | 849 | |
| 850 | int msStartupScreenDelay = gCoreContext->GetNumSetting("StartupScreenDelay",2); |
| 851 | if (msStartupScreenDelay > 0) |
| 852 | msStartupScreenDelay *= 1000; |
851 | 853 | do |
852 | 854 | { |
| 855 | QElapsedTimer timer; |
| 856 | timer.start(); |
853 | 857 | if (m_DBparams.dbHostName.isNull() && m_DBhostCp.length()) |
854 | 858 | host = m_DBhostCp; |
855 | 859 | else |
… |
… |
QString MythContextPrivate::TestDBconnection(bool prompt) |
892 | 896 | // After that show the GUI (if this is a GUI program) |
893 | 897 | |
894 | 898 | LOG(VB_GENERAL, LOG_INFO, |
895 | | QString("Start up testing connections. DB %1, BE %2, attempt %3, status %4") |
896 | | .arg(host).arg(backendIP).arg(attempt).arg(guiStatuses[startupState])); |
| 899 | QString("Start up testing connections. DB %1, BE %2, attempt %3, status %4, Delay: %5") |
| 900 | .arg(host).arg(backendIP).arg(attempt).arg(guiStatuses[startupState]).arg(msStartupScreenDelay) ); |
897 | 901 | |
898 | 902 | int useTimeout = wakeupTime; |
899 | 903 | if (attempt == 0) |
… |
… |
QString MythContextPrivate::TestDBconnection(bool prompt) |
901 | 905 | |
902 | 906 | if (m_gui && !m_guiStartup) |
903 | 907 | { |
904 | | if (attempt > 0) |
| 908 | if (msStartupScreenDelay==0 || timer.hasExpired(msStartupScreenDelay)) |
905 | 909 | { |
906 | 910 | ShowGuiStartup(); |
907 | 911 | if (m_guiStartup) |
… |
… |
QString MythContextPrivate::TestDBconnection(bool prompt) |
1018 | 1022 | QString("Start up failure. host %1, status %2") |
1019 | 1023 | .arg(host).arg(stateMsg)); |
1020 | 1024 | |
| 1025 | if (m_gui && !m_guiStartup) |
| 1026 | { |
| 1027 | ShowGuiStartup(); |
| 1028 | if (m_guiStartup) |
| 1029 | m_guiStartup->setTotal(progressTotal); |
| 1030 | } |
| 1031 | |
1021 | 1032 | if (m_guiStartup |
1022 | 1033 | && !m_guiStartup->m_Exit |
1023 | 1034 | && !m_guiStartup->m_Setup |
… |
… |
void MythContextPrivate::processEvents(void) |
1472 | 1483 | const QString MythContextPrivate::settingsToSave[] = |
1473 | 1484 | { "Theme", "Language", "Country", "GuiHeight", |
1474 | 1485 | "GuiOffsetX", "GuiOffsetY", "GuiWidth", "RunFrontendInWindow", |
1475 | | "AlwaysOnTop", "HideMouseCursor", "ThemePainter", "libCECEnabled" }; |
| 1486 | "AlwaysOnTop", "HideMouseCursor", "ThemePainter", "libCECEnabled", |
| 1487 | "StartupScreenDelay" }; |
1476 | 1488 | |
1477 | 1489 | |
1478 | 1490 | bool MythContextPrivate::saveSettingsCache(void) |
diff --git a/mythtv/programs/mythfrontend/globalsettings.cpp b/mythtv/programs/mythfrontend/globalsettings.cpp
index 2523fd133a4..68485cb19e9 100644
a
|
b
|
static HostCheckBoxSetting *AlwaysOnTop() |
2426 | 2426 | return gc; |
2427 | 2427 | } |
2428 | 2428 | |
| 2429 | static HostSpinBoxSetting *StartupScreenDelay() |
| 2430 | { |
| 2431 | HostSpinBoxSetting *gs = new HostSpinBoxSetting("StartupScreenDelay", -1, 60, 1, 1, "Never show startup screen"); |
| 2432 | |
| 2433 | gs->setLabel(AppearanceSettings::tr("Startup Screen Delay")); |
| 2434 | |
| 2435 | gs->setValue(2); |
| 2436 | |
| 2437 | gs->setHelpText(AppearanceSettings::tr( |
| 2438 | "The Startup Screen will show the progress of starting the frontend " |
| 2439 | "if frontend startup takes longer than this number of seconds.")); |
| 2440 | return gs; |
| 2441 | } |
| 2442 | |
| 2443 | |
2429 | 2444 | static HostComboBoxSetting *MythDateFormatCB() |
2430 | 2445 | { |
2431 | 2446 | HostComboBoxSetting *gc = new HostComboBoxSetting("DateFormat"); |
… |
… |
AppearanceSettings::AppearanceSettings() |
4255 | 4270 | screen->addChild(RunInWindow()); |
4256 | 4271 | screen->addChild(UseFixedWindowSize()); |
4257 | 4272 | screen->addChild(AlwaysOnTop()); |
| 4273 | screen->addChild(StartupScreenDelay()); |
4258 | 4274 | #ifdef USING_AIRPLAY |
4259 | 4275 | screen->addChild(AirPlayFullScreen()); |
4260 | 4276 | #endif |