1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-26 01:35:21 +03:00

Merge pull request #505 from opentx/dvogonen/companion_splash_problem_504

Fixed #504.
This commit is contained in:
kilrah 2014-01-05 00:50:02 -08:00
commit 370cec86a9
3 changed files with 18 additions and 11 deletions

View file

@ -116,14 +116,15 @@ int main(int argc, char *argv[])
current_firmware_variant = GetFirmwareVariant(firmware_id); current_firmware_variant = GetFirmwareVariant(firmware_id);
// qDebug() << current_firmware_variant; // qDebug() << current_firmware_variant;
MainWindow mainWin;
if (showSplash) { if (showSplash) {
splash->show(); splash->show();
splash->showMessage(QObject::tr("")); QTimer::singleShot(1000*SPLASH_TIME, splash, SLOT(close()));
sleep(SPLASH_TIME); QTimer::singleShot(1000*SPLASH_TIME, &mainWin, SLOT(show()));
}
else {
mainWin.show();
} }
MainWindow mainWin;
mainWin.show();
splash->finish(&mainWin);
return app.exec(); return app.exec();
} }

View file

@ -112,9 +112,15 @@ downloadDialog_forWait(NULL)
QNetworkProxyFactory::setUseSystemConfiguration(true); QNetworkProxyFactory::setUseSystemConfiguration(true);
setAcceptDrops(true); setAcceptDrops(true);
// give time to the main windows to open before starting updates, delay 1s // give time to the splash to disappear and main window to open before starting updates
QTimer::singleShot(1000, this, SLOT(doAutoUpdates())); int updateDelay = 1000;
QTimer::singleShot(1000, this, SLOT(displayWarnings())); QSettings settings("companion9x", "companion9x");
bool showSplash = settings.value("show_splash", true).toBool();
if (showSplash)
updateDelay += (SPLASH_TIME*1000);
QTimer::singleShot(updateDelay, this, SLOT(doAutoUpdates()));
QTimer::singleShot(updateDelay, this, SLOT(displayWarnings()));
QStringList strl = QApplication::arguments(); QStringList strl = QApplication::arguments();
QString str; QString str;
QString printfilename; QString printfilename;

View file

@ -322,7 +322,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga
<message> <message>
<location line="+528"/> <location line="+528"/>
<source>Show Splash Screen on Startup</source> <source>Show Splash Screen on Startup</source>
<translation>Visa bild vid start av sändare</translation> <translation>Visa Startbild</translation>
</message> </message>
<message> <message>
<location line="+182"/> <location line="+182"/>
@ -9450,7 +9450,7 @@ Tryck på Avbryt för att avburyta kalibreringen</translation>
<message> <message>
<location line="-233"/> <location line="-233"/>
<source>Show Splash Screen</source> <source>Show Splash Screen</source>
<translation>Visa bild vid start av sändare</translation> <translation>Visa Startbild</translation>
</message> </message>
<message> <message>
<location line="+767"/> <location line="+767"/>