Diffstat (limited to 'noncore/unsupported/oipkg/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp index 1c56aae..9c4c752 100644 --- a/noncore/unsupported/oipkg/mainwindow.cpp +++ b/noncore/unsupported/oipkg/mainwindow.cpp | |||
@@ -38,17 +38,13 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) : | |||
38 | settings = new PackageManagerSettings(this,0,TRUE); | 38 | settings = new PackageManagerSettings(this,0,TRUE); |
39 | listViewPackages = new PackageListView( this,"listViewPackages",settings ); | 39 | listViewPackages = new PackageListView( this,"listViewPackages",settings ); |
40 | setCentralWidget( listViewPackages ); | 40 | setCentralWidget( listViewPackages ); |
41 | listViewPackages->addList( tr("feeds"), &packageListServers ); | 41 | listViewPackages->addList( tr("feeds"), &packageListServers ); |
42 | listViewPackages->addList( tr("ipkgfind"), &packageListSearch ); | 42 | listViewPackages->addList( tr("ipkgfind"), &packageListSearch ); |
43 | listViewPackages->addList( tr("documents"), &packageListDocLnk ); | 43 | listViewPackages->addList( tr("documents"), &packageListDocLnk ); |
44 | //wait = new QMessageBox(tr("oipkg"),tr("Please wait")//,QMessageBox::Information,QMessageBox::NoButton,QMessageBox::NoButton,QMessageBox::NoButton); | ||
45 | //wait = new QMessageBox(this); | ||
46 | // wait->setText(tr("Please wait")); | ||
47 | ipkg = new PmIpkg( settings, this ); | 44 | ipkg = new PmIpkg( settings, this ); |
48 | // settings->setIpkg( ipkg ); | ||
49 | packageListServers.setSettings( settings ); | 45 | packageListServers.setSettings( settings ); |
50 | packageListSearch.setSettings( settings ); | 46 | packageListSearch.setSettings( settings ); |
51 | packageListDocLnk.setSettings( settings ); | 47 | packageListDocLnk.setSettings( settings ); |
52 | pvDebug(9,"packageListServers.update"); | 48 | pvDebug(9,"packageListServers.update"); |
53 | packageListServers.update(); | 49 | packageListServers.update(); |
54 | pvDebug(9,"packageListDocLnk.update"); | 50 | pvDebug(9,"packageListDocLnk.update"); |
@@ -266,39 +262,30 @@ void MainWindow::runIpkg() | |||
266 | e << lf; | 262 | e << lf; |
267 | displayList(); | 263 | displayList(); |
268 | } | 264 | } |
269 | 265 | ||
270 | void MainWindow::updateList() | 266 | void MainWindow::updateList() |
271 | { | 267 | { |
272 | //wait->show(); | ||
273 | QTimer *t = new QTimer( this ); | ||
274 | connect( t, SIGNAL(timeout()), SLOT( rotateUpdateIcon() ) ); | ||
275 | t->start( 0, false ); | ||
276 | packageListServers.clear(); | 268 | packageListServers.clear(); |
277 | packageListSearch.clear(); | 269 | packageListSearch.clear(); |
278 | packageListDocLnk.clear(); | 270 | packageListDocLnk.clear(); |
279 | ipkg->update(); | 271 | ipkg->update(); |
280 | packageListServers.update(); | 272 | packageListServers.update(); |
281 | packageListSearch.update(); | 273 | packageListSearch.update(); |
282 | packageListDocLnk.update(); | 274 | packageListDocLnk.update(); |
283 | t->stop(); | ||
284 | // wait->hide(); | ||
285 | } | 275 | } |
286 | 276 | ||
287 | void MainWindow::filterList() | 277 | void MainWindow::filterList() |
288 | { | 278 | { |
289 | //wait->show(); | ||
290 | QString f = ""; | 279 | QString f = ""; |
291 | if ( findAction->isOn() ) f = findEdit->text(); | 280 | if ( findAction->isOn() ) f = findEdit->text(); |
292 | packageListServers.filterPackages( f ); | 281 | packageListServers.filterPackages( f ); |
293 | //wait->hide(); | ||
294 | } | 282 | } |
295 | 283 | ||
296 | void MainWindow::displayList() | 284 | void MainWindow::displayList() |
297 | { | 285 | { |
298 | //wait->hide(); | ||
299 | filterList(); | 286 | filterList(); |
300 | listViewPackages->display(); | 287 | listViewPackages->display(); |
301 | } | 288 | } |
302 | 289 | ||
303 | void MainWindow::sectionChanged() | 290 | void MainWindow::sectionChanged() |
304 | { | 291 | { |
@@ -405,23 +392,12 @@ void MainWindow::destShow(bool b) | |||
405 | 392 | ||
406 | void MainWindow::destClose() | 393 | void MainWindow::destClose() |
407 | { | 394 | { |
408 | destAction->setOn( false ); | 395 | destAction->setOn( false ); |
409 | } | 396 | } |
410 | 397 | ||
411 | void MainWindow::rotateUpdateIcon() | ||
412 | { | ||
413 | pvDebug(2, "MainWindow::rotateUpdateIcon"); | ||
414 | if ( updateIcon ) | ||
415 | updateAction->setIconSet( Resource::loadIconSet( "oipkg/update" ) ); | ||
416 | else | ||
417 | updateAction->setIconSet( Resource::loadIconSet( "oipkg/update2" ) ); | ||
418 | updateIcon = !updateIcon; | ||
419 | } | ||
420 | |||
421 | |||
422 | void MainWindow::setDocument(const QString &fileName) | 398 | void MainWindow::setDocument(const QString &fileName) |
423 | { | 399 | { |
424 | if ( !QFile::exists( fileName ) ) return; | 400 | if ( !QFile::exists( fileName ) ) return; |
425 | ipkg->installFile( fileName ); | 401 | ipkg->installFile( fileName ); |
426 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); | 402 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); |
427 | QString lf = QString::null; | 403 | QString lf = QString::null; |