iMediaObject = new Phonon::MediaObject(this);
Phonon::AudioOutput* aout = new Phonon::AudioOutput(Phonon::NotificationCategory, this);
Phonon::createPath(iMediaObject, aout);
-
- resetIdlingTime();
}
MainWindow::~MainWindow()
{
//install
- if( iIdlingSince < QDateTime::currentDateTime().addSecs(-30*60) )
- iAptInterface->setNeedRefresh(-1,1,1,1);
+ int listupd = -1;
+ int dpkgupd = -1;
+ if( iAptInterface->lastListUpdate() < QDateTime::currentDateTime().addSecs(-KListExpireTime) )
+ listupd = 1;
+ if( iAptInterface->lastDpkgUpdate() < QDateTime::currentDateTime().addSecs(-KListExpireTime) )
+ dpkgupd = 1;
+ iAptInterface->setNeedRefresh(-1,listupd,dpkgupd,listupd);
iWinPackageView->setStatFilter( Package::PkgStatNotInstalled );
- if( iAptInterface->needRepoRefresh() )
+ if( iAptInterface->needRepoRefresh() && !iSettings->qsettings()->value("no_catalogs_autoupdate",false).toBool() )
iAptInterface->addQueuedOperation(AAptInterface::ModeAptGetUpdate);
busyDialog(true, tr("Operation in progress"), tr("Reading package lists"));
{
// upgrade
- if( iIdlingSince < QDateTime::currentDateTime().addSecs(-30*60) )
- iAptInterface->setNeedRefresh(-1,1,1,1);
+ int listupd = -1;
+ int dpkgupd = -1;
+ if( iAptInterface->lastListUpdate() < QDateTime::currentDateTime().addSecs(-KListExpireTime) )
+ listupd = 1;
+ if( iAptInterface->lastDpkgUpdate() < QDateTime::currentDateTime().addSecs(-KListExpireTime) )
+ dpkgupd = 1;
+ iAptInterface->setNeedRefresh(-1,listupd,dpkgupd,listupd);
iWinPackageView->setStatFilter( Package::PkgStatUpgradeable );
- if( iAptInterface->needRepoRefresh() )
+ if( iAptInterface->needRepoRefresh() && !iSettings->qsettings()->value("no_catalogs_autoupdate",false).toBool() )
iAptInterface->addQueuedOperation(AAptInterface::ModeAptGetUpdate);
busyDialog(true, tr("Operation in progress"), tr("Reading package lists"));
if( !iSettings->qsettings()->value("remove_readfull",false).toBool() )
iAptInterface->setSkipListAndDates();
- if( iIdlingSince < QDateTime::currentDateTime().addSecs(-30*60) )
- iAptInterface->setNeedRefresh(-1,-1,1,-1);
+ int dpkgupd = -1;
+ if( iAptInterface->lastDpkgUpdate() < QDateTime::currentDateTime().addSecs(-KListExpireTime) )
+ dpkgupd = 1;
+ iAptInterface->setNeedRefresh(-1,-1,dpkgupd,-1);
iWinPackageView->setStatFilter( Package::PkgStatInstalled );
}
QString text = "<br><b><u>Faster Application Manager</u></b><br>"
- "<b>"+title+"</b><br>" + msgs.join("<br>") + "<br>";
+ "<b>"+title+"</b><br>" + msgs.join("<br>") + "<br>";
+ QRect r = QApplication::desktop()->rect();
+ if(r.width() < r.height()) {
+ ConfirmDialog d(false, this);
+ d.setText(title,msgs.join("<br>"));
+ d.exec();
+ } else {
#ifdef Q_WS_MAEMO_5
- QMaemo5InformationBox::information(0, text, QMaemo5InformationBox::NoTimeout);
+ QMaemo5InformationBox::information(0, text, QMaemo5InformationBox::NoTimeout);
#endif
+ }
+
}
}