From 7846ab98e9df6e171255543591e0f12c49b9391d Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 30 Oct 2015 16:25:56 -0400 Subject: Cleanup how auto-start apps are launched a bit (start them via a single lumina-open call now, instead of a bunch of individual ones). Also fix up the tray app detection/failover methods a bit to catch/discard tray icons which were registered/destroyed almost simultaneously (or no destroy event was ever caught for the icon). This prevents the situation where a "blank" tray icon may be trying to repaint itself repeatedly (eating up CPU cycles). NOTE: It seems like these "blank" tray apps are all GTK based, so it might be something in that toolkit which needs fixing to prevent registering a tray window which will never be used (or is instantly destroyed). --- lumina-desktop/BootSplash.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lumina-desktop/BootSplash.cpp') diff --git a/lumina-desktop/BootSplash.cpp b/lumina-desktop/BootSplash.cpp index b535fff4..e75bca21 100644 --- a/lumina-desktop/BootSplash.cpp +++ b/lumina-desktop/BootSplash.cpp @@ -41,10 +41,14 @@ void BootSplash::showScreen(QString loading){ //update icon, text, and progress }else if(loading=="final"){ txt = tr("Finalizing …"); per = 90; icon = "pcbsd"; + }else if(loading.startsWith("app::")){ + txt = QString(tr("Starting App: %1")).arg(loading.section("::",1,50)); per = -1; } - ui->progressBar->setValue(per); + if(per>0){ ui->progressBar->setValue(per); } + else{ ui->progressBar->setRange(0,0); } //loading indicator ui->label_text->setText(txt); - ui->label_icon->setPixmap( LXDG::findIcon(icon, "Lumina-DE").pixmap(64,64) ); + if(!icon.isEmpty()){ui->label_icon->setPixmap( LXDG::findIcon(icon, "Lumina-DE").pixmap(64,64) ); } + this->raise(); this->show(); this->update(); QApplication::processEvents(); -- cgit