author | kergoth <kergoth> | 2003-08-09 16:12:19 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-08-09 16:12:19 (UTC) |
commit | 1c58d1407f9584fedcdae390a04e2b37e5853361 (patch) (unidiff) | |
tree | 3c6e741c4d382d1a53c182930052b684d6e35b91 /noncore/settings | |
parent | e3f4607edd0c1ca1434adb446df1d4a1d27c6a86 (diff) | |
download | opie-1c58d1407f9584fedcdae390a04e2b37e5853361.zip opie-1c58d1407f9584fedcdae390a04e2b37e5853361.tar.gz opie-1c58d1407f9584fedcdae390a04e2b37e5853361.tar.bz2 |
Merge from BRANCH_1_0
-rw-r--r-- | noncore/settings/aqpkg/mainwin.cpp | 12 | ||||
-rw-r--r-- | noncore/settings/aqpkg/opie-aqpkg.control | 2 | ||||
-rw-r--r-- | noncore/settings/aqpkg/package.cpp | 1 | ||||
-rw-r--r-- | noncore/settings/aqpkg/packagewin.cpp | 7 | ||||
-rw-r--r-- | noncore/settings/aqpkg/server.cpp | 13 | ||||
-rw-r--r-- | noncore/settings/sysinfo/modulesinfo.cpp | 6 | ||||
-rw-r--r-- | noncore/settings/sysinfo/opie-sysinfo.control | 2 | ||||
-rw-r--r-- | noncore/settings/sysinfo/processinfo.cpp | 4 |
8 files changed, 34 insertions, 13 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp index 45a6663..42093cf 100644 --- a/noncore/settings/aqpkg/mainwin.cpp +++ b/noncore/settings/aqpkg/mainwin.cpp | |||
@@ -1009,12 +1009,17 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item ) | |||
1009 | return newitem; | 1009 | return newitem; |
1010 | } | 1010 | } |
1011 | else | 1011 | else |
1012 | { | 1012 | { |
1013 | InstallData *newitem = new InstallData(); | 1013 | InstallData *newitem = new InstallData(); |
1014 | newitem->option = "D"; | 1014 | newitem->option = "D"; |
1015 | |||
1016 | // If local file, remove using package name, not filename | ||
1017 | if ( p->isPackageStoredLocally() ) | ||
1018 | name = item->text(); | ||
1019 | |||
1015 | if ( !p->isPackageStoredLocally() ) | 1020 | if ( !p->isPackageStoredLocally() ) |
1016 | newitem->packageName = p->getInstalledPackageName(); | 1021 | newitem->packageName = p->getInstalledPackageName(); |
1017 | else | 1022 | else |
1018 | newitem->packageName = name; | 1023 | newitem->packageName = name; |
1019 | 1024 | ||
1020 | if ( p->getInstalledTo() ) | 1025 | if ( p->getInstalledTo() ) |
@@ -1038,12 +1043,16 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item ) | |||
1038 | // Error - should handle | 1043 | // Error - should handle |
1039 | } | 1044 | } |
1040 | else if ( val == -1 ) | 1045 | else if ( val == -1 ) |
1041 | { | 1046 | { |
1042 | // Version available is older - remove only | 1047 | // Version available is older - remove only |
1043 | newitem->option = "D"; | 1048 | newitem->option = "D"; |
1049 | |||
1050 | // If local file, remove using package name, not filename | ||
1051 | if ( p->isPackageStoredLocally() ) | ||
1052 | name = item->text(); | ||
1044 | } | 1053 | } |
1045 | else | 1054 | else |
1046 | { | 1055 | { |
1047 | QString caption; | 1056 | QString caption; |
1048 | QString text; | 1057 | QString text; |
1049 | QString secondButton; | 1058 | QString secondButton; |
@@ -1077,12 +1086,15 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item ) | |||
1077 | case 0: // Cancel | 1086 | case 0: // Cancel |
1078 | delete newitem; | 1087 | delete newitem; |
1079 | return 0x0; | 1088 | return 0x0; |
1080 | break; | 1089 | break; |
1081 | case 1: // Remove | 1090 | case 1: // Remove |
1082 | newitem->option = "D"; | 1091 | newitem->option = "D"; |
1092 | // If local file, remove using package name, not filename | ||
1093 | if ( p->isPackageStoredLocally() ) | ||
1094 | name = item->text(); | ||
1083 | break; | 1095 | break; |
1084 | case 2: // Reinstall or Upgrade | 1096 | case 2: // Reinstall or Upgrade |
1085 | newitem->option = secondOption; | 1097 | newitem->option = secondOption; |
1086 | break; | 1098 | break; |
1087 | } | 1099 | } |
1088 | } | 1100 | } |
diff --git a/noncore/settings/aqpkg/opie-aqpkg.control b/noncore/settings/aqpkg/opie-aqpkg.control index b8ad1e8..46bffdd 100644 --- a/noncore/settings/aqpkg/opie-aqpkg.control +++ b/noncore/settings/aqpkg/opie-aqpkg.control | |||
@@ -1,11 +1,11 @@ | |||
1 | Package: opie-aqpkg | 1 | Package: opie-aqpkg |
2 | Files: bin/aqpkg pics/aqpkg apps/Settings/aqpkg.desktop | 2 | Files: bin/aqpkg pics/aqpkg apps/Settings/aqpkg.desktop |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: Settings | 4 | Section: Settings |
5 | Version: $QPE_VERSION-$SUB_VERSION | ||
6 | Depends: task-opie-minimal | 5 | Depends: task-opie-minimal |
7 | Replaces: aqpkg | 6 | Replaces: aqpkg |
8 | Architecture: arm | 7 | Architecture: arm |
9 | Maintainer: Andy Qua (andy.qua@blueyonder.co.uk) | 8 | Maintainer: Andy Qua (andy.qua@blueyonder.co.uk) |
10 | Description: A Package Manager | 9 | Description: A Package Manager |
11 | 10 | ||
11 | Version: $QPE_VERSION$EXTRAVERSION | ||
diff --git a/noncore/settings/aqpkg/package.cpp b/noncore/settings/aqpkg/package.cpp index adda832..5a521d3 100644 --- a/noncore/settings/aqpkg/package.cpp +++ b/noncore/settings/aqpkg/package.cpp | |||
@@ -113,12 +113,13 @@ void Package :: setLocalPackage( Package *p ) | |||
113 | differentVersionAvailable = false; | 113 | differentVersionAvailable = false; |
114 | } | 114 | } |
115 | 115 | ||
116 | void Package :: setVersion( const QString &v ) | 116 | void Package :: setVersion( const QString &v ) |
117 | { | 117 | { |
118 | version = v; | 118 | version = v; |
119 | differentVersionAvailable = false; | ||
119 | 120 | ||
120 | if ( localPackage ) | 121 | if ( localPackage ) |
121 | if ( localPackage->getVersion() < getVersion() && !installed ) | 122 | if ( localPackage->getVersion() < getVersion() && !installed ) |
122 | differentVersionAvailable = true; | 123 | differentVersionAvailable = true; |
123 | else | 124 | else |
124 | differentVersionAvailable = false; | 125 | differentVersionAvailable = false; |
diff --git a/noncore/settings/aqpkg/packagewin.cpp b/noncore/settings/aqpkg/packagewin.cpp index 9553cd1..499d647 100644 --- a/noncore/settings/aqpkg/packagewin.cpp +++ b/noncore/settings/aqpkg/packagewin.cpp | |||
@@ -41,17 +41,18 @@ | |||
41 | PackageWindow::PackageWindow( Package *package, const QString &server ) | 41 | PackageWindow::PackageWindow( Package *package, const QString &server ) |
42 | : QWidget( 0, 0, 0 ) | 42 | : QWidget( 0, 0, 0 ) |
43 | { | 43 | { |
44 | QString str; | 44 | QString str; |
45 | if ( package ) | 45 | if ( package ) |
46 | { | 46 | { |
47 | Package *local = package->getLocalPackage(); | ||
47 | setCaption( package->getPackageName() ); | 48 | setCaption( package->getPackageName() ); |
48 | QString destName; | 49 | QString destName; |
49 | if ( package->getLocalPackage() ) | 50 | if ( local ) |
50 | { | 51 | { |
51 | if ( package->getLocalPackage()->getInstalledTo() ) | 52 | if ( local->getInstalledTo() ) |
52 | destName = package->getLocalPackage()->getInstalledTo()->getDestinationName(); | 53 | destName = package->getLocalPackage()->getInstalledTo()->getDestinationName(); |
53 | } | 54 | } |
54 | else | 55 | else |
55 | { | 56 | { |
56 | if ( package->getInstalledTo() ) | 57 | if ( package->getInstalledTo() ) |
57 | destName = package->getInstalledTo()->getDestinationName(); | 58 | destName = package->getInstalledTo()->getDestinationName(); |
@@ -83,13 +84,13 @@ PackageWindow::PackageWindow( Package *package, const QString &server ) | |||
83 | str.append( package->getVersion() ); | 84 | str.append( package->getVersion() ); |
84 | } | 85 | } |
85 | else | 86 | else |
86 | { | 87 | { |
87 | str.append( tr( "<p><b>Version Available</b> - " ) ); | 88 | str.append( tr( "<p><b>Version Available</b> - " ) ); |
88 | str.append( package->getVersion() ); | 89 | str.append( package->getVersion() ); |
89 | if ( package->getLocalPackage() ) | 90 | if ( local ) |
90 | { | 91 | { |
91 | if ( package->isInstalled() ) | 92 | if ( package->isInstalled() ) |
92 | { | 93 | { |
93 | str.append( tr( "<p><b>Version Installed</b> - " ) ); | 94 | str.append( tr( "<p><b>Version Installed</b> - " ) ); |
94 | str.append( package->getInstalledVersion() ); | 95 | str.append( package->getInstalledVersion() ); |
95 | } | 96 | } |
diff --git a/noncore/settings/aqpkg/server.cpp b/noncore/settings/aqpkg/server.cpp index 4693db1..0282236 100644 --- a/noncore/settings/aqpkg/server.cpp +++ b/noncore/settings/aqpkg/server.cpp | |||
@@ -116,13 +116,13 @@ void Server :: readLocalIpks( Server *local ) | |||
116 | { | 116 | { |
117 | // OK, we have a local IPK file, I think the standard naming conventions | 117 | // OK, we have a local IPK file, I think the standard naming conventions |
118 | // for these are packagename_version_arm.ipk | 118 | // for these are packagename_version_arm.ipk |
119 | QString file = (*it)->file(); | 119 | QString file = (*it)->file(); |
120 | 120 | ||
121 | // Changed to display the filename (excluding the path) | 121 | // Changed to display the filename (excluding the path) |
122 | QString packageName = Utils::getFilenameFromIpkFilename( file ); | 122 | QString packageName = Utils::getPackageNameFromIpkFilename( file ); |
123 | QString ver = Utils::getPackageVersionFromIpkFilename( file ); | 123 | QString ver = Utils::getPackageVersionFromIpkFilename( file ); |
124 | Package *package = new Package( packageName ); | 124 | Package *package = new Package( packageName ); |
125 | package->setVersion( ver ); | 125 | package->setVersion( ver ); |
126 | package->setFilename( file ); | 126 | package->setFilename( file ); |
127 | package->setPackageStoredLocally( true ); | 127 | package->setPackageStoredLocally( true ); |
128 | packageList.append( package ); | 128 | packageList.append( package ); |
@@ -241,12 +241,15 @@ void Server :: readPackageFile( Server *local, bool clearAll, bool installingToR | |||
241 | } | 241 | } |
242 | 242 | ||
243 | void Server :: buildLocalPackages( Server *local ) | 243 | void Server :: buildLocalPackages( Server *local ) |
244 | { | 244 | { |
245 | Package *curr; | 245 | Package *curr; |
246 | QListIterator<Package> it( packageList ); | 246 | QListIterator<Package> it( packageList ); |
247 | |||
248 | QList<Package> *locallist = &local->getPackageList(); | ||
249 | |||
247 | for ( ; it.current(); ++it ) | 250 | for ( ; it.current(); ++it ) |
248 | { | 251 | { |
249 | curr = it.current(); | 252 | curr = it.current(); |
250 | QString name = curr->getPackageName(); | 253 | QString name = curr->getPackageName(); |
251 | 254 | ||
252 | // If the package name is an ipk name, then convert the filename to a package name | 255 | // If the package name is an ipk name, then convert the filename to a package name |
@@ -256,12 +259,20 @@ void Server :: buildLocalPackages( Server *local ) | |||
256 | if ( local ) | 259 | if ( local ) |
257 | { | 260 | { |
258 | Package *p = local->getPackage( name ); | 261 | Package *p = local->getPackage( name ); |
259 | curr->setLocalPackage( p ); | 262 | curr->setLocalPackage( p ); |
260 | if ( p ) | 263 | if ( p ) |
261 | { | 264 | { |
265 | // Replace local version | ||
266 | if ( curr->getVersion() > p->getVersion() ) | ||
267 | { | ||
268 | int pos = locallist->at(); | ||
269 | locallist->remove( p ); | ||
270 | locallist->insert( pos, curr ); | ||
271 | } | ||
272 | |||
262 | // Set some default stuff like size and things | 273 | // Set some default stuff like size and things |
263 | if ( p->getInstalledVersion() == curr->getVersion() ) | 274 | if ( p->getInstalledVersion() == curr->getVersion() ) |
264 | { | 275 | { |
265 | p->setPackageSize( curr->getPackageSize() ); | 276 | p->setPackageSize( curr->getPackageSize() ); |
266 | p->setSection( curr->getSection() ); | 277 | p->setSection( curr->getSection() ); |
267 | p->setDescription( curr->getDescription() ); | 278 | p->setDescription( curr->getDescription() ); |
diff --git a/noncore/settings/sysinfo/modulesinfo.cpp b/noncore/settings/sysinfo/modulesinfo.cpp index 3d127a8..8def0d6 100644 --- a/noncore/settings/sysinfo/modulesinfo.cpp +++ b/noncore/settings/sysinfo/modulesinfo.cpp | |||
@@ -45,13 +45,13 @@ ModulesInfo::ModulesInfo( QWidget* parent, const char* name, WFlags fl ) | |||
45 | ModulesView = new QListView( this ); | 45 | ModulesView = new QListView( this ); |
46 | int colnum = ModulesView->addColumn( tr( "Module" ) ); | 46 | int colnum = ModulesView->addColumn( tr( "Module" ) ); |
47 | colnum = ModulesView->addColumn( tr( "Size" ) ); | 47 | colnum = ModulesView->addColumn( tr( "Size" ) ); |
48 | ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); | 48 | ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); |
49 | colnum = ModulesView->addColumn( tr( "Use#" ) ); | 49 | colnum = ModulesView->addColumn( tr( "Use#" ) ); |
50 | ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); | 50 | ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); |
51 | colnum = ModulesView->addColumn( tr( "Used By" ) ); | 51 | colnum = ModulesView->addColumn( tr( "Used by" ) ); |
52 | ModulesView->setAllColumnsShowFocus( TRUE ); | 52 | ModulesView->setAllColumnsShowFocus( TRUE ); |
53 | layout->addMultiCellWidget( ModulesView, 0, 0, 0, 1 ); | 53 | layout->addMultiCellWidget( ModulesView, 0, 0, 0, 1 ); |
54 | QWhatsThis::add( ModulesView, tr( "This is a list of all the kernel modules currently loaded on this handheld device.\n\nClick and hold on a module to see additional information about the module, or to unload it." ) ); | 54 | QWhatsThis::add( ModulesView, tr( "This is a list of all the kernel modules currently loaded on this handheld device.\n\nClick and hold on a module to see additional information about the module, or to unload it." ) ); |
55 | 55 | ||
56 | // Test if we have /sbin/modinfo, and if so, allow module detail window | 56 | // Test if we have /sbin/modinfo, and if so, allow module detail window |
57 | if ( QFile::exists( "/sbin/modinfo" ) ) | 57 | if ( QFile::exists( "/sbin/modinfo" ) ) |
@@ -138,15 +138,13 @@ void ModulesInfo::slotSendClicked() | |||
138 | { | 138 | { |
139 | if ( !ModulesView->currentItem() ) | 139 | if ( !ModulesView->currentItem() ) |
140 | { | 140 | { |
141 | return; | 141 | return; |
142 | } | 142 | } |
143 | 143 | ||
144 | QString capstr = tr( "You really want to execute\n" ); | 144 | QString capstr = tr( "You really want to execute %1 for this module?" ).arg( CommandCB->currentText() ); |
145 | capstr.append( CommandCB->currentText() ); | ||
146 | capstr.append( "\nfor this module?" ); | ||
147 | 145 | ||
148 | QString modname = ModulesView->currentItem()->text( 0 ); | 146 | QString modname = ModulesView->currentItem()->text( 0 ); |
149 | 147 | ||
150 | if ( QMessageBox::warning( this, modname, capstr, | 148 | if ( QMessageBox::warning( this, modname, capstr, |
151 | QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes ) | 149 | QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes ) |
152 | { | 150 | { |
diff --git a/noncore/settings/sysinfo/opie-sysinfo.control b/noncore/settings/sysinfo/opie-sysinfo.control index acb51e5..8250174 100644 --- a/noncore/settings/sysinfo/opie-sysinfo.control +++ b/noncore/settings/sysinfo/opie-sysinfo.control | |||
@@ -1,10 +1,10 @@ | |||
1 | Package: opie-sysinfo | 1 | Package: opie-sysinfo |
2 | Files: bin/sysinfo apps/Settings/sysinfo.desktop pics/sysinfo | 2 | Files: bin/sysinfo apps/Settings/sysinfo.desktop pics/sysinfo |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/applications | 4 | Section: opie/applications |
5 | Maintainer: Dan Williams <williamsdr@acm.org> | 5 | Maintainer: Dan Williams <williamsdr@acm.org> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Version: $QPE_VERSION-$SUB_VERSION | ||
8 | Depends: task-opie-minimal, libopie1 | 7 | Depends: task-opie-minimal, libopie1 |
9 | Description: System Information dialog | 8 | Description: System Information dialog |
10 | For the Opie environment. | 9 | For the Opie environment. |
10 | Version: $QPE_VERSION$EXTRAVERSION | ||
diff --git a/noncore/settings/sysinfo/processinfo.cpp b/noncore/settings/sysinfo/processinfo.cpp index 1de1a19..8dec9be 100644 --- a/noncore/settings/sysinfo/processinfo.cpp +++ b/noncore/settings/sysinfo/processinfo.cpp | |||
@@ -161,15 +161,13 @@ void ProcessInfo::slotSendClicked() | |||
161 | QListViewItem *currprocess = ProcessView->currentItem(); | 161 | QListViewItem *currprocess = ProcessView->currentItem(); |
162 | if ( !currprocess ) | 162 | if ( !currprocess ) |
163 | { | 163 | { |
164 | return; | 164 | return; |
165 | } | 165 | } |
166 | 166 | ||
167 | QString capstr = tr( "You really want to send\n" ); | 167 | QString capstr = tr( "You really want to send %1 to this process?" ).arg( SignalCB->currentText() ); |
168 | capstr.append( SignalCB->currentText() ); | ||
169 | capstr.append( "\nto this process?" ); | ||
170 | 168 | ||
171 | 169 | ||
172 | if ( QMessageBox::warning( this, currprocess->text( 1 ), capstr, | 170 | if ( QMessageBox::warning( this, currprocess->text( 1 ), capstr, |
173 | QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes ) | 171 | QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes ) |
174 | { | 172 | { |
175 | currprocess = ProcessView->currentItem(); | 173 | currprocess = ProcessView->currentItem(); |