summaryrefslogtreecommitdiff
path: root/noncore
Unidiff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.cpp6
-rw-r--r--noncore/settings/aqpkg/package.cpp12
-rw-r--r--noncore/settings/aqpkg/settings.ui2
3 files changed, 17 insertions, 3 deletions
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp
index e8e2982..d9e62b6 100644
--- a/noncore/settings/aqpkg/networkpkgmgr.cpp
+++ b/noncore/settings/aqpkg/networkpkgmgr.cpp
@@ -267,68 +267,70 @@ void NetworkPackageManager :: serverSelected( int )
267 text += "*"; 267 text += "*";
268 } 268 }
269 } 269 }
270 270
271 QCheckListItem *item = new QCheckListItem( packagesList, text, QCheckListItem::CheckBox ); 271 QCheckListItem *item = new QCheckListItem( packagesList, text, QCheckListItem::CheckBox );
272 272
273 if ( it->isInstalled() ) 273 if ( it->isInstalled() )
274 { 274 {
275 QString destName = ""; 275 QString destName = "";
276 if ( it->getLocalPackage() ) 276 if ( it->getLocalPackage() )
277 { 277 {
278 if ( it->getLocalPackage()->getInstalledTo() ) 278 if ( it->getLocalPackage()->getInstalledTo() )
279 destName = it->getLocalPackage()->getInstalledTo()->getDestinationName(); 279 destName = it->getLocalPackage()->getInstalledTo()->getDestinationName();
280 } 280 }
281 else 281 else
282 { 282 {
283 if ( it->getInstalledTo() ) 283 if ( it->getInstalledTo() )
284 destName = it->getInstalledTo()->getDestinationName(); 284 destName = it->getInstalledTo()->getDestinationName();
285 } 285 }
286 if ( destName != "" ) 286 if ( destName != "" )
287 new QCheckListItem( item, QString( "Installed To - " ) + destName ); 287 new QCheckListItem( item, QString( "Installed To - " ) + destName );
288 } 288 }
289 289
290 if ( !it->isPackageStoredLocally() ) 290 if ( !it->isPackageStoredLocally() )
291 {
291 new QCheckListItem( item, QString( "Description - " ) + it->getDescription() ); 292 new QCheckListItem( item, QString( "Description - " ) + it->getDescription() );
293 new QCheckListItem( item, QString( "Size - " ) + it->getPackageSize() );
294 new QCheckListItem( item, QString( "Section - " ) + it->getSection() );
295 }
292 else 296 else
293 new QCheckListItem( item, QString( "Filename - " ) + it->getFilename() ); 297 new QCheckListItem( item, QString( "Filename - " ) + it->getFilename() );
294 298
295 if ( serverName == LOCAL_SERVER ) 299 if ( serverName == LOCAL_SERVER )
296 { 300 {
297 new QCheckListItem( item, QString( "V. Installed - " ) + it->getVersion() ); 301 new QCheckListItem( item, QString( "V. Installed - " ) + it->getVersion() );
298 } 302 }
299 else 303 else
300 { 304 {
301 new QCheckListItem( item, QString( "V. Available - " ) + it->getVersion() ); 305 new QCheckListItem( item, QString( "V. Available - " ) + it->getVersion() );
302 if ( it->getLocalPackage() ) 306 if ( it->getLocalPackage() )
303 { 307 {
304 if ( it->isInstalled() ) 308 if ( it->isInstalled() )
305 new QCheckListItem( item, QString( "V. Installed - " ) + it->getInstalledVersion() ); 309 new QCheckListItem( item, QString( "V. Installed - " ) + it->getInstalledVersion() );
306 } 310 }
307 } 311 }
308 312
309 new QCheckListItem( item, QString( "Size - " ) + it->getPackageSize() );
310 new QCheckListItem( item, QString( "Section - " ) + it->getSection() );
311 packagesList->insertItem( item ); 313 packagesList->insertItem( item );
312 } 314 }
313 315
314 // If the local server or the local ipkgs server disable the download button 316 // If the local server or the local ipkgs server disable the download button
315 if ( serverName == LOCAL_SERVER ) 317 if ( serverName == LOCAL_SERVER )
316 { 318 {
317 upgrade->setEnabled( false ); 319 upgrade->setEnabled( false );
318 download->setText( "Download" ); 320 download->setText( "Download" );
319 download->setEnabled( true ); 321 download->setEnabled( true );
320 } 322 }
321 else if ( serverName == LOCAL_IPKGS ) 323 else if ( serverName == LOCAL_IPKGS )
322 { 324 {
323 upgrade->setEnabled( false ); 325 upgrade->setEnabled( false );
324 download->setEnabled( true ); 326 download->setEnabled( true );
325 download->setText( "Remove" ); 327 download->setText( "Remove" );
326 } 328 }
327 else 329 else
328 { 330 {
329 upgrade->setEnabled( true ); 331 upgrade->setEnabled( true );
330 download->setEnabled( true ); 332 download->setEnabled( true );
331 download->setText( "Download" ); 333 download->setText( "Download" );
332 } 334 }
333} 335}
334 336
diff --git a/noncore/settings/aqpkg/package.cpp b/noncore/settings/aqpkg/package.cpp
index 526de5e..db3e927 100644
--- a/noncore/settings/aqpkg/package.cpp
+++ b/noncore/settings/aqpkg/package.cpp
@@ -1,58 +1,70 @@
1/*************************************************************************** 1/***************************************************************************
2 package.cpp - description 2 package.cpp - description
3 ------------------- 3 -------------------
4 begin : Mon Aug 26 2002 4 begin : Mon Aug 26 2002
5 copyright : (C) 2002 by Andy Qua 5 copyright : (C) 2002 by Andy Qua
6 email : andy.qua@blueyonder.co.uk 6 email : andy.qua@blueyonder.co.uk
7 ***************************************************************************/ 7 ***************************************************************************/
8 8
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or * 13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. * 14 * (at your option) any later version. *
15 * * 15 * *
16 ***************************************************************************/ 16 ***************************************************************************/
17 17
18#include "package.h" 18#include "package.h"
19#include "global.h" 19#include "global.h"
20 20
21Package::Package( QString &name ) 21Package::Package( QString &name )
22{ 22{
23 packageName = name; 23 packageName = name;
24
25 version = "N/A";
26 description = "N/A";
27 packageSize = "N/A";
28 section = "N/A";
29
24 localPackage = 0; 30 localPackage = 0;
25 installed = false; 31 installed = false;
26 packageStoredLocally = false; 32 packageStoredLocally = false;
27 installedToRoot = false; 33 installedToRoot = false;
28 installed = false; 34 installed = false;
29 installedTo = 0; 35 installedTo = 0;
30} 36}
31 37
32Package::Package( char *name ) 38Package::Package( char *name )
33{ 39{
34 packageName = name; 40 packageName = name;
41
42 version = "N/A";
43 description = "N/A";
44 packageSize = "N/A";
45 section = "N/A";
46
35 localPackage = 0; 47 localPackage = 0;
36 installed = false; 48 installed = false;
37 packageStoredLocally = false; 49 packageStoredLocally = false;
38 installedToRoot = false; 50 installedToRoot = false;
39 installed = false; 51 installed = false;
40 installedTo = 0; 52 installedTo = 0;
41} 53}
42 54
43Package::~Package() 55Package::~Package()
44{ 56{
45} 57}
46 58
47QString Package :: toString() 59QString Package :: toString()
48{ 60{
49 QString ret = "Package - " + getPackageName() + 61 QString ret = "Package - " + getPackageName() +
50 "\n version - " + getVersion(); 62 "\n version - " + getVersion();
51 63
52 if ( localPackage ) 64 if ( localPackage )
53 ret += "\n inst version - " + localPackage->getVersion(); 65 ret += "\n inst version - " + localPackage->getVersion();
54 66
55 67
56 return ret; 68 return ret;
57} 69}
58 70
diff --git a/noncore/settings/aqpkg/settings.ui b/noncore/settings/aqpkg/settings.ui
index c2db861..44e8fd9 100644
--- a/noncore/settings/aqpkg/settings.ui
+++ b/noncore/settings/aqpkg/settings.ui
@@ -458,49 +458,49 @@
458 <property stdset="1"> 458 <property stdset="1">
459 <name>name</name> 459 <name>name</name>
460 <cstring>destinationname</cstring> 460 <cstring>destinationname</cstring>
461 </property> 461 </property>
462 </widget> 462 </widget>
463 <widget row="0" column="0" > 463 <widget row="0" column="0" >
464 <class>QLabel</class> 464 <class>QLabel</class>
465 <property stdset="1"> 465 <property stdset="1">
466 <name>name</name> 466 <name>name</name>
467 <cstring>TextLabel1_3_2</cstring> 467 <cstring>TextLabel1_3_2</cstring>
468 </property> 468 </property>
469 <property stdset="1"> 469 <property stdset="1">
470 <name>text</name> 470 <name>text</name>
471 <string>Name:</string> 471 <string>Name:</string>
472 </property> 472 </property>
473 </widget> 473 </widget>
474 <widget row="2" column="1" > 474 <widget row="2" column="1" >
475 <class>QCheckBox</class> 475 <class>QCheckBox</class>
476 <property stdset="1"> 476 <property stdset="1">
477 <name>name</name> 477 <name>name</name>
478 <cstring>linkToRoot</cstring> 478 <cstring>linkToRoot</cstring>
479 </property> 479 </property>
480 <property stdset="1"> 480 <property stdset="1">
481 <name>text</name> 481 <name>text</name>
482 <string>LinkToRoot</string> 482 <string>Link To Root</string>
483 </property> 483 </property>
484 <property stdset="1"> 484 <property stdset="1">
485 <name>checked</name> 485 <name>checked</name>
486 <bool>true</bool> 486 <bool>true</bool>
487 </property> 487 </property>
488 </widget> 488 </widget>
489 <widget row="1" column="1" > 489 <widget row="1" column="1" >
490 <class>QLineEdit</class> 490 <class>QLineEdit</class>
491 <property stdset="1"> 491 <property stdset="1">
492 <name>name</name> 492 <name>name</name>
493 <cstring>destinationurl</cstring> 493 <cstring>destinationurl</cstring>
494 </property> 494 </property>
495 </widget> 495 </widget>
496 </grid> 496 </grid>
497 </widget> 497 </widget>
498 </grid> 498 </grid>
499 </widget> 499 </widget>
500 <widget> 500 <widget>
501 <class>QWidget</class> 501 <class>QWidget</class>
502 <property stdset="1"> 502 <property stdset="1">
503 <name>name</name> 503 <name>name</name>
504 <cstring>tab</cstring> 504 <cstring>tab</cstring>
505 </property> 505 </property>
506 <attribute> 506 <attribute>