summaryrefslogtreecommitdiff
authordrw <drw>2003-01-23 01:47:41 (UTC)
committer drw <drw>2003-01-23 01:47:41 (UTC)
commitc464d34970bedca56a518310deef7ce08474033c (patch) (side-by-side diff)
tree8f0e9c1c75daf0cdd53bdd5e3cdaf22a3b5b60b3
parent454eba9982f1a898e914b558f2ceac913fdf3b5c (diff)
downloadopie-c464d34970bedca56a518310deef7ce08474033c.zip
opie-c464d34970bedca56a518310deef7ce08474033c.tar.gz
opie-c464d34970bedca56a518310deef7ce08474033c.tar.bz2
Minor fix for find function and more liberal use of progress widget to give feedback to user
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp44
-rw-r--r--noncore/settings/aqpkg/mainwin.h3
2 files changed, 26 insertions, 21 deletions
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
@@ -293,13 +293,13 @@ void MainWindow :: init()
categoryFilterEnabled = false;
updateData();
stack->raiseWidget( networkPkgWindow );
}
-
+/*
void MainWindow :: setDocument( const QString &doc )
{
// Remove path from package
QString package = Utils::getPackageNameFromIpkFilename( doc );
// std::cout << "Selecting package " << package << std::endl;
@@ -323,18 +323,22 @@ void MainWindow :: setDocument( const QString &doc )
{
item->setOn( true );
break;
}
}
}
-
+*/
void MainWindow :: displaySettings()
{
SettingsImpl *dlg = new SettingsImpl( mgr, this, "Settings", true );
if ( dlg->showDlg( 0 ) )
+ {
+ stack->raiseWidget( progressWindow );
updateData();
+ stack->raiseWidget( networkPkgWindow );
+ }
delete dlg;
}
void MainWindow :: displayHelp()
{
HelpWindow *dlg = new HelpWindow( this );
@@ -725,14 +729,14 @@ void MainWindow :: searchForPackage( const QString &text )
if ( !text.isEmpty() )
{
// cout << "searching for " << text << endl;
// look through package list for text startng at current position
vector<InstallData> 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();
for ( QCheckListItem *item = start; item != 0 ;
item = (QCheckListItem *)item->nextSibling() )
@@ -764,15 +768,14 @@ void MainWindow :: updateServer()
Ipkg ipkg;
ipkg.setOption( "update" );
InstallDlgImpl dlg( &ipkg, tr( "Refreshing server package lists" ), this, tr( "Upgrade" ), true );
dlg.showDlg();
- // Reload data
- mgr->reloadServerData();
- serverSelected(-1);
+ reloadData();
+
// delete progDlg;
}
void MainWindow :: upgradePackages()
{
// We're gonna do an upgrade of all packages
@@ -794,15 +797,13 @@ void MainWindow :: upgradePackages()
Ipkg ipkg;
ipkg.setOption( "upgrade" );
InstallDlgImpl dlg( &ipkg, tr( "Upgrading installed packages" ), this, tr( "Upgrade" ), true );
dlg.showDlg();
- // Reload data
- mgr->reloadServerData();
- serverSelected(-1);
+ reloadData();
}
}
void MainWindow :: downloadPackage()
{
bool doUpdate = true;
if ( downloadEnabled )
@@ -861,14 +862,13 @@ void MainWindow :: upgradePackages()
}
}
}
if ( doUpdate )
{
- mgr->reloadServerData();
- serverSelected( -1 );
+ reloadData();
}
}
void MainWindow :: downloadSelectedPackages()
{
// First, write out ipkg_conf file so that ipkg can use it
@@ -937,16 +937,14 @@ void MainWindow :: downloadRemotePackage()
vector<InstallData> workingPackages;
workingPackages.push_back( item );
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)");
QString lf = QString::null;
e << lf;
#endif
@@ -985,16 +983,14 @@ void MainWindow :: applyChanges()
}
// do the stuff
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)");
QString lf = QString::null;
e << lf;
#endif
@@ -1118,12 +1114,20 @@ InstallData MainWindow :: dealWithItem( QCheckListItem *item )
// User hit cancel (on dlg - assume remove)
return 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();
QCheckListItem *start = (QCheckListItem *)packagesList->currentItem();
if ( packagesList->firstChild() == 0 )
return;
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
@@ -88,22 +88,23 @@ private:
void serverSelected( int index, bool showProgress );
void searchForPackage( const QString & );
bool filterByCategory( bool val );
void downloadSelectedPackages();
void downloadRemotePackage();
InstallData dealWithItem( QCheckListItem *item );
+ void reloadData();
// Progress widget
QWidget *progressWindow;
QLabel *m_status;
QProgressBar *m_progress;
void initProgressWidget();
public slots:
- void setDocument( const QString &doc );
+// void setDocument( const QString &doc );
void displayHelp();
void displayFindBar();
void repeatFind();
void findPackage( const QString & );
void hideFindBar();
void displayAbout();