summaryrefslogtreecommitdiff
authorandyq <andyq>2002-11-21 18:57:01 (UTC)
committer andyq <andyq>2002-11-21 18:57:01 (UTC)
commite6cb9bb71d4849263ada2f5549c85740c96b065a (patch) (side-by-side diff)
treed44c457f77722342ccb5a0c7b99dcfcae6f17a94
parent1efe11a03d5cd3c0b81c5fee7d0e88dca2e06da8 (diff)
downloadopie-e6cb9bb71d4849263ada2f5549c85740c96b065a.zip
opie-e6cb9bb71d4849263ada2f5549c85740c96b065a.tar.gz
opie-e6cb9bb71d4849263ada2f5549c85740c96b065a.tar.bz2
Package sections default to N/A unless they are set (description, etc), changed LinkToRoot to Link To Root, and couple of other small fixes
Diffstat (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
@@ -259,84 +259,86 @@ void NetworkPackageManager :: serverSelected( int )
{
text += " (installed)";
// If a different version of package is available, postfix it with an *
if ( it->getVersion() != it->getInstalledVersion() )
{
if ( compareVersions( it->getInstalledVersion(), it->getVersion() ) == 1 )
text += "*";
}
}
QCheckListItem *item = new QCheckListItem( packagesList, text, QCheckListItem::CheckBox );
if ( it->isInstalled() )
{
QString destName = "";
if ( it->getLocalPackage() )
{
if ( it->getLocalPackage()->getInstalledTo() )
destName = it->getLocalPackage()->getInstalledTo()->getDestinationName();
}
else
{
if ( it->getInstalledTo() )
destName = it->getInstalledTo()->getDestinationName();
}
if ( destName != "" )
new QCheckListItem( item, QString( "Installed To - " ) + destName );
}
if ( !it->isPackageStoredLocally() )
+ {
new QCheckListItem( item, QString( "Description - " ) + it->getDescription() );
+ new QCheckListItem( item, QString( "Size - " ) + it->getPackageSize() );
+ new QCheckListItem( item, QString( "Section - " ) + it->getSection() );
+ }
else
new QCheckListItem( item, QString( "Filename - " ) + it->getFilename() );
if ( serverName == LOCAL_SERVER )
{
new QCheckListItem( item, QString( "V. Installed - " ) + it->getVersion() );
}
else
{
new QCheckListItem( item, QString( "V. Available - " ) + it->getVersion() );
if ( it->getLocalPackage() )
{
if ( it->isInstalled() )
new QCheckListItem( item, QString( "V. Installed - " ) + it->getInstalledVersion() );
}
}
- new QCheckListItem( item, QString( "Size - " ) + it->getPackageSize() );
- new QCheckListItem( item, QString( "Section - " ) + it->getSection() );
packagesList->insertItem( item );
}
// If the local server or the local ipkgs server disable the download button
if ( serverName == LOCAL_SERVER )
{
upgrade->setEnabled( false );
download->setText( "Download" );
download->setEnabled( true );
}
else if ( serverName == LOCAL_IPKGS )
{
upgrade->setEnabled( false );
download->setEnabled( true );
download->setText( "Remove" );
}
else
{
upgrade->setEnabled( true );
download->setEnabled( true );
download->setText( "Download" );
}
}
void NetworkPackageManager :: updateServer()
{
QString serverName = serversList->currentText();
// Update the current server
// Display dialog
// Disable buttons to stop silly people clicking lots on them :)
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,66 +1,78 @@
/***************************************************************************
package.cpp - description
-------------------
begin : Mon Aug 26 2002
copyright : (C) 2002 by Andy Qua
email : andy.qua@blueyonder.co.uk
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "package.h"
#include "global.h"
Package::Package( QString &name )
{
packageName = name;
+
+ version = "N/A";
+ description = "N/A";
+ packageSize = "N/A";
+ section = "N/A";
+
localPackage = 0;
installed = false;
packageStoredLocally = false;
installedToRoot = false;
installed = false;
installedTo = 0;
}
Package::Package( char *name )
{
packageName = name;
+
+ version = "N/A";
+ description = "N/A";
+ packageSize = "N/A";
+ section = "N/A";
+
localPackage = 0;
installed = false;
packageStoredLocally = false;
installedToRoot = false;
installed = false;
installedTo = 0;
}
Package::~Package()
{
}
QString Package :: toString()
{
QString ret = "Package - " + getPackageName() +
"\n version - " + getVersion();
if ( localPackage )
ret += "\n inst version - " + localPackage->getVersion();
return ret;
}
void Package :: setStatus( const QString &s )
{
status = s;
if ( status.find( "installed" ) != -1 )
installed = true;
}
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
@@ -450,65 +450,65 @@
</property>
<property stdset="1">
<name>text</name>
<string>Change</string>
</property>
</widget>
<widget row="0" column="1" >
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>destinationname</cstring>
</property>
</widget>
<widget row="0" column="0" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1_3_2</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Name:</string>
</property>
</widget>
<widget row="2" column="1" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>linkToRoot</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>LinkToRoot</string>
+ <string>Link To Root</string>
</property>
<property stdset="1">
<name>checked</name>
<bool>true</bool>
</property>
</widget>
<widget row="1" column="1" >
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>destinationurl</cstring>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
<widget>
<class>QWidget</class>
<property stdset="1">
<name>name</name>
<cstring>tab</cstring>
</property>
<attribute>
<name>title</name>
<string>General</string>
</attribute>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1</cstring>