summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp
index ff8f182..06e2a03 100644
--- a/noncore/settings/aqpkg/networkpkgmgr.cpp
+++ b/noncore/settings/aqpkg/networkpkgmgr.cpp
@@ -243,49 +243,49 @@ void NetworkPackageManager :: downloadPackage()
243 dir = cfg.readEntry( "downloadDir", "/home/root/Documents/application/ipkg" ); 243 dir = cfg.readEntry( "downloadDir", "/home/root/Documents/application/ipkg" );
244#endif 244#endif
245 245
246 QString text = InputDialog::getText( tr( "Download to where" ), tr( "Enter path to download to" ), dir, &ok, this ); 246 QString text = InputDialog::getText( tr( "Download to where" ), tr( "Enter path to download to" ), dir, &ok, this );
247 if ( ok && !text.isEmpty() ) 247 if ( ok && !text.isEmpty() )
248 dir = text; // user entered something and pressed ok 248 dir = text; // user entered something and pressed ok
249 else 249 else
250 return; // user entered nothing or pressed cancel 250 return; // user entered nothing or pressed cancel
251 251
252#ifdef QWS 252#ifdef QWS
253 // Store download directory in config file 253 // Store download directory in config file
254 cfg.writeEntry( "downloadDir", dir ); 254 cfg.writeEntry( "downloadDir", dir );
255#endif 255#endif
256 256
257 // Get starting directory 257 // Get starting directory
258 char initDir[PATH_MAX]; 258 char initDir[PATH_MAX];
259 getcwd( initDir, PATH_MAX ); 259 getcwd( initDir, PATH_MAX );
260 260
261 // Download each package 261 // Download each package
262 Ipkg ipkg; 262 Ipkg ipkg;
263 connect( &ipkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &))); 263 connect( &ipkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &)));
264 264
265 QCheckListItem *item = (QCheckListItem *)packagesList->firstChild(); 265 QCheckListItem *item = (QCheckListItem *)packagesList->firstChild();
266 ipkg.setOption( "download" ); 266 ipkg.setOption( "download" );
267 ipkg.setRuntimeDirectory( initDir ); 267 ipkg.setRuntimeDirectory( dir );
268 do 268 do
269 { 269 {
270 if ( item->isOn() ) 270 if ( item->isOn() )
271 { 271 {
272 QString name = item->text(); 272 QString name = item->text();
273 int pos = name.find( "*" ); 273 int pos = name.find( "*" );
274 name.truncate( pos ); 274 name.truncate( pos );
275 275
276 // if (there is a (installed), remove it 276 // if (there is a (installed), remove it
277 pos = name.find( "(installed)" ); 277 pos = name.find( "(installed)" );
278 if ( pos > 0 ) 278 if ( pos > 0 )
279 name.truncate( pos - 1 ); 279 name.truncate( pos - 1 );
280 280
281 ipkg.setPackage( name ); 281 ipkg.setPackage( name );
282 ipkg.runIpkg( ); 282 ipkg.runIpkg( );
283 } 283 }
284 284
285 item = (QCheckListItem *)item->nextSibling(); 285 item = (QCheckListItem *)item->nextSibling();
286 } while ( item ); 286 } while ( item );
287 } 287 }
288 else if ( download->text() == "Remove" ) 288 else if ( download->text() == "Remove" )
289 { 289 {
290 QCheckListItem *item = (QCheckListItem *)packagesList->firstChild(); 290 QCheckListItem *item = (QCheckListItem *)packagesList->firstChild();
291 do 291 do