diff options
author | Ken Moore <moorekou@gmail.com> | 2018-10-22 10:27:49 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2018-10-22 10:27:49 -0400 |
commit | 49d56759d74f9c96adf35c541a77951518c82c7b (patch) | |
tree | f4a21491b56046b00af135a87ac47c29f525d711 /src-qt5/core | |
parent | Remove all the pc-updatemanager usage from Lumina (FreeBSD) (diff) | |
download | lumina-49d56759d74f9c96adf35c541a77951518c82c7b.tar.gz lumina-49d56759d74f9c96adf35c541a77951518c82c7b.tar.bz2 lumina-49d56759d74f9c96adf35c541a77951518c82c7b.zip |
Cleanup a little bit of the startup quote fetching system.
No real change - just checking things.
Diffstat (limited to 'src-qt5/core')
-rw-r--r-- | src-qt5/core/lumina-desktop/BootSplash.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src-qt5/core/lumina-desktop/BootSplash.cpp b/src-qt5/core/lumina-desktop/BootSplash.cpp index 75bbcdaf..7ad0e4e7 100644 --- a/src-qt5/core/lumina-desktop/BootSplash.cpp +++ b/src-qt5/core/lumina-desktop/BootSplash.cpp @@ -18,6 +18,9 @@ BootSplash::BootSplash() : QWidget(0, Qt::SplashScreen | Qt::X11BypassWindowMana } void BootSplash::generateTipOfTheDay(){ + bool disablequotes = sessionsettings.value("DisableQuotes").toBool(false); + if (disablequotes){ ui->label_welcome->setText(""); return; } + //Try to find a system-defined message of the day for lumina QStringList dirs; dirs << LOS::AppPrefix()+"/etc/" << LOS::SysPrefix()+"/etc/" << L_ETCDIR+"/"; QString sysMOTD = "lumina-motd"; @@ -36,8 +39,7 @@ void BootSplash::generateTipOfTheDay(){ }else{ QSettings sessionsettings("lumina-desktop","sessionsettings"); - bool disablequotes = sessionsettings.value("DisableQuotes").toBool(); - if (disablequotes == false){ + int index = qrand()%46; //Make sure this number matches the length of the case below (max value +1) switch(index){ case 0: @@ -132,8 +134,7 @@ void BootSplash::generateTipOfTheDay(){ tip = "\""+tr("The truth is more important than the facts.")+"\"\n\n- Frank Lloyd Wright -"; break; case 45: tip = "\""+tr("Better to remain silent and be thought a fool than to speak out and remove all doubt.")+"\"\n\n- Abraham Lincoln -"; break; - } //end of switch for tips - } // end else statement for disabling quotes + } //end of switch for tips } //end of fallback tip generation ui->label_welcome->setText( tip); } @@ -145,17 +146,17 @@ void BootSplash::showScreen(QString loading){ //update icon, text, and progress txt = tr("Initializing Session …"); per = 10; icon = "preferences-system-login"; }else if(loading=="settings"){ - txt = tr("Loading System Settings …"); per = 20; + txt = tr("Loading System Settings …"); per = 20; icon = "user-home"; }else if(loading=="user"){ - txt = tr("Loading User Preferences …"); per = 30; + txt = tr("Loading User Preferences …"); per = 30; icon = "preferences-desktop-user"; }else if(loading=="systray"){ txt = tr("Preparing System Tray …"); per = 40; icon = "preferences-plugin"; }else if(loading=="wm"){ txt = tr("Starting Window Manager …"); per = 50; - icon = "preferences-system-windows-actions"; + icon = "preferences-system-windows-actions"; }else if(loading=="apps"){ txt = tr("Detecting Applications …"); per = 60; icon = "preferences-desktop-icons"; @@ -164,10 +165,10 @@ void BootSplash::showScreen(QString loading){ //update icon, text, and progress icon = "preferences-system-windows"; }else if(loading=="desktop"){ txt = tr("Preparing Workspace …"); per = 80; - icon = "preferences-desktop-wallpaper"; + icon = "preferences-desktop-wallpaper"; }else if(loading=="final"){ txt = tr("Finalizing …"); per = 90; - icon = "start-here-lumina"; + icon = "start-here-lumina"; }else if(loading.startsWith("app::")){ txt = QString(tr("Starting App: %1")).arg(loading.section("::",1,50)); per = -1; } @@ -180,7 +181,7 @@ void BootSplash::showScreen(QString loading){ //update icon, text, and progress this->update(); QApplication::processEvents(); } - + void BootSplash::showText(QString txt){ //will only update the text, not the icon/progress ui->label_text->setText(txt); this->show(); |