summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp40
-rw-r--r--noncore/settings/aqpkg/mainwin.h3
2 files changed, 24 insertions, 19 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
@@ -295,9 +295,9 @@ void MainWindow :: init()
updateData();
stack->raiseWidget( networkPkgWindow );
}
-
+/*
void MainWindow :: setDocument( const QString &doc )
{
// Remove path from package
QString package = Utils::getPackageNameFromIpkFilename( doc );
@@ -325,14 +325,18 @@ void MainWindow :: setDocument( const QString &doc )
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()
@@ -727,10 +731,10 @@ void MainWindow :: searchForPackage( const QString &text )
// 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();
@@ -766,11 +770,10 @@ 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;
}
void MainWindow :: upgradePackages()
@@ -796,11 +799,9 @@ 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()
{
@@ -863,10 +864,9 @@ void MainWindow :: upgradePackages()
}
if ( doUpdate )
{
- mgr->reloadServerData();
- serverSelected( -1 );
+ reloadData();
}
}
void MainWindow :: downloadSelectedPackages()
@@ -939,11 +939,9 @@ 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)");
@@ -987,11 +985,9 @@ 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)");
@@ -1120,8 +1116,16 @@ InstallData MainWindow :: dealWithItem( QCheckListItem *item )
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();
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
@@ -90,8 +90,9 @@ private:
bool filterByCategory( bool val );
void downloadSelectedPackages();
void downloadRemotePackage();
InstallData dealWithItem( QCheckListItem *item );
+ void reloadData();
// Progress widget
QWidget *progressWindow;
QLabel *m_status;
@@ -99,9 +100,9 @@ private:
void initProgressWidget();
public slots:
- void setDocument( const QString &doc );
+// void setDocument( const QString &doc );
void displayHelp();
void displayFindBar();
void repeatFind();
void findPackage( const QString & );