1 #ifdef MYDEF_GTK_EXISTS
11 #include <QDBusConnection>
12 #include <QDBusInterface>
13 #include <phonon/AudioOutput>
14 #include <phonon/MediaObject>
25 #include "mainwindow.h"
27 #include "ui_mainwindow.h"
28 #include "aaptinterface.h"
29 #include "packageview.h"
30 #include "confirmdialog.h"
36 #include "rotatingbackground.h"
37 #include "dpkginterface.h"
38 #include "installfile.h"
39 #include "repository.h"
42 MainWindow::MainWindow(QWidget *parent) :
44 ui(new Ui::MainWindow)
48 iAptInterface = new AAptInterface(this);
49 iWinPackageView = new PackageView(this);
50 iWinPackageView->setAptInterface(iAptInterface);
51 iWinRepoView = new RepoView(this);
52 iWinRepoView->setAptInterface(iAptInterface);
53 iSettings = new Settings(this);
54 iSettings->setAptInterface(iAptInterface);
55 iSettings->setPackageView(iWinPackageView);
56 iWinPackageView->setSettings(iSettings);
57 iAptInterface->setSettings(iSettings);
58 iDpkgInterface = new DpkgInterface(this);
60 iWinPackageView->setSortOrder( (PackageView::sortOrder)iSettings->qsettings()->value("default_sort_order",0).toInt() );
62 iWinPackageView->setSearchOptions( iSettings->qsettings()->value("search_pkgnames",true).toBool(),
63 iSettings->qsettings()->value("search_displaynames",true).toBool(),
64 iSettings->qsettings()->value("search_descshort",true).toBool(),
65 iSettings->qsettings()->value("search_desclong",false).toBool() );
68 if( !iSettings->qsettings()->value("disable_autorotation",false).toBool() ) {
69 this->setAttribute(Qt::WA_Maemo5AutoOrientation);
71 this->setAttribute(Qt::WA_Maemo5LandscapeOrientation);
73 this->setAttribute(Qt::WA_Maemo5StackedWindow);
76 iDimmer = new dimmer(this);
78 iReposAutoUpdating = false;
79 iUpgradeAutoUpdate = true;
80 iNextOperation = OpNone;
82 connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(orientationChanged()));
84 ui->centralWidget->loadWallpaper();
87 QString stylesheet_mainscreen =
89 "border-radius: 16px;"
91 "border-color: palette(light);"
92 "border-style: outset;"
93 "padding-right: 10px;"
95 "color: palette(buttontext);"
96 "background: rgba(255,255,255,80);"
98 "QPushButton:pressed {"
99 "border-style: inset;"
100 "background-color: rgba(255,255,255,150);"
104 if( ((QApplication*)QApplication::instance())->styleSheet().isEmpty() )
106 QString stylesheet_file;
107 QFile f("/root/.fapman/style.css");
108 if( f.open(QIODevice::ReadOnly | QIODevice::Text ) )
111 stylesheet_file += f.readLine().trimmed();
116 if( stylesheet_file.isEmpty() ) {
117 //ui->centralWidget->setStyleSheet(stylesheet_mainscreen);
119 ((QApplication*)QApplication::instance())->setStyleSheet(stylesheet_file);
124 iMediaObject = new Phonon::MediaObject(this);
125 Phonon::AudioOutput* aout = new Phonon::AudioOutput(Phonon::NotificationCategory, this);
126 Phonon::createPath(iMediaObject, aout);
130 iNetworkConfigurationManager = new QNetworkConfigurationManager(this);
131 iNetworkSession = new QNetworkSession(iNetworkConfigurationManager->defaultConfiguration(),this);
137 MainWindow::~MainWindow()
139 // save "need repo refresh" status
140 iSettings->qsettings()->setValue("need_repo_refresh", iAptInterface->needRepoRefresh());
142 if( iNetworkSession && iNetworkSession->isOpen() ) {
143 iNetworkSession->close();
145 // iNetworkSession automatically deleted by parent
147 delete iWinPackageView; iWinPackageView=0;
148 delete iWinRepoView; iWinRepoView=0;
149 delete iAptInterface; iAptInterface=0;
150 delete iDpkgInterface; iDpkgInterface=0;
151 delete iDimmer; iDimmer=0;
152 delete iSettings; iSettings=0;
154 //iMediaObject and aout automatically deleted by their parent
157 void MainWindow::openNetworkConnection()
159 if( iNetworkSession->isOpen() )
162 iNetworkSession->open();
163 if( !iNetworkSession->waitForOpened(20000) )
165 ConfirmDialog d(false, this);
166 d.setText("Network error","Unable to open a network connection");
171 void MainWindow::changeEvent(QEvent *e)
173 QMainWindow::changeEvent(e);
175 case QEvent::LanguageChange:
176 ui->retranslateUi(this);
183 void MainWindow::on_btnRepos_clicked()
185 iWinRepoView->openWin();
188 void MainWindow::on_btnUpdate_clicked()
192 openNetworkConnection();
194 busyDialog(true, tr("Operation in progress"), tr("Updating catalogs"));
196 iAptInterface->addQueuedOperation(AAptInterface::ModeAptGetUpdate);
197 iAptInterface->run(iDimmer);
201 int MainWindow::top_application()
210 void MainWindow::dateFetchAsk()
212 if( !iSettings->qsettings()->value("firstrun_asked_fetch_dates",false).toBool() &&
213 !iSettings->qsettings()->value("fetch_dates",false).toBool() )
215 iSettings->qsettings()->setValue("firstrun_asked_fetch_dates", true);
216 ConfirmDialog d(true, this);
217 d.setText("Fetch date information?","Enable date information fetching for packages? You have to enable it in order to be "
218 "able to sort packages by date. The first fetch can be slow but the dates are cached for later use. You can later "
219 "change this selection from the options menu.");
221 iSettings->qsettings()->setValue("fetch_dates", true);
223 if( iSettings->qsettings()->value("fetch_dates",false).toBool() )
225 iSettings->qsettings()->setValue("firstrun_asked_fetch_dates", true); // don't ask if the option has already been enabled
226 if( !iAptInterface->dateCacheExists() )
228 ConfirmDialog d(false, this);
229 d.setText("Notice","Date information will be fetched only for packages from maemo.org and only for user categories.");
232 iAptInterface->addQueuedOperation(AAptInterface::ModeFetchDates);
236 void MainWindow::on_btnListInstallable_clicked()
240 openNetworkConnection();
244 if( iAptInterface->lastListUpdate() < QDateTime::currentDateTime().addSecs(-KListExpireTime) )
246 if( iAptInterface->lastDpkgUpdate() < QDateTime::currentDateTime().addSecs(-KListExpireTime) )
248 iAptInterface->setNeedRefresh(-1,listupd,dpkgupd,listupd);
250 iWinPackageView->setStatFilter( Package::PkgStatNotInstalled );
252 if( iAptInterface->needRepoRefresh() && !iSettings->qsettings()->value("no_catalogs_autoupdate",false).toBool() )
253 iAptInterface->addQueuedOperation(AAptInterface::ModeAptGetUpdate);
255 busyDialog(true, tr("Operation in progress"), tr("Reading package lists"));
257 iNextOperation = OpOpenPkgView;
258 iAptInterface->addQueuedOperation(AAptInterface::ModeReadPackages);
262 iAptInterface->run(iDimmer);
265 void MainWindow::on_btnUpgrade_clicked()
269 openNetworkConnection();
273 if( iAptInterface->lastListUpdate() < QDateTime::currentDateTime().addSecs(-KListExpireTime) )
275 if( iAptInterface->lastDpkgUpdate() < QDateTime::currentDateTime().addSecs(-KListExpireTime) )
277 iAptInterface->setNeedRefresh(-1,listupd,dpkgupd,listupd);
279 iWinPackageView->setStatFilter( Package::PkgStatUpgradeable );
281 if( iAptInterface->needRepoRefresh() && !iSettings->qsettings()->value("no_catalogs_autoupdate",false).toBool() )
282 iAptInterface->addQueuedOperation(AAptInterface::ModeAptGetUpdate);
284 busyDialog(true, tr("Operation in progress"), tr("Reading package lists"));
286 iNextOperation = OpOpenPkgView;
287 iAptInterface->addQueuedOperation(AAptInterface::ModeReadPackages);
291 iAptInterface->run(iDimmer);
294 void MainWindow::on_btnListInstalled_clicked()
298 if( !iSettings->qsettings()->value("remove_readfull",false).toBool() )
299 iAptInterface->setSkipListAndDates();
302 if( iAptInterface->lastDpkgUpdate() < QDateTime::currentDateTime().addSecs(-KListExpireTime) )
304 iAptInterface->setNeedRefresh(-1,-1,dpkgupd,-1);
306 iWinPackageView->setStatFilter( Package::PkgStatInstalled );
308 busyDialog(true, tr("Operation in progress"), tr("Reading package lists"));
310 iNextOperation = OpOpenPkgView;
311 iAptInterface->addQueuedOperation(AAptInterface::ModeReadPackages);
315 iAptInterface->run(iDimmer);
318 void MainWindow::operationQueueFinished(QList<AAptInterface::interfaceMode> lastModes, bool success, QString title, QStringList msgs)
320 if( lastModes.contains(AAptInterface::ModeAptGetSimulate) && success ) {
321 iNextOperation = OpPromptSimulated;
323 if( lastModes.contains(AAptInterface::ModeAptGetInstall) && success ) {
324 iWinPackageView->clearSelections();
326 iWinPackageView->close();
327 iNextOperation = OpNone;
329 GdkEventIconThemeReload();
332 QWidget* dialogParent = this;
333 if( iWinPackageView->isVisible() )
334 dialogParent = iWinPackageView;
336 if( iNextOperation == OpOpenPkgView && success )
338 iWinPackageView->openWin();
340 iNextOperation = OpNone;
341 } else if( iNextOperation == OpPromptSimulated && success )
343 QStringList inst,remv,instver,remvver;
344 QStringList all = iAptInterface->processPackages();
345 QStringList vers = iAptInterface->processPackageVersions();
346 for(int zyx=0; zyx<all.count(); zyx++)
348 if( all.at(zyx).endsWith('-') )
350 remv.append( all.at(zyx).left( all.at(zyx).size()-1 ) );
351 if( vers.count()>zyx )
352 remvver.append( vers.at(zyx) );
354 inst.append( all.at(zyx) );
355 if( vers.count()>zyx )
356 instver.append( vers.at(zyx) );
360 int total_dl_size = 0;
361 for( int i=0; i<inst.count(); i++ ) {
362 Package* pkg = iAptInterface->packagesAvailable()->value(inst.at(i),0);
364 total_dl_size += pkg->size()/1024;
369 pkglist = QString("<b>The following operations will be performed:</b><br>"
370 "%1 to install/upgrade, %2 to remove<br>").arg(inst.count()).arg(remv.count());
372 pkglist += QString("Total download size: %L1 kB<br>").arg(total_dl_size);
373 bool mismatch = false;
374 bool warn_system_package_remove = false;
375 bool warn_system_package_install = false;
377 if( remv.count()>0 ) {
378 pkglist += "<br><b><u>REMOVE:</u></b><br><font size=\"-1\">";
379 for( int i=0; i<remv.count(); i++ ) {
380 pkglist += "<b>" + remv.at(i) + "</b>";
381 Package* pkg = iAptInterface->packagesInstalled()->value(remv.at(i),0);
383 qDebug() << "Warning: unknown package" << remv.at(i);
384 pkglist += "<font color=\"red\">***UNKNOWN***</font>";
388 if( pkg && pkg->maemoDisplayName()=="Maemo 5" ) {
389 warn_system_package_remove = true;
392 if( remvver.count()>i ) {
393 pkglist += " " + remvver.at(i);
394 if( pkg && remvver.at(i) != pkg->version() ) {
395 qDebug() << "Version mismatch, database version is" << pkg->version() << "but removing" << remvver.at(i);
397 pkglist += " <font color=\"red\">***TRYING TO REMOVE " + pkg->version() + "***</font> ";
400 if( pkg && pkg->installedSize()>0 )
401 pkglist += QString(" (%L1 kB)").arg(pkg->installedSize());
405 pkglist += "</font>";
407 bool installing_blacklisted = false;
408 if( inst.count()>0 ) {
409 pkglist += "<br><b><u>INSTALL/UPGRADE:</u></b><br><font size=\"-1\">";
410 for( int i=0; i<inst.count(); i++ ) {
411 pkglist += "<b>" + inst.at(i) + "</b>";
412 Package* pkg = iAptInterface->packagesAvailable()->value(inst.at(i),0);
414 qDebug() << "Warning: unknown package" << inst.at(i);
415 pkglist += "<font color=\"red\">***NEW/UNKNOWN***</font>";
418 if( pkg && pkg->isBlacklisted() ) {
419 qDebug() << "Warning: installing blacklisted package" << inst.at(i);
420 pkglist += "<font color=\"red\">***BLACKLISTED***</font>";
421 installing_blacklisted = true;
424 if( pkg && pkg->maemoDisplayName()=="Maemo 5" ) { // unreliable?
425 warn_system_package_install = true;
428 if( instver.count()>i ) {
429 pkglist += " " + instver.at(i);
430 if( pkg && instver.at(i) != pkg->version() ) {
431 qDebug() << "Version mismatch, database version is" << pkg->version() << "but installing" << instver.at(i);
433 pkglist += " <font color=\"red\">***TRYING TO INSTALL " + pkg->version() + "***</font> ";
436 if( pkg && pkg->size()>0 ) {
437 pkglist += QString(" (%L1 kB)").arg(pkg->size()/1024);
442 pkglist += "</font>";
445 ConfirmDialog m(false, dialogParent);
446 m.setText("Warning", "There is a version mismatch between your original package selections and some of the packages being installed " \
447 "from the repositories. This could be due to your application catalogs being out of date.");
450 if( installing_blacklisted ) {
451 ConfirmDialog b(false, dialogParent);
452 b.setText("Warning","Blacklisted package(s) will be installed");
455 if( warn_system_package_remove ) {
456 ConfirmDialog s(false, dialogParent);
457 s.setText("Warning","You are about to remove a critical system package.");
460 if( warn_system_package_install ) {
461 ConfirmDialog s(false, dialogParent);
462 s.setText("Warning","You are trying to perform an install/upgrade operation on a critical system package. Doing a system upgrade with " \
463 "Faster Application Manager has not been tested and it could result in a horrible failure. You have been warned.");
468 ConfirmDialog d(true, dialogParent);
469 if( inst.count()==0 && remv.count()==0 )
471 pkglist = "None of the packages can be installed";
474 d.setText("Confirmation",pkglist);
476 iAptInterface->addQueuedOperation(AAptInterface::ModeAptGetInstall);
478 if( iSettings->qsettings()->value("enable_autoclean",true).toBool() && inst.count()>0 )
479 iAptInterface->addQueuedOperation(AAptInterface::ModeAptGetClean);
482 if( remv.count() > 0 )
483 busytext += QString("Remove %1 package(s)<br>").arg(remv.count());
484 if( inst.count() > 0 )
485 busytext += QString("Install %1 package(s)<br>").arg(inst.count());
486 busytext += "Preparing...";
487 busyDialog(true, "Operation in progress", busytext);
489 // "run" really does nothing here since the previous item should still be running
490 if( iWinPackageView->isVisible() ) {
491 iAptInterface->run(iWinPackageView->mydimmer());
493 iAptInterface->run(iDimmer);
496 iNextOperation = OpNone;
500 iNextOperation = OpNone;
502 if( iSettings->qsettings()->value("sound_notify",false).toBool() )
504 qDebug() << "playing sound";
505 iMediaObject->setCurrentSource( Phonon::MediaSource(iSettings->qsettings()->value("sound_file","/usr/share/sounds/ui-operation_ready.wav").toString()) );
506 iMediaObject->play();
509 QString text = "<br><b><u>Faster Application Manager</u></b><br>"
510 "<b>"+title+"</b><br>" + msgs.join("<br>") + "<br>";
512 QRect r = QApplication::desktop()->rect();
513 if(r.width() < r.height()) {
514 ConfirmDialog d(false, dialogParent);
515 d.setText(title,msgs.join("<br>"));
519 QMaemo5InformationBox::information(0, text, QMaemo5InformationBox::NoTimeout);
521 ConfirmDialog d(false, dialogParent);
522 d.setText(title,msgs.join("<br>"));
532 void MainWindow::busyDialog(bool show_, QString title, QString text)
535 iDimmer->setProgress(-1);
536 ui->menuMenu->setEnabled(false);
537 ui->centralWidget->setEnabled(false);
538 iWinPackageView->disableMenu();
539 iDimmer->resizeEvent(0);
540 iDimmer->dim(title, text);
541 iWinPackageView->mydimmer()->resizeEvent(0);
542 iWinPackageView->mydimmer()->dim(title, text);
545 iWinPackageView->mydimmer()->undim();
546 ui->menuMenu->setEnabled(true);
547 ui->centralWidget->setEnabled(true);
548 iWinPackageView->enableMenu();
552 void MainWindow::on_actionAbout_triggered()
554 ConfirmDialog d(false, this);
555 d.setText("About","Faster Application Manager<br>"
556 "<font size=\"-1\">Version " + PROGRAM_VERSION + "</font><br><br>"
557 "(C) Heikki Holstila 2010<br>Donate using "
558 "<a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=6ZKRY5QFHL42A&lc=FI&item_name=Faster%20Application%20Manager"
559 "%20for%20Maemo5¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted\">PayPal</a>");
563 void MainWindow::on_actionClean_triggered()
565 //if( iOperation != OpNone ) return;
566 //iOperation = OpClean;
567 iAptInterface->addQueuedOperation(AAptInterface::ModeAptGetClean);
568 iAptInterface->run(iDimmer);
571 void MainWindow::closeEvent(QCloseEvent *event)
573 if( iDimmer->busy() ) {
574 iAptInterface->cancel();
581 void MainWindow::on_actionView_log_triggered()
583 QByteArray log = iAptInterface->readLogFile();
584 LogView l(log, this);
588 void MainWindow::on_actionOptions_triggered()
590 iSettings->openWin();
593 void MainWindow::notifyDialog(QString title, QString msg)
595 QWidget* dialogParent = this;
596 if( iWinPackageView->isVisible() )
597 dialogParent = iWinPackageView;
599 ConfirmDialog d(false, dialogParent);
600 d.setText(title, msg);
604 bool MainWindow::confirmDialog(QString title, QString msg)
606 QWidget* dialogParent = this;
607 if( iWinPackageView->isVisible() )
608 dialogParent = iWinPackageView;
610 ConfirmDialog d(true, dialogParent);
611 d.setText(title, msg);
615 void MainWindow::GdkEventIconThemeReload()
617 // DOES NOT EVEN WORK (at least not reliably) - disabled from the project file
619 #ifdef MYDEF_GTK_EXISTS
620 qDebug() << "Sending GDK icon theme reload event";
622 gdk_init((int*)QApplication::argc(),(gchar***)QApplication::argv());
624 // taken from hildon application manager
626 ev.type = GDK_CLIENT_EVENT;
628 ev.send_event = TRUE;
629 ev.message_type = gdk_atom_intern_static_string("_GTK_LOAD_ICONTHEMES");
631 gdk_event_send_clientmessage_toall((GdkEvent*)&ev);
633 while(gdk_events_pending()) {
634 g_main_context_iteration(NULL, true);
640 void MainWindow::on_actionLoad_file_triggered()
643 QStringList files = QFileDialog::getOpenFileNames(this, "Open files", "/", "Files (*.deb *.install)");
645 QStringList installs;
646 if( files.count() > 0 ) {
647 debs = files.filter(QRegExp(".*\\.deb$"));
648 installs = files.filter(QRegExp(".*\\.install$"));
649 if( debs.count()>0 && installs.count()>0 ) {
650 ConfirmDialog d(false, this);
651 d.setText("Error", "You can't mix different file types in your selection");
654 } else if( installs.count() != 1 ) {
655 ConfirmDialog d(false, this);
656 d.setText("Error","Select only one install file");
661 iDpkgInterface->loadDebFiles(debs);
662 else if( installs.count()==1 )
663 InstallFile instf(installs.at(0));
667 QString file = QFileDialog::getOpenFileName(this, "Open file", "/", "Install files (*.install)");
668 if( !file.isEmpty() ) {
669 InstallFile instf( file );
670 bool reposchanged = false;
671 if( instf.isValid() ) {
672 qDebug() << "SUCCESS";
673 for(int i=0; i<instf.repositories().count(); i++) {
674 qDebug() << instf.repositories().at(i)->toString();
676 for(int j=0; j<iAptInterface->repositories()->count(); j++) {
677 if( instf.repositories().at(i) && iAptInterface->repositories()->at(j) &&
678 instf.repositories().at(i)->toString(true) == iAptInterface->repositories()->at(j)->toString(true) )
682 if( !iAptInterface->repositories()->at(j)->enabled() ) {
683 iAptInterface->repositories()->at(j)->setEnabled(true);
685 qDebug() << "not enabled, enabling";
690 qDebug() << "repo not found, adding";
691 Repository* r = new Repository();
692 r->setFromString( instf.repositories().at(i)->toString(true) );
693 iAptInterface->repositories()->append(r);
700 iAptInterface->writeRepositories();
702 iAptInterface->setNeedRefresh(1,1,-1,1);
703 this->on_btnUpdate_clicked();
707 ConfirmDialog d(false, this);
708 d.setText("Error",instf.errorString());
714 void MainWindow::resizeEvent(QResizeEvent* event)
719 iDimmer->resize( this->size() );
722 QMainWindow::resizeEvent(event);
725 void MainWindow::rescaleMenuView()
727 QRect sg = ui->listWidget->rect();
729 if( sg.width() > sg.height() ) {
730 ui->listWidget->setGridSize( QSize((sg.width()-12)/5, (sg.height()-12)/2) );
732 ui->listWidget->setGridSize( QSize((sg.width()-12)/3, (sg.height()-12)/3) );
736 void MainWindow::orientationChanged()
741 void MainWindow::showFreeSpace()
743 quint64 warn_limit_root = 5120;
744 quint64 warn_limit_opt = 51200;
745 struct statfs root_stat;
746 struct statfs opt_stat;
747 statfs("/",&root_stat);
748 statfs("/opt",&opt_stat);
749 quint64 free_root = static_cast<quint64>(root_stat.f_bavail) * static_cast<quint64>(root_stat.f_bsize) / 1024;
750 quint64 free_opt = static_cast<quint64>(opt_stat.f_bavail) * static_cast<quint64>(opt_stat.f_bsize) / 1024;
751 quint64 total_root = static_cast<quint64>(root_stat.f_blocks) * static_cast<quint64>(root_stat.f_bsize) / 1024;
752 quint64 total_opt = static_cast<quint64>(opt_stat.f_blocks) * static_cast<quint64>(opt_stat.f_bsize) / 1024;
753 qDebug() << "rootfs" << free_root << "/" << total_root << "kB free";
754 qDebug() << "opt fs" << free_opt << "/" << total_opt << "kB free";
756 QString rootstr = QString("rootfs: %L1 / %L2 MB free").arg(free_root/1024).arg(total_root/1024);
757 QString optstr = QString("opt: %L1 / %L2 MB free").arg(free_opt/1024).arg(total_opt/1024);
759 ui->label->setText("<font size=\"-1\">" + rootstr + "<br>" + optstr + "</font>");
762 ui->progressBarRoot->setFormat(rootstr);
763 ui->progressBarRoot->setMaximum(total_root/1024);
764 ui->progressBarRoot->setValue(free_root/1024);
765 ui->progressBarOpt->setFormat(optstr);
766 ui->progressBarOpt->setMaximum(total_opt/1024);
767 ui->progressBarOpt->setValue(free_opt/1024);
770 if( free_root < warn_limit_root || free_opt < warn_limit_opt )
772 ConfirmDialog d(false, this);
774 if( free_root < warn_limit_root )
775 t += QString("Root filesystem has %L1 kB available<br>").arg(free_root);
776 if( free_opt < warn_limit_opt )
777 t += QString("Opt (home) filesystem has %L1 kB available<br>").arg(free_opt);
778 t += "<br>You may proceed, but consider freeing up space to prevent problems in the future";
779 d.setText("Warning: Low disk space",t);
784 void MainWindow::on_listWidget_itemClicked(QListWidgetItem* item)
786 qDebug() << "main menu:" << item->statusTip();
788 if( item->statusTip() == "manage_repos" ) {
789 on_btnRepos_clicked();
791 else if( item->statusTip() == "update_catalogs" ) {
792 on_btnUpdate_clicked();
794 else if( item->statusTip() == "install_apps" ) {
795 on_btnListInstallable_clicked();
797 else if( item->statusTip() == "remove_apps" ) {
798 on_btnListInstalled_clicked();
800 else if( item->statusTip() == "upgrade_apps" ) {
801 on_btnUpgrade_clicked();
804 qDebug() << "Warning: Unhandled main menu item";
806 item->setSelected(false);