summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp19
-rw-r--r--noncore/settings/aqpkg/mainwin.h1
2 files changed, 14 insertions, 6 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp
index 58f6feb..f0e8e48 100644
--- a/noncore/settings/aqpkg/mainwin.cpp
+++ b/noncore/settings/aqpkg/mainwin.cpp
@@ -747,24 +747,25 @@ void MainWindow :: updateServer()
// Disable buttons to stop silly people clicking lots on them :)
// First, write out ipkg_conf file so that ipkg can use it
mgr->writeOutIpkgConf();
Ipkg *ipkg = new Ipkg;
ipkg->setOption( "update" );
InstallDlgImpl *dlg = new InstallDlgImpl( ipkg, tr( "Refreshing server package lists" ),
tr( "Update lists" ) );
connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
+ reloadDocuments = FALSE;
stack->addWidget( dlg, 3 );
stack->raiseWidget( dlg );
// delete progDlg;
}
void MainWindow :: upgradePackages()
{
// We're gonna do an upgrade of all packages
// First warn user that this isn't recommended
// TODO - ODevice????
QString text = tr( "WARNING: Upgrading while\nOpie/Qtopia is running\nis NOT recommended!\n\nAre you sure?\n" );
@@ -777,24 +778,25 @@ void MainWindow :: upgradePackages()
if ( warn.exec() == QMessageBox::Yes )
{
// First, write out ipkg_conf file so that ipkg can use it
mgr->writeOutIpkgConf();
// Now run upgrade
Ipkg *ipkg = new Ipkg;
ipkg->setOption( "upgrade" );
InstallDlgImpl *dlg = new InstallDlgImpl( ipkg, tr( "Upgrading installed packages" ),
tr ( "Upgrade" ) );
connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
+ reloadDocuments = TRUE;
stack->addWidget( dlg, 3 );
stack->raiseWidget( dlg );
}
}
void MainWindow :: downloadPackage()
{
bool doUpdate = true;
if ( downloadEnabled )
{
// See if any packages are selected
bool found = false;
@@ -919,24 +921,25 @@ void MainWindow :: downloadRemotePackage()
// grab details from dialog
// QString package = dlg.getPackageLocation();
InstallData *item = new InstallData();
item->option = "I";
item->packageName = package;
QList<InstallData> workingPackages;
workingPackages.setAutoDelete( TRUE );
workingPackages.append( item );
InstallDlgImpl *dlg = new InstallDlgImpl( workingPackages, mgr, tr( "Download" ) );
connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
+ reloadDocuments = TRUE;
stack->addWidget( dlg, 3 );
stack->raiseWidget( dlg );
}
void MainWindow :: applyChanges()
{
stickyOption = "";
// First, write out ipkg_conf file so that ipkg can use it
mgr->writeOutIpkgConf();
@@ -958,24 +961,25 @@ void MainWindow :: applyChanges()
if ( workingPackages.count() == 0 )
{
// Nothing to do
QMessageBox::information( this, tr( "Nothing to do" ),
tr( "No packages selected" ), tr( "OK" ) );
return;
}
// do the stuff
InstallDlgImpl *dlg = new InstallDlgImpl( workingPackages, mgr, tr( "Apply changes" ) );
connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
+ reloadDocuments = TRUE;
stack->addWidget( dlg, 3 );
stack->raiseWidget( dlg );
}
// decide what to do - either remove, upgrade or install
// Current rules:
// If not installed - install
// If installed and different version available - upgrade
// If installed and version up to date - remove
InstallData *MainWindow :: dealWithItem( QCheckListItem *item )
{
QString name = item->text();
@@ -1097,30 +1101,33 @@ void MainWindow :: reloadData( InstallDlgImpl *dlg )
stack->raiseWidget( progressWindow );
if ( dlg )
{
dlg->close();
delete dlg;
}
mgr->reloadServerData();
serverSelected( -1, FALSE );
#ifdef QWS
- m_status->setText( tr( "Updating Launcher..." ) );
-
- // Finally let the main system update itself
- QCopEnvelope e("QPE/System", "linkChanged(QString)");
- QString lf = QString::null;
- e << lf;
+ if ( reloadDocuments )
+ {
+ m_status->setText( tr( "Updating Launcher..." ) );
+
+ // Finally let the main system update itself
+ QCopEnvelope e("QPE/System", "linkChanged(QString)");
+ QString lf = QString::null;
+ e << lf;
+ }
#endif
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 c4548b1..f95c332 100644
--- a/noncore/settings/aqpkg/mainwin.h
+++ b/noncore/settings/aqpkg/mainwin.h
@@ -79,24 +79,25 @@ private:
QPixmap installedIcon;
QPixmap updatedIcon;
QString currentlySelectedServer;
QString categoryFilter;
QString stickyOption;
bool categoryFilterEnabled;
bool showJumpTo;
bool showUninstalledPkgs;
bool showInstalledPkgs;
bool showUpgradedPkgs;
bool downloadEnabled;
+ bool reloadDocuments;
void initMainWidget();
void updateData();
void serverSelected( int index, bool showProgress );
void searchForPackage( const QString & );
bool filterByCategory( bool val );
void downloadSelectedPackages();
void downloadRemotePackage();
InstallData *dealWithItem( QCheckListItem *item );
// Progress widget
QWidget *progressWindow;