summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/mainwin.cpp
authordrw <drw>2003-04-26 23:11:13 (UTC)
committer drw <drw>2003-04-26 23:11:13 (UTC)
commit77bed0e99aa0c912e5d86f257131c1f93afcee77 (patch) (side-by-side diff)
treec9ecc864e802a395c066bfb7d345e16dc1fc0968 /noncore/settings/aqpkg/mainwin.cpp
parent98a9291263e167b8882ac916330e7215ebd884b4 (diff)
downloadopie-77bed0e99aa0c912e5d86f257131c1f93afcee77.zip
opie-77bed0e99aa0c912e5d86f257131c1f93afcee77.tar.gz
opie-77bed0e99aa0c912e5d86f257131c1f93afcee77.tar.bz2
Fix for bug #887 - do not perform documents update when doing a 'ipkg update'
Diffstat (limited to 'noncore/settings/aqpkg/mainwin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp19
1 files changed, 13 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;