summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/networkpkgmgr.cpp
Unidiff
Diffstat (limited to 'noncore/settings/aqpkg/networkpkgmgr.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp
index 52d95a8..6874ded 100644
--- a/noncore/settings/aqpkg/networkpkgmgr.cpp
+++ b/noncore/settings/aqpkg/networkpkgmgr.cpp
@@ -259,66 +259,67 @@ void NetworkPackageManager :: serverSelected( int )
259 upgrade->setEnabled( true ); 259 upgrade->setEnabled( true );
260 download->setEnabled( true ); 260 download->setEnabled( true );
261 download->setText( "Download" ); 261 download->setText( "Download" );
262 } 262 }
263} 263}
264 264
265void NetworkPackageManager :: updateServer() 265void NetworkPackageManager :: updateServer()
266{ 266{
267 QString serverName = serversList->currentText(); 267 QString serverName = serversList->currentText();
268 268
269 // Update the current server 269 // Update the current server
270 // Display dialog 270 // Display dialog
271 ProgressDlg *dlg = new ProgressDlg( this ); 271// ProgressDlg *progDlg = new ProgressDlg( this );
272 QString status = "Updating package lists..."; 272// QString status = "Updating package lists...";
273 dlg->show(); 273// progDlg->show();
274 dlg->setText( status ); 274// progDlg->setText( status );
275 275
276 // Disable buttons to stop silly people clicking lots on them :) 276 // Disable buttons to stop silly people clicking lots on them :)
277 277
278 // First, write out ipkg_conf file so that ipkg can use it 278 // First, write out ipkg_conf file so that ipkg can use it
279 dataMgr->writeOutIpkgConf(); 279 dataMgr->writeOutIpkgConf();
280 280
281 QString option = "update";
282 QString dummy = "";
283 Ipkg ipkg; 281 Ipkg ipkg;
284 connect( &ipkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &))); 282 ipkg.setOption( "update" );
285 ipkg.setOption( option );
286 283
287 ipkg.runIpkg( ); 284 InstallDlgImpl dlg( &ipkg, "Refreshing server package lists", this, "Upgrade", true );
285 dlg.showDlg();
288 286
289 // Reload data 287 // Reload data
290 dataMgr->reloadServerData( serversList->currentText() ); 288 dataMgr->reloadServerData( serversList->currentText() );
291 serverSelected(-1); 289 serverSelected(-1);
292 delete dlg; 290// delete progDlg;
293} 291}
294 292
295void NetworkPackageManager :: upgradePackages() 293void NetworkPackageManager :: upgradePackages()
296{ 294{
297 // We're gonna do an upgrade of all packages 295 // We're gonna do an upgrade of all packages
298 // First warn user that this isn't recommended 296 // First warn user that this isn't recommended
299 QString text = "WARNING: Upgrading while\nOpie/Qtopia is running\nis NOT recommended!\n\nAre you sure?\n"; 297 QString text = "WARNING: Upgrading while\nOpie/Qtopia is running\nis NOT recommended!\n\nAre you sure?\n";
300 QMessageBox warn("Warning", text, QMessageBox::Warning, 298 QMessageBox warn("Warning", text, QMessageBox::Warning,
301 QMessageBox::Yes, 299 QMessageBox::Yes,
302 QMessageBox::No | QMessageBox::Escape | QMessageBox::Default , 300 QMessageBox::No | QMessageBox::Escape | QMessageBox::Default ,
303 0, this ); 301 0, this );
304 warn.adjustSize(); 302 warn.adjustSize();
305 303
306 if ( warn.exec() == QMessageBox::Yes ) 304 if ( warn.exec() == QMessageBox::Yes )
307 { 305 {
308 // First, write out ipkg_conf file so that ipkg can use it 306 // First, write out ipkg_conf file so that ipkg can use it
309 dataMgr->writeOutIpkgConf(); 307 dataMgr->writeOutIpkgConf();
310 308
311 // Now run upgrade 309 // Now run upgrade
312 InstallDlgImpl dlg( this, "Upgrade", true ); 310 Ipkg ipkg;
311 ipkg.setOption( "upgrade" );
312
313 InstallDlgImpl dlg( &ipkg, "Upgrading installed packages", this, "Upgrade", true );
313 dlg.showDlg(); 314 dlg.showDlg();
314 315
315 // Reload data 316 // Reload data
316 dataMgr->reloadServerData( LOCAL_SERVER ); 317 dataMgr->reloadServerData( LOCAL_SERVER );
317 318
318 dataMgr->reloadServerData( serversList->currentText() ); 319 dataMgr->reloadServerData( serversList->currentText() );
319 serverSelected(-1); 320 serverSelected(-1);
320 } 321 }
321} 322}
322 323
323 324
324void NetworkPackageManager :: downloadPackage() 325void NetworkPackageManager :: downloadPackage()