From c464d34970bedca56a518310deef7ce08474033c Mon Sep 17 00:00:00 2001 From: drw Date: Thu, 23 Jan 2003 01:47:41 +0000 Subject: Minor fix for find function and more liberal use of progress widget to give feedback to user --- (limited to 'noncore/settings') diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp index c9963bc..8090646 100644 --- a/noncore/settings/aqpkg/mainwin.cpp +++ b/noncore/settings/aqpkg/mainwin.cpp @@ -296,7 +296,7 @@ void MainWindow :: init() stack->raiseWidget( networkPkgWindow ); } - +/* void MainWindow :: setDocument( const QString &doc ) { // Remove path from package @@ -326,12 +326,16 @@ void MainWindow :: setDocument( const QString &doc ) } } } - +*/ void MainWindow :: displaySettings() { SettingsImpl *dlg = new SettingsImpl( mgr, this, "Settings", true ); if ( dlg->showDlg( 0 ) ) + { + stack->raiseWidget( progressWindow ); updateData(); + stack->raiseWidget( networkPkgWindow ); + } delete dlg; } @@ -728,8 +732,8 @@ void MainWindow :: searchForPackage( const QString &text ) // look through package list for text startng at current position vector workingPackages; QCheckListItem *start = (QCheckListItem *)packagesList->currentItem(); - if ( start != 0 ) - start = (QCheckListItem *)start->nextSibling(); +// if ( start != 0 ) +// start = (QCheckListItem *)start->nextSibling(); if ( start == 0 ) start = (QCheckListItem *)packagesList->firstChild(); @@ -767,9 +771,8 @@ void MainWindow :: updateServer() InstallDlgImpl dlg( &ipkg, tr( "Refreshing server package lists" ), this, tr( "Upgrade" ), true ); dlg.showDlg(); - // Reload data - mgr->reloadServerData(); - serverSelected(-1); + reloadData(); + // delete progDlg; } @@ -797,9 +800,7 @@ void MainWindow :: upgradePackages() InstallDlgImpl dlg( &ipkg, tr( "Upgrading installed packages" ), this, tr( "Upgrade" ), true ); dlg.showDlg(); - // Reload data - mgr->reloadServerData(); - serverSelected(-1); + reloadData(); } } void MainWindow :: downloadPackage() @@ -864,8 +865,7 @@ void MainWindow :: upgradePackages() if ( doUpdate ) { - mgr->reloadServerData(); - serverSelected( -1 ); + reloadData(); } } @@ -940,10 +940,8 @@ void MainWindow :: downloadRemotePackage() InstallDlgImpl dlg2( workingPackages, mgr, this, "Install", true ); dlg2.showDlg(); - // Reload data - mgr->reloadServerData(); - serverSelected(-1); - + reloadData(); + #ifdef QWS // Finally let the main system update itself QCopEnvelope e("QPE/System", "linkChanged(QString)"); @@ -988,10 +986,8 @@ void MainWindow :: applyChanges() InstallDlgImpl dlg( workingPackages, mgr, this, "Install", true ); dlg.showDlg(); - // Reload data - mgr->reloadServerData(); - serverSelected(-1); - + reloadData(); + #ifdef QWS // Finally let the main system update itself QCopEnvelope e("QPE/System", "linkChanged(QString)"); @@ -1121,6 +1117,14 @@ InstallData MainWindow :: dealWithItem( QCheckListItem *item ) } } +void MainWindow :: reloadData() +{ + stack->raiseWidget( progressWindow ); + mgr->reloadServerData(); + serverSelected( -1, FALSE ); + stack->raiseWidget( networkPkgWindow ); +} + void MainWindow :: letterPushed( QString t ) { QCheckListItem *top = (QCheckListItem *)packagesList->firstChild(); diff --git a/noncore/settings/aqpkg/mainwin.h b/noncore/settings/aqpkg/mainwin.h index 46b5fae..be30668 100644 --- a/noncore/settings/aqpkg/mainwin.h +++ b/noncore/settings/aqpkg/mainwin.h @@ -91,6 +91,7 @@ private: void downloadSelectedPackages(); void downloadRemotePackage(); InstallData dealWithItem( QCheckListItem *item ); + void reloadData(); // Progress widget QWidget *progressWindow; @@ -100,7 +101,7 @@ private: void initProgressWidget(); public slots: - void setDocument( const QString &doc ); +// void setDocument( const QString &doc ); void displayHelp(); void displayFindBar(); void repeatFind(); -- cgit v0.9.0.2