mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 08:05:18 -04:00
Added a simple startup splash screen.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3684 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
6a55d75a86
commit
3a50bcb8f7
6 changed files with 96 additions and 46 deletions
|
@ -21,6 +21,7 @@
|
|||
|
||||
#include <QObject>
|
||||
#include <QMessageBox>
|
||||
#include <QSplashScreen>
|
||||
#include <rshare.h>
|
||||
#ifndef MINIMAL_RSGUI
|
||||
#include "gui/MainWindow.h"
|
||||
|
@ -40,6 +41,7 @@
|
|||
#include "gui/connect/ConfCertDialog.h"
|
||||
#include "idle/idle.h"
|
||||
#include "gui/common/Emoticons.h"
|
||||
#include "gui/QuickStartWizard.h"
|
||||
|
||||
/*** WINDOWS DON'T LIKE THIS - REDEFINES VER numbers.
|
||||
#include <gui/qskinobject/qskinobject.h>
|
||||
|
@ -83,6 +85,8 @@ int main(int argc, char *argv[])
|
|||
Rshare rshare(args, argc, argv,
|
||||
QString::fromStdString(RsInit::RsConfigDirectory()));
|
||||
|
||||
QSplashScreen splashScreen(QPixmap(":/images/splash.png")/* , Qt::WindowStaysOnTopHint*/);
|
||||
|
||||
/* Login Dialog */
|
||||
if (!okStart)
|
||||
{
|
||||
|
@ -121,9 +125,13 @@ int main(int argc, char *argv[])
|
|||
GenCertDialog gd;
|
||||
gd.exec ();
|
||||
}
|
||||
|
||||
splashScreen.show();
|
||||
}
|
||||
else
|
||||
{
|
||||
splashScreen.show();
|
||||
splashScreen.showMessage(rshare.translate("SplashScreen", "Load profile"), Qt::AlignHCenter | Qt::AlignBottom);
|
||||
|
||||
std::string preferredId, gpgId, gpgName, gpgEmail, sslName;
|
||||
RsInit::getPreferedAccountId(preferredId);
|
||||
|
@ -158,8 +166,12 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
splashScreen.showMessage(rshare.translate("SplashScreen", "Load configuration"), Qt::AlignHCenter | Qt::AlignBottom);
|
||||
|
||||
rsicontrol->StartupRetroShare();
|
||||
|
||||
splashScreen.showMessage(rshare.translate("SplashScreen", "Create interface"), Qt::AlignHCenter | Qt::AlignBottom);
|
||||
|
||||
/* recreate global settings object, now with correct path */
|
||||
RshareSettings::Create ();
|
||||
RsharePeerSettings::Create();
|
||||
|
@ -171,7 +183,16 @@ int main(int argc, char *argv[])
|
|||
#else
|
||||
Emoticons::load();
|
||||
|
||||
if (Settings->value(QString::fromUtf8("FirstRun"), true).toBool()) {
|
||||
splashScreen.hide();
|
||||
|
||||
Settings->setValue(QString::fromUtf8("FirstRun"), false);
|
||||
QuickStartWizard qstartWizard;
|
||||
qstartWizard.exec();
|
||||
}
|
||||
|
||||
MainWindow *w = MainWindow::Create ();
|
||||
splashScreen.finish(w);
|
||||
|
||||
// I'm using a signal to transfer the hashing info to the mainwindow, because Qt schedules signals properly to
|
||||
// avoid clashes between infos from threads.
|
||||
|
@ -214,6 +235,8 @@ int main(int argc, char *argv[])
|
|||
if(!Settings->value(QString::fromUtf8("StartMinimized"), false).toBool())
|
||||
{
|
||||
w->show();
|
||||
} else {
|
||||
splashScreen.close();
|
||||
}
|
||||
|
||||
/* Startup a Timer to keep the gui's updated */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue