summaryrefslogtreecommitdiff
authorandyq <andyq>2002-11-21 18:57:01 (UTC)
committer andyq <andyq>2002-11-21 18:57:01 (UTC)
commite6cb9bb71d4849263ada2f5549c85740c96b065a (patch) (unidiff)
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
@@ -1,857 +1,859 @@
1/*************************************************************************** 1/***************************************************************************
2 networkpkgmgr.cpp - description 2 networkpkgmgr.cpp - description
3 ------------------- 3 -------------------
4 begin : Mon Aug 26 13:32:30 BST 2002 4 begin : Mon Aug 26 13:32:30 BST 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 <fstream> 18#include <fstream>
19#include <iostream> 19#include <iostream>
20using namespace std; 20using namespace std;
21 21
22#include <unistd.h> 22#include <unistd.h>
23#include <stdlib.h> 23#include <stdlib.h>
24#include <linux/limits.h> 24#include <linux/limits.h>
25 25
26#ifdef QWS 26#ifdef QWS
27#include <qpe/qpeapplication.h> 27#include <qpe/qpeapplication.h>
28#include <qpe/qcopenvelope_qws.h> 28#include <qpe/qcopenvelope_qws.h>
29#include <qpe/config.h> 29#include <qpe/config.h>
30#else 30#else
31#include <qapplication.h> 31#include <qapplication.h>
32#endif 32#endif
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qfile.h> 34#include <qfile.h>
35#include <qmessagebox.h> 35#include <qmessagebox.h>
36 36
37#include "datamgr.h" 37#include "datamgr.h"
38#include "networkpkgmgr.h" 38#include "networkpkgmgr.h"
39#include "installdlgimpl.h" 39#include "installdlgimpl.h"
40#include "ipkg.h" 40#include "ipkg.h"
41#include "inputdlg.h" 41#include "inputdlg.h"
42#include "letterpushbutton.h" 42#include "letterpushbutton.h"
43#include "categoryfilterimpl.h" 43#include "categoryfilterimpl.h"
44 44
45#include "global.h" 45#include "global.h"
46 46
47extern int compareVersions( const char *v1, const char *v2 ); 47extern int compareVersions( const char *v1, const char *v2 );
48 48
49NetworkPackageManager::NetworkPackageManager( DataManager *dataManager, QWidget *parent, const char *name) 49NetworkPackageManager::NetworkPackageManager( DataManager *dataManager, QWidget *parent, const char *name)
50 : QWidget(parent, name) 50 : QWidget(parent, name)
51{ 51{
52 dataMgr = dataManager; 52 dataMgr = dataManager;
53 53
54#ifdef QWS 54#ifdef QWS
55 // read download directory from config file 55 // read download directory from config file
56 Config cfg( "aqpkg" ); 56 Config cfg( "aqpkg" );
57 cfg.setGroup( "settings" ); 57 cfg.setGroup( "settings" );
58 currentlySelectedServer = cfg.readEntry( "selectedServer", "local" ); 58 currentlySelectedServer = cfg.readEntry( "selectedServer", "local" );
59 showJumpTo = cfg.readBoolEntry( "showJumpTo", "true" ); 59 showJumpTo = cfg.readBoolEntry( "showJumpTo", "true" );
60 60
61#endif 61#endif
62 62
63 showUninstalledPkgs = false; 63 showUninstalledPkgs = false;
64 showInstalledPkgs = false; 64 showInstalledPkgs = false;
65 showUpgradedPkgs = false; 65 showUpgradedPkgs = false;
66 categoryFilterEnabled = false; 66 categoryFilterEnabled = false;
67 67
68 initGui(); 68 initGui();
69 setupConnections(); 69 setupConnections();
70 70
71 updateData(); 71 updateData();
72} 72}
73 73
74NetworkPackageManager::~NetworkPackageManager() 74NetworkPackageManager::~NetworkPackageManager()
75{ 75{
76} 76}
77 77
78void NetworkPackageManager :: timerEvent ( QTimerEvent * ) 78void NetworkPackageManager :: timerEvent ( QTimerEvent * )
79{ 79{
80 killTimer( timerId ); 80 killTimer( timerId );
81 81
82 // Add server names to listbox 82 // Add server names to listbox
83 updateData(); 83 updateData();
84} 84}
85 85
86void NetworkPackageManager :: updateData() 86void NetworkPackageManager :: updateData()
87{ 87{
88 serversList->clear(); 88 serversList->clear();
89 packagesList->clear(); 89 packagesList->clear();
90 90
91 91
92 vector<Server>::iterator it; 92 vector<Server>::iterator it;
93 int activeItem = -1; 93 int activeItem = -1;
94 int i; 94 int i;
95 for ( i = 0, it = dataMgr->getServerList().begin() ; it != dataMgr->getServerList().end() ; ++it, ++i ) 95 for ( i = 0, it = dataMgr->getServerList().begin() ; it != dataMgr->getServerList().end() ; ++it, ++i )
96 { 96 {
97// cout << "Adding " << it->getServerName() << " to combobox" << endl; 97// cout << "Adding " << it->getServerName() << " to combobox" << endl;
98 if ( !it->isServerActive() ) 98 if ( !it->isServerActive() )
99 { 99 {
100 cout << it->getServerName() << " is not active" << endl; 100 cout << it->getServerName() << " is not active" << endl;
101 i--; 101 i--;
102 continue; 102 continue;
103 } 103 }
104 serversList->insertItem( it->getServerName() ); 104 serversList->insertItem( it->getServerName() );
105 if ( it->getServerName() == currentlySelectedServer ) 105 if ( it->getServerName() == currentlySelectedServer )
106 activeItem = i; 106 activeItem = i;
107 } 107 }
108 108
109 // set selected server to be active server 109 // set selected server to be active server
110 if ( activeItem != -1 ) 110 if ( activeItem != -1 )
111 serversList->setCurrentItem( activeItem ); 111 serversList->setCurrentItem( activeItem );
112 serverSelected( 0 ); 112 serverSelected( 0 );
113} 113}
114 114
115void NetworkPackageManager :: selectLocalPackage( const QString &pkg ) 115void NetworkPackageManager :: selectLocalPackage( const QString &pkg )
116{ 116{
117 // First select local server 117 // First select local server
118 for ( int i = 0 ; i < serversList->count() ; ++i ) 118 for ( int i = 0 ; i < serversList->count() ; ++i )
119 { 119 {
120 if ( serversList->text( i ) == LOCAL_IPKGS ) 120 if ( serversList->text( i ) == LOCAL_IPKGS )
121 { 121 {
122 serversList->setCurrentItem( i ); 122 serversList->setCurrentItem( i );
123 break; 123 break;
124 } 124 }
125 } 125 }
126 serverSelected( 0 ); 126 serverSelected( 0 );
127 127
128 // Now set the check box of the selected package 128 // Now set the check box of the selected package
129 for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild(); 129 for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild();
130 item != 0 ; 130 item != 0 ;
131 item = (QCheckListItem *)item->nextSibling() ) 131 item = (QCheckListItem *)item->nextSibling() )
132 { 132 {
133 if ( item->text().startsWith( pkg ) ) 133 if ( item->text().startsWith( pkg ) )
134 { 134 {
135 item->setOn( true ); 135 item->setOn( true );
136 break; 136 break;
137 } 137 }
138 } 138 }
139} 139}
140 140
141 141
142void NetworkPackageManager :: initGui() 142void NetworkPackageManager :: initGui()
143{ 143{
144 QLabel *l = new QLabel( "Servers", this ); 144 QLabel *l = new QLabel( "Servers", this );
145 serversList = new QComboBox( this ); 145 serversList = new QComboBox( this );
146 packagesList = new QListView( this ); 146 packagesList = new QListView( this );
147 update = new QPushButton( "Refresh Lists", this ); 147 update = new QPushButton( "Refresh Lists", this );
148 download = new QPushButton( "Download", this ); 148 download = new QPushButton( "Download", this );
149 upgrade = new QPushButton( "Upgrade", this ); 149 upgrade = new QPushButton( "Upgrade", this );
150 apply = new QPushButton( "Apply", this ); 150 apply = new QPushButton( "Apply", this );
151 151
152 QVBoxLayout *vbox = new QVBoxLayout( this, 0, -1, "VBox" ); 152 QVBoxLayout *vbox = new QVBoxLayout( this, 0, -1, "VBox" );
153 QHBoxLayout *hbox1 = new QHBoxLayout( vbox, -1, "HBox1" ); 153 QHBoxLayout *hbox1 = new QHBoxLayout( vbox, -1, "HBox1" );
154 hbox1->addWidget( l ); 154 hbox1->addWidget( l );
155 hbox1->addWidget( serversList ); 155 hbox1->addWidget( serversList );
156 156
157 QHBoxLayout *hbox3 = new QHBoxLayout( vbox, -1, "HBox1" ); 157 QHBoxLayout *hbox3 = new QHBoxLayout( vbox, -1, "HBox1" );
158 QHBoxLayout *hbox4 = new QHBoxLayout( vbox, -1, "HBox1" ); 158 QHBoxLayout *hbox4 = new QHBoxLayout( vbox, -1, "HBox1" );
159 159
160 160
161 if ( showJumpTo ) 161 if ( showJumpTo )
162 { 162 {
163 char text[2]; 163 char text[2];
164 text[1] = '\0'; 164 text[1] = '\0';
165 for ( int i = 0 ; i < 26 ; ++i ) 165 for ( int i = 0 ; i < 26 ; ++i )
166 { 166 {
167 text[0] = 'A' + i; 167 text[0] = 'A' + i;
168 LetterPushButton *b = new LetterPushButton( text, this ); 168 LetterPushButton *b = new LetterPushButton( text, this );
169 connect( b, SIGNAL( released( QString ) ), this, SLOT( letterPushed( QString ) ) ); 169 connect( b, SIGNAL( released( QString ) ), this, SLOT( letterPushed( QString ) ) );
170 if ( i < 13 ) 170 if ( i < 13 )
171 hbox3->addWidget( b ); 171 hbox3->addWidget( b );
172 else 172 else
173 hbox4->addWidget( b ); 173 hbox4->addWidget( b );
174 } 174 }
175 } 175 }
176 176
177 vbox->addWidget( packagesList ); 177 vbox->addWidget( packagesList );
178 packagesList->addColumn( "Packages" ); 178 packagesList->addColumn( "Packages" );
179 179
180 QHBoxLayout *hbox2 = new QHBoxLayout( vbox, -1, "HBox2" ); 180 QHBoxLayout *hbox2 = new QHBoxLayout( vbox, -1, "HBox2" );
181 hbox2->addWidget( update ); 181 hbox2->addWidget( update );
182 hbox2->addWidget( download ); 182 hbox2->addWidget( download );
183 hbox2->addWidget( upgrade ); 183 hbox2->addWidget( upgrade );
184 hbox2->addWidget( apply ); 184 hbox2->addWidget( apply );
185} 185}
186 186
187void NetworkPackageManager :: setupConnections() 187void NetworkPackageManager :: setupConnections()
188{ 188{
189 connect( serversList, SIGNAL(activated( int )), this, SLOT(serverSelected( int ))); 189 connect( serversList, SIGNAL(activated( int )), this, SLOT(serverSelected( int )));
190 connect( apply, SIGNAL(released()), this, SLOT(applyChanges()) ); 190 connect( apply, SIGNAL(released()), this, SLOT(applyChanges()) );
191 connect( download, SIGNAL(released()), this, SLOT(downloadPackage()) ); 191 connect( download, SIGNAL(released()), this, SLOT(downloadPackage()) );
192 connect( upgrade, SIGNAL( released()), this, SLOT(upgradePackages()) ); 192 connect( upgrade, SIGNAL( released()), this, SLOT(upgradePackages()) );
193 connect( update, SIGNAL(released()), this, SLOT(updateServer()) ); 193 connect( update, SIGNAL(released()), this, SLOT(updateServer()) );
194} 194}
195 195
196void NetworkPackageManager :: showProgressDialog( char *initialText ) 196void NetworkPackageManager :: showProgressDialog( char *initialText )
197{ 197{
198 if ( !progressDlg ) 198 if ( !progressDlg )
199 progressDlg = new ProgressDlg( this, "Progress", false ); 199 progressDlg = new ProgressDlg( this, "Progress", false );
200 progressDlg->setText( initialText ); 200 progressDlg->setText( initialText );
201 progressDlg->show(); 201 progressDlg->show();
202} 202}
203 203
204 204
205void NetworkPackageManager :: serverSelected( int ) 205void NetworkPackageManager :: serverSelected( int )
206{ 206{
207 packagesList->clear(); 207 packagesList->clear();
208 208
209 // display packages 209 // display packages
210 QString serverName = serversList->currentText(); 210 QString serverName = serversList->currentText();
211 currentlySelectedServer = serverName; 211 currentlySelectedServer = serverName;
212 212
213#ifdef QWS 213#ifdef QWS
214 // read download directory from config file 214 // read download directory from config file
215 Config cfg( "aqpkg" ); 215 Config cfg( "aqpkg" );
216 cfg.setGroup( "settings" ); 216 cfg.setGroup( "settings" );
217 cfg.writeEntry( "selectedServer", currentlySelectedServer ); 217 cfg.writeEntry( "selectedServer", currentlySelectedServer );
218#endif 218#endif
219 219
220 Server *s = dataMgr->getServer( serverName ); 220 Server *s = dataMgr->getServer( serverName );
221 221
222 vector<Package> &list = s->getPackageList(); 222 vector<Package> &list = s->getPackageList();
223 vector<Package>::iterator it; 223 vector<Package>::iterator it;
224 for ( it = list.begin() ; it != list.end() ; ++it ) 224 for ( it = list.begin() ; it != list.end() ; ++it )
225 { 225 {
226 226
227 QString text = ""; 227 QString text = "";
228 228
229 // Apply show only uninstalled packages filter 229 // Apply show only uninstalled packages filter
230 if ( showUninstalledPkgs && it->isInstalled() ) 230 if ( showUninstalledPkgs && it->isInstalled() )
231 continue; 231 continue;
232 232
233 // Apply show only installed packages filter 233 // Apply show only installed packages filter
234 if ( showInstalledPkgs && !it->isInstalled() ) 234 if ( showInstalledPkgs && !it->isInstalled() )
235 continue; 235 continue;
236 236
237 // Apply show only new installed packages filter 237 // Apply show only new installed packages filter
238 if ( showUpgradedPkgs ) 238 if ( showUpgradedPkgs )
239 { 239 {
240 if ( !it->isInstalled() || 240 if ( !it->isInstalled() ||
241 compareVersions( it->getInstalledVersion(), it->getVersion() ) != 1 ) 241 compareVersions( it->getInstalledVersion(), it->getVersion() ) != 1 )
242 continue; 242 continue;
243 } 243 }
244 244
245 // Apply the section filter 245 // Apply the section filter
246 if ( categoryFilterEnabled && categoryFilter != "" ) 246 if ( categoryFilterEnabled && categoryFilter != "" )
247 { 247 {
248 if ( it->getSection() == "" || categoryFilter.find( it->getSection().lower() ) == -1 ) 248 if ( it->getSection() == "" || categoryFilter.find( it->getSection().lower() ) == -1 )
249 continue; 249 continue;
250 } 250 }
251 251
252 // If the local server, only display installed packages 252 // If the local server, only display installed packages
253 if ( serverName == LOCAL_SERVER && !it->isInstalled() ) 253 if ( serverName == LOCAL_SERVER && !it->isInstalled() )
254 continue; 254 continue;
255 255
256 256
257 text += it->getPackageName(); 257 text += it->getPackageName();
258 if ( it->isInstalled() ) 258 if ( it->isInstalled() )
259 { 259 {
260 text += " (installed)"; 260 text += " (installed)";
261 261
262 // If a different version of package is available, postfix it with an * 262 // If a different version of package is available, postfix it with an *
263 if ( it->getVersion() != it->getInstalledVersion() ) 263 if ( it->getVersion() != it->getInstalledVersion() )
264 { 264 {
265 265
266 if ( compareVersions( it->getInstalledVersion(), it->getVersion() ) == 1 ) 266 if ( compareVersions( it->getInstalledVersion(), it->getVersion() ) == 1 )
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
335void NetworkPackageManager :: updateServer() 337void NetworkPackageManager :: updateServer()
336{ 338{
337 QString serverName = serversList->currentText(); 339 QString serverName = serversList->currentText();
338 340
339 // Update the current server 341 // Update the current server
340 // Display dialog 342 // Display dialog
341 343
342 // Disable buttons to stop silly people clicking lots on them :) 344 // Disable buttons to stop silly people clicking lots on them :)
343 345
344 // First, write out ipkg_conf file so that ipkg can use it 346 // First, write out ipkg_conf file so that ipkg can use it
345 dataMgr->writeOutIpkgConf(); 347 dataMgr->writeOutIpkgConf();
346 348
347 Ipkg ipkg; 349 Ipkg ipkg;
348 ipkg.setOption( "update" ); 350 ipkg.setOption( "update" );
349 351
350 InstallDlgImpl dlg( &ipkg, "Refreshing server package lists", this, "Upgrade", true ); 352 InstallDlgImpl dlg( &ipkg, "Refreshing server package lists", this, "Upgrade", true );
351 dlg.showDlg(); 353 dlg.showDlg();
352 354
353 // Reload data 355 // Reload data
354 dataMgr->reloadServerData(); 356 dataMgr->reloadServerData();
355 serverSelected(-1); 357 serverSelected(-1);
356// delete progDlg; 358// delete progDlg;
357} 359}
358 360
359void NetworkPackageManager :: upgradePackages() 361void NetworkPackageManager :: upgradePackages()
360{ 362{
361 // We're gonna do an upgrade of all packages 363 // We're gonna do an upgrade of all packages
362 // First warn user that this isn't recommended 364 // First warn user that this isn't recommended
363 QString text = "WARNING: Upgrading while\nOpie/Qtopia is running\nis NOT recommended!\n\nAre you sure?\n"; 365 QString text = "WARNING: Upgrading while\nOpie/Qtopia is running\nis NOT recommended!\n\nAre you sure?\n";
364 QMessageBox warn("Warning", text, QMessageBox::Warning, 366 QMessageBox warn("Warning", text, QMessageBox::Warning,
365 QMessageBox::Yes, 367 QMessageBox::Yes,
366 QMessageBox::No | QMessageBox::Escape | QMessageBox::Default , 368 QMessageBox::No | QMessageBox::Escape | QMessageBox::Default ,
367 0, this ); 369 0, this );
368 warn.adjustSize(); 370 warn.adjustSize();
369 371
370 if ( warn.exec() == QMessageBox::Yes ) 372 if ( warn.exec() == QMessageBox::Yes )
371 { 373 {
372 // First, write out ipkg_conf file so that ipkg can use it 374 // First, write out ipkg_conf file so that ipkg can use it
373 dataMgr->writeOutIpkgConf(); 375 dataMgr->writeOutIpkgConf();
374 376
375 // Now run upgrade 377 // Now run upgrade
376 Ipkg ipkg; 378 Ipkg ipkg;
377 ipkg.setOption( "upgrade" ); 379 ipkg.setOption( "upgrade" );
378 380
379 InstallDlgImpl dlg( &ipkg, "Upgrading installed packages", this, "Upgrade", true ); 381 InstallDlgImpl dlg( &ipkg, "Upgrading installed packages", this, "Upgrade", true );
380 dlg.showDlg(); 382 dlg.showDlg();
381 383
382 // Reload data 384 // Reload data
383 dataMgr->reloadServerData(); 385 dataMgr->reloadServerData();
384 serverSelected(-1); 386 serverSelected(-1);
385 } 387 }
386} 388}
387 389
388 390
389void NetworkPackageManager :: downloadPackage() 391void NetworkPackageManager :: downloadPackage()
390{ 392{
391 bool doUpdate = true; 393 bool doUpdate = true;
392 if ( download->text() == "Download" ) 394 if ( download->text() == "Download" )
393 { 395 {
394 // See if any packages are selected 396 // See if any packages are selected
395 bool found = false; 397 bool found = false;
396 if ( serversList->currentText() != LOCAL_SERVER ) 398 if ( serversList->currentText() != LOCAL_SERVER )
397 { 399 {
398 for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild(); 400 for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild();
399 item != 0 && !found; 401 item != 0 && !found;
400 item = (QCheckListItem *)item->nextSibling() ) 402 item = (QCheckListItem *)item->nextSibling() )
401 { 403 {
402 if ( item->isOn() ) 404 if ( item->isOn() )
403 found = true; 405 found = true;
404 } 406 }
405 } 407 }
406 408
407 // If user selected some packages then download the and store the locally 409 // If user selected some packages then download the and store the locally
408 // otherwise, display dialog asking user what package to download from an http server 410 // otherwise, display dialog asking user what package to download from an http server
409 // and whether to install it 411 // and whether to install it
410 if ( found ) 412 if ( found )
411 downloadSelectedPackages(); 413 downloadSelectedPackages();
412 else 414 else
413 downloadRemotePackage(); 415 downloadRemotePackage();
414 416
415 } 417 }
416 else if ( download->text() == "Remove" ) 418 else if ( download->text() == "Remove" )
417 { 419 {
418 doUpdate = false; 420 doUpdate = false;
419 for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild(); 421 for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild();
420 item != 0 ; 422 item != 0 ;
421 item = (QCheckListItem *)item->nextSibling() ) 423 item = (QCheckListItem *)item->nextSibling() )
422 { 424 {
423 if ( item->isOn() ) 425 if ( item->isOn() )
424 { 426 {
425 QString name = item->text(); 427 QString name = item->text();
426 int pos = name.find( "*" ); 428 int pos = name.find( "*" );
427 name.truncate( pos ); 429 name.truncate( pos );
428 430
429 // if (there is a (installed), remove it 431 // if (there is a (installed), remove it
430 pos = name.find( "(installed)" ); 432 pos = name.find( "(installed)" );
431 if ( pos > 0 ) 433 if ( pos > 0 )
432 name.truncate( pos - 1 ); 434 name.truncate( pos - 1 );
433 435
434 Package *p = dataMgr->getServer( serversList->currentText() )->getPackage( name ); 436 Package *p = dataMgr->getServer( serversList->currentText() )->getPackage( name );
435 437
436 QString msgtext; 438 QString msgtext;
437 msgtext.sprintf( "Are you sure you wish to delete\n%s?", (const char *)p->getPackageName() ); 439 msgtext.sprintf( "Are you sure you wish to delete\n%s?", (const char *)p->getPackageName() );
438 if ( QMessageBox::information( this, "Are you sure?", 440 if ( QMessageBox::information( this, "Are you sure?",
439 msgtext, "No", "Yes" ) == 1 ) 441 msgtext, "No", "Yes" ) == 1 )
440 { 442 {
441 doUpdate = true; 443 doUpdate = true;
442 QFile f( p->getFilename() ); 444 QFile f( p->getFilename() );
443 f.remove(); 445 f.remove();
444 } 446 }
445 } 447 }
446 } 448 }
447 } 449 }
448 450
449 if ( doUpdate ) 451 if ( doUpdate )
450 { 452 {
451 dataMgr->reloadServerData(); 453 dataMgr->reloadServerData();
452 serverSelected( -1 ); 454 serverSelected( -1 );
453 } 455 }
454} 456}
455 457
456void NetworkPackageManager :: downloadSelectedPackages() 458void NetworkPackageManager :: downloadSelectedPackages()
457{ 459{
458 // First, write out ipkg_conf file so that ipkg can use it 460 // First, write out ipkg_conf file so that ipkg can use it
459 dataMgr->writeOutIpkgConf(); 461 dataMgr->writeOutIpkgConf();
460 462
461 // Display dialog to user asking where to download the files to 463 // Display dialog to user asking where to download the files to
462 bool ok = FALSE; 464 bool ok = FALSE;
463 QString dir = ""; 465 QString dir = "";
464#ifdef QWS 466#ifdef QWS
465 // read download directory from config file 467 // read download directory from config file
466 Config cfg( "aqpkg" ); 468 Config cfg( "aqpkg" );
467 cfg.setGroup( "settings" ); 469 cfg.setGroup( "settings" );
468 dir = cfg.readEntry( "downloadDir", "/home/root/Documents/application/ipkg" ); 470 dir = cfg.readEntry( "downloadDir", "/home/root/Documents/application/ipkg" );
469#endif 471#endif
470 472
471 QString text = InputDialog::getText( tr( "Download to where" ), tr( "Enter path to download to" ), dir, &ok, this ); 473 QString text = InputDialog::getText( tr( "Download to where" ), tr( "Enter path to download to" ), dir, &ok, this );
472 if ( ok && !text.isEmpty() ) 474 if ( ok && !text.isEmpty() )
473 dir = text; // user entered something and pressed ok 475 dir = text; // user entered something and pressed ok
474 else 476 else
475 return; // user entered nothing or pressed cancel 477 return; // user entered nothing or pressed cancel
476 478
477#ifdef QWS 479#ifdef QWS
478 // Store download directory in config file 480 // Store download directory in config file
479 cfg.writeEntry( "downloadDir", dir ); 481 cfg.writeEntry( "downloadDir", dir );
480#endif 482#endif
481 483
482 // Get starting directory 484 // Get starting directory
483 char initDir[PATH_MAX]; 485 char initDir[PATH_MAX];
484 getcwd( initDir, PATH_MAX ); 486 getcwd( initDir, PATH_MAX );
485 487
486 // Download each package 488 // Download each package
487 Ipkg ipkg; 489 Ipkg ipkg;
488 connect( &ipkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &))); 490 connect( &ipkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &)));
489 491
490 ipkg.setOption( "download" ); 492 ipkg.setOption( "download" );
491 ipkg.setRuntimeDirectory( dir ); 493 ipkg.setRuntimeDirectory( dir );
492 for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild(); 494 for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild();
493 item != 0 ; 495 item != 0 ;
494 item = (QCheckListItem *)item->nextSibling() ) 496 item = (QCheckListItem *)item->nextSibling() )
495 { 497 {
496 if ( item->isOn() ) 498 if ( item->isOn() )
497 { 499 {
498 QString name = item->text(); 500 QString name = item->text();
499 int pos = name.find( "*" ); 501 int pos = name.find( "*" );
500 name.truncate( pos ); 502 name.truncate( pos );
501 503
502 // if (there is a (installed), remove it 504 // if (there is a (installed), remove it
503 pos = name.find( "(installed)" ); 505 pos = name.find( "(installed)" );
504 if ( pos > 0 ) 506 if ( pos > 0 )
505 name.truncate( pos - 1 ); 507 name.truncate( pos - 1 );
506 508
507 ipkg.setPackage( name ); 509 ipkg.setPackage( name );
508 ipkg.runIpkg( ); 510 ipkg.runIpkg( );
509 } 511 }
510 } 512 }
511} 513}
512 514
513void NetworkPackageManager :: downloadRemotePackage() 515void NetworkPackageManager :: downloadRemotePackage()
514{ 516{
515 // Display dialog 517 // Display dialog
516 bool ok; 518 bool ok;
517 QString package = InputDialog::getText( "Install Remote Package", tr( "Enter package location" ), "http://", &ok, this ); 519 QString package = InputDialog::getText( "Install Remote Package", tr( "Enter package location" ), "http://", &ok, this );
518 if ( !ok || package.isEmpty() ) 520 if ( !ok || package.isEmpty() )
519 return; 521 return;
520// DownloadRemoteDlgImpl dlg( this, "Install", true ); 522// DownloadRemoteDlgImpl dlg( this, "Install", true );
521// if ( dlg.exec() == QDialog::Rejected ) 523// if ( dlg.exec() == QDialog::Rejected )
522// return; 524// return;
523 525
524 // grab details from dialog 526 // grab details from dialog
525// QString package = dlg.getPackageLocation(); 527// QString package = dlg.getPackageLocation();
526 528
527 InstallData item; 529 InstallData item;
528 item.option = "I"; 530 item.option = "I";
529 item.packageName = package; 531 item.packageName = package;
530 vector<InstallData> workingPackages; 532 vector<InstallData> workingPackages;
531 workingPackages.push_back( item ); 533 workingPackages.push_back( item );
532 534
533 InstallDlgImpl dlg2( workingPackages, dataMgr, this, "Install", true ); 535 InstallDlgImpl dlg2( workingPackages, dataMgr, this, "Install", true );
534 dlg2.showDlg(); 536 dlg2.showDlg();
535 537
536 // Reload data 538 // Reload data
537 dataMgr->reloadServerData(); 539 dataMgr->reloadServerData();
538 serverSelected(-1); 540 serverSelected(-1);
539 541
540#ifdef QWS 542#ifdef QWS
541 // Finally let the main system update itself 543 // Finally let the main system update itself
542 QCopEnvelope e("QPE/System", "linkChanged(QString)"); 544 QCopEnvelope e("QPE/System", "linkChanged(QString)");
543 QString lf = QString::null; 545 QString lf = QString::null;
544 e << lf; 546 e << lf;
545#endif 547#endif
546} 548}
547 549
548 550
549void NetworkPackageManager :: applyChanges() 551void NetworkPackageManager :: applyChanges()
550{ 552{
551 stickyOption = ""; 553 stickyOption = "";
552 554
553 // First, write out ipkg_conf file so that ipkg can use it 555 // First, write out ipkg_conf file so that ipkg can use it
554 dataMgr->writeOutIpkgConf(); 556 dataMgr->writeOutIpkgConf();
555 557
556 // Now for each selected item 558 // Now for each selected item
557 // deal with it 559 // deal with it
558 560
559 vector<InstallData> workingPackages; 561 vector<InstallData> workingPackages;
560 for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild(); 562 for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild();
561 item != 0 ; 563 item != 0 ;
562 item = (QCheckListItem *)item->nextSibling() ) 564 item = (QCheckListItem *)item->nextSibling() )
563 { 565 {
564 if ( item->isOn() ) 566 if ( item->isOn() )
565 { 567 {
566 InstallData data = dealWithItem( item ); 568 InstallData data = dealWithItem( item );
567 workingPackages.push_back( data ); 569 workingPackages.push_back( data );
568 } 570 }
569 } 571 }
570 572
571 if ( workingPackages.size() == 0 ) 573 if ( workingPackages.size() == 0 )
572 { 574 {
573 // Nothing to do 575 // Nothing to do
574 QMessageBox::information( this, "Nothing to do", 576 QMessageBox::information( this, "Nothing to do",
575 "No packages selected", "OK" ); 577 "No packages selected", "OK" );
576 578
577 return; 579 return;
578 } 580 }
579 581
580 // do the stuff 582 // do the stuff
581 InstallDlgImpl dlg( workingPackages, dataMgr, this, "Install", true ); 583 InstallDlgImpl dlg( workingPackages, dataMgr, this, "Install", true );
582 dlg.showDlg(); 584 dlg.showDlg();
583 585
584 // Reload data 586 // Reload data
585 dataMgr->reloadServerData(); 587 dataMgr->reloadServerData();
586 serverSelected(-1); 588 serverSelected(-1);
587 589
588#ifdef QWS 590#ifdef QWS
589 // Finally let the main system update itself 591 // Finally let the main system update itself
590 QCopEnvelope e("QPE/System", "linkChanged(QString)"); 592 QCopEnvelope e("QPE/System", "linkChanged(QString)");
591 QString lf = QString::null; 593 QString lf = QString::null;
592 e << lf; 594 e << lf;
593#endif 595#endif
594} 596}
595 597
596// decide what to do - either remove, upgrade or install 598// decide what to do - either remove, upgrade or install
597// Current rules: 599// Current rules:
598// If not installed - install 600// If not installed - install
599// If installed and different version available - upgrade 601// If installed and different version available - upgrade
600// If installed and version up to date - remove 602// If installed and version up to date - remove
601InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item ) 603InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item )
602{ 604{
603 QString name = item->text(); 605 QString name = item->text();
604 int pos = name.find( "*" ); 606 int pos = name.find( "*" );
605 name.truncate( pos ); 607 name.truncate( pos );
606 608
607 // if (there is a (installed), remove it 609 // if (there is a (installed), remove it
608 pos = name.find( "(installed)" ); 610 pos = name.find( "(installed)" );
609 if ( pos > 0 ) 611 if ( pos > 0 )
610 name.truncate( pos - 1 ); 612 name.truncate( pos - 1 );
611 613
612 // Get package 614 // Get package
613 Server *s = dataMgr->getServer( serversList->currentText() ); 615 Server *s = dataMgr->getServer( serversList->currentText() );
614 Package *p = s->getPackage( name ); 616 Package *p = s->getPackage( name );
615 617
616 // If the package has a filename then it is a local file 618 // If the package has a filename then it is a local file
617 if ( p->isPackageStoredLocally() ) 619 if ( p->isPackageStoredLocally() )
618 name = p->getFilename(); 620 name = p->getFilename();
619 621
620 QString option; 622 QString option;
621 QString dest = "root"; 623 QString dest = "root";
622 if ( !p->isInstalled() ) 624 if ( !p->isInstalled() )
623 { 625 {
624 InstallData item; 626 InstallData item;
625 item.option = "I"; 627 item.option = "I";
626 item.packageName = name; 628 item.packageName = name;
627 return item; 629 return item;
628 } 630 }
629 else 631 else
630 { 632 {
631 InstallData item; 633 InstallData item;
632 item.option = "D"; 634 item.option = "D";
633 if ( !p->isPackageStoredLocally() ) 635 if ( !p->isPackageStoredLocally() )
634 item.packageName = p->getInstalledPackageName(); 636 item.packageName = p->getInstalledPackageName();
635 else 637 else
636 item.packageName = name; 638 item.packageName = name;
637 639
638 if ( p->getInstalledTo() ) 640 if ( p->getInstalledTo() )
639 { 641 {
640 item.destination = p->getInstalledTo(); 642 item.destination = p->getInstalledTo();
641 cout << "dest - " << p->getInstalledTo()->getDestinationName() << endl; 643 cout << "dest - " << p->getInstalledTo()->getDestinationName() << endl;
642 cout << "dest - " << p->getInstalledTo()->getDestinationPath() << endl; 644 cout << "dest - " << p->getInstalledTo()->getDestinationPath() << endl;
643 } 645 }
644 else 646 else
645 { 647 {
646 item.destination = p->getLocalPackage()->getInstalledTo(); 648 item.destination = p->getLocalPackage()->getInstalledTo();
647 } 649 }
648 650
649 // Now see if version is newer or not 651 // Now see if version is newer or not
650 int val = compareVersions( p->getInstalledVersion(), p->getVersion() ); 652 int val = compareVersions( p->getInstalledVersion(), p->getVersion() );
651 653
652 // If the version requested is older and user selected a local ipk file, then reinstall the file 654 // If the version requested is older and user selected a local ipk file, then reinstall the file
653 if ( p->isPackageStoredLocally() && val == -1 ) 655 if ( p->isPackageStoredLocally() && val == -1 )
654 val = 0; 656 val = 0;
655 657
656 if ( val == -2 ) 658 if ( val == -2 )
657 { 659 {
658 // Error - should handle 660 // Error - should handle
659 } 661 }
660 else if ( val == -1 ) 662 else if ( val == -1 )
661 { 663 {
662 // Version available is older - remove only 664 // Version available is older - remove only
663 item.option = "D"; 665 item.option = "D";
664 } 666 }
665 else 667 else
666 { 668 {
667 QString caption; 669 QString caption;
668 QString text; 670 QString text;
669 QString secondButton; 671 QString secondButton;
670 QString secondOption; 672 QString secondOption;
671 if ( val == 0 ) 673 if ( val == 0 )
672 { 674 {
673 // Version available is the same - option to remove or reinstall 675 // Version available is the same - option to remove or reinstall
674 caption = "Do you wish to remove or reinstall\n%s?"; 676 caption = "Do you wish to remove or reinstall\n%s?";
675 text = "Remove or ReInstall"; 677 text = "Remove or ReInstall";
676 secondButton = "ReInstall"; 678 secondButton = "ReInstall";
677 secondOption = "R"; 679 secondOption = "R";
678 } 680 }
679 else if ( val == 1 ) 681 else if ( val == 1 )
680 { 682 {
681 // Version available is newer - option to remove or upgrade 683 // Version available is newer - option to remove or upgrade
682 caption = "Do you wish to remove or upgrade\n%s?"; 684 caption = "Do you wish to remove or upgrade\n%s?";
683 text = "Remove or Upgrade"; 685 text = "Remove or Upgrade";
684 secondButton = "Upgrade"; 686 secondButton = "Upgrade";
685 secondOption = "U"; 687 secondOption = "U";
686 } 688 }
687 689
688 // Sticky option not implemented yet, but will eventually allow 690 // Sticky option not implemented yet, but will eventually allow
689 // the user to say something like 'remove all' 691 // the user to say something like 'remove all'
690 if ( stickyOption == "" ) 692 if ( stickyOption == "" )
691 { 693 {
692 QString msgtext; 694 QString msgtext;
693 msgtext.sprintf( caption, (const char *)name ); 695 msgtext.sprintf( caption, (const char *)name );
694 switch( QMessageBox::information( this, text, 696 switch( QMessageBox::information( this, text,
695 msgtext, "Remove", secondButton ) ) 697 msgtext, "Remove", secondButton ) )
696 { 698 {
697 case 0: // Try again or Enter 699 case 0: // Try again or Enter
698 // option 0 = Remove 700 // option 0 = Remove
699 item.option = "D"; 701 item.option = "D";
700 break; 702 break;
701 case 1: // Quit or Escape 703 case 1: // Quit or Escape
702 item.option = secondOption; 704 item.option = secondOption;
703 break; 705 break;
704 } 706 }
705 } 707 }
706 else 708 else
707 { 709 {
708// item.option = stickyOption; 710// item.option = stickyOption;
709 } 711 }
710 } 712 }
711 713
712 714
713 // Check if we are reinstalling the same version 715 // Check if we are reinstalling the same version
714 if ( item.option != "R" ) 716 if ( item.option != "R" )
715 item.recreateLinks = true; 717 item.recreateLinks = true;
716 else 718 else
717 item.recreateLinks = false; 719 item.recreateLinks = false;
718 720
719 // User hit cancel (on dlg - assume remove) 721 // User hit cancel (on dlg - assume remove)
720 return item; 722 return item;
721 } 723 }
722} 724}
723 725
724void NetworkPackageManager :: displayText( const QString &t ) 726void NetworkPackageManager :: displayText( const QString &t )
725{ 727{
726 cout << t << endl; 728 cout << t << endl;
727} 729}
728 730
729 731
730void NetworkPackageManager :: letterPushed( QString t ) 732void NetworkPackageManager :: letterPushed( QString t )
731{ 733{
732 QCheckListItem *top = (QCheckListItem *)packagesList->firstChild(); 734 QCheckListItem *top = (QCheckListItem *)packagesList->firstChild();
733 QCheckListItem *start = (QCheckListItem *)packagesList->currentItem(); 735 QCheckListItem *start = (QCheckListItem *)packagesList->currentItem();
734 if ( packagesList->firstChild() == 0 ) 736 if ( packagesList->firstChild() == 0 )
735 return; 737 return;
736 738
737 QCheckListItem *item; 739 QCheckListItem *item;
738 if ( start == 0 ) 740 if ( start == 0 )
739 { 741 {
740 item = (QCheckListItem *)packagesList->firstChild(); 742 item = (QCheckListItem *)packagesList->firstChild();
741 start = top; 743 start = top;
742 } 744 }
743 else 745 else
744 item = (QCheckListItem *)start->nextSibling(); 746 item = (QCheckListItem *)start->nextSibling();
745 747
746 if ( item == 0 ) 748 if ( item == 0 )
747 item = (QCheckListItem *)packagesList->firstChild(); 749 item = (QCheckListItem *)packagesList->firstChild();
748 do 750 do
749 { 751 {
750 if ( item->text().lower().startsWith( t.lower() ) ) 752 if ( item->text().lower().startsWith( t.lower() ) )
751 { 753 {
752 packagesList->setSelected( item, true ); 754 packagesList->setSelected( item, true );
753 packagesList->ensureItemVisible( item ); 755 packagesList->ensureItemVisible( item );
754 break; 756 break;
755 } 757 }
756 758
757 item = (QCheckListItem *)item->nextSibling(); 759 item = (QCheckListItem *)item->nextSibling();
758 if ( !item ) 760 if ( !item )
759 item = (QCheckListItem *)packagesList->firstChild(); 761 item = (QCheckListItem *)packagesList->firstChild();
760 } while ( item != start); 762 } while ( item != start);
761} 763}
762 764
763 765
764void NetworkPackageManager :: searchForPackage( bool findNext ) 766void NetworkPackageManager :: searchForPackage( bool findNext )
765{ 767{
766 bool ok = false; 768 bool ok = false;
767 if ( !findNext || lastSearchText.isEmpty() ) 769 if ( !findNext || lastSearchText.isEmpty() )
768 lastSearchText = InputDialog::getText( "Search for package", "Enter package to search for", lastSearchText, &ok, this ).lower(); 770 lastSearchText = InputDialog::getText( "Search for package", "Enter package to search for", lastSearchText, &ok, this ).lower();
769 else 771 else
770 ok = true; 772 ok = true;
771 773
772 if ( ok && !lastSearchText.isEmpty() ) 774 if ( ok && !lastSearchText.isEmpty() )
773 { 775 {
774 cout << "searching for " << lastSearchText << endl; 776 cout << "searching for " << lastSearchText << endl;
775 // look through package list for text startng at current position 777 // look through package list for text startng at current position
776 vector<InstallData> workingPackages; 778 vector<InstallData> workingPackages;
777 QCheckListItem *start = (QCheckListItem *)packagesList->currentItem(); 779 QCheckListItem *start = (QCheckListItem *)packagesList->currentItem();
778 if ( start != 0 ) 780 if ( start != 0 )
779 start = (QCheckListItem *)start->nextSibling(); 781 start = (QCheckListItem *)start->nextSibling();
780 782
781 if ( start == 0 ) 783 if ( start == 0 )
782 start = (QCheckListItem *)packagesList->firstChild(); 784 start = (QCheckListItem *)packagesList->firstChild();
783 785
784 for ( QCheckListItem *item = start; item != 0 ; 786 for ( QCheckListItem *item = start; item != 0 ;
785 item = (QCheckListItem *)item->nextSibling() ) 787 item = (QCheckListItem *)item->nextSibling() )
786 { 788 {
787 cout << "checking " << item->text().lower() << endl; 789 cout << "checking " << item->text().lower() << endl;
788 if ( item->text().lower().find( lastSearchText ) != -1 ) 790 if ( item->text().lower().find( lastSearchText ) != -1 )
789 { 791 {
790 cout << "matched " << item->text() << endl; 792 cout << "matched " << item->text() << endl;
791 packagesList->ensureItemVisible( item ); 793 packagesList->ensureItemVisible( item );
792 packagesList->setCurrentItem( item ); 794 packagesList->setCurrentItem( item );
793 break; 795 break;
794 } 796 }
795 } 797 }
796 } 798 }
797} 799}
798 800
799void NetworkPackageManager :: showOnlyUninstalledPackages( bool val ) 801void NetworkPackageManager :: showOnlyUninstalledPackages( bool val )
800{ 802{
801 showUninstalledPkgs = val; 803 showUninstalledPkgs = val;
802 serverSelected( -1 ); 804 serverSelected( -1 );
803} 805}
804 806
805void NetworkPackageManager :: showOnlyInstalledPackages( bool val ) 807void NetworkPackageManager :: showOnlyInstalledPackages( bool val )
806{ 808{
807 showInstalledPkgs = val; 809 showInstalledPkgs = val;
808 serverSelected( -1 ); 810 serverSelected( -1 );
809} 811}
810 812
811void NetworkPackageManager :: showUpgradedPackages( bool val ) 813void NetworkPackageManager :: showUpgradedPackages( bool val )
812{ 814{
813 showUpgradedPkgs = val; 815 showUpgradedPkgs = val;
814 serverSelected( -1 ); 816 serverSelected( -1 );
815} 817}
816 818
817bool NetworkPackageManager :: filterByCategory( bool val ) 819bool NetworkPackageManager :: filterByCategory( bool val )
818{ 820{
819 if ( val ) 821 if ( val )
820 { 822 {
821 if ( categoryFilter == "" ) 823 if ( categoryFilter == "" )
822 { 824 {
823 if ( !setFilterCategory() ) 825 if ( !setFilterCategory() )
824 return false; 826 return false;
825 } 827 }
826 828
827 categoryFilterEnabled = true; 829 categoryFilterEnabled = true;
828 serverSelected( -1 ); 830 serverSelected( -1 );
829 return true; 831 return true;
830 } 832 }
831 else 833 else
832 { 834 {
833 // Turn off filter 835 // Turn off filter
834 categoryFilterEnabled = false; 836 categoryFilterEnabled = false;
835 serverSelected( -1 ); 837 serverSelected( -1 );
836 return false; 838 return false;
837 } 839 }
838} 840}
839 841
840bool NetworkPackageManager :: setFilterCategory( ) 842bool NetworkPackageManager :: setFilterCategory( )
841{ 843{
842 // Get categories; 844 // Get categories;
843 CategoryFilterImpl dlg( DataManager::getAvailableCategories(), categoryFilter, this ); 845 CategoryFilterImpl dlg( DataManager::getAvailableCategories(), categoryFilter, this );
844 if ( dlg.exec() == QDialog::Accepted ) 846 if ( dlg.exec() == QDialog::Accepted )
845 { 847 {
846 categoryFilter = dlg.getSelectedFilter(); 848 categoryFilter = dlg.getSelectedFilter();
847 849
848 if ( categoryFilter == "" ) 850 if ( categoryFilter == "" )
849 return false; 851 return false;
850 852
851 categoryFilterEnabled = true; 853 categoryFilterEnabled = true;
852 serverSelected( -1 ); 854 serverSelected( -1 );
853 return true; 855 return true;
854 } 856 }
855 857
856 return false; 858 return false;
857} 859}
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,124 +1,136 @@
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
59void Package :: setStatus( const QString &s ) 71void Package :: setStatus( const QString &s )
60{ 72{
61 status = s; 73 status = s;
62 74
63 if ( status.find( "installed" ) != -1 ) 75 if ( status.find( "installed" ) != -1 )
64 installed = true; 76 installed = true;
65} 77}
66 78
67void Package :: setLocalPackage( Package *p ) 79void Package :: setLocalPackage( Package *p )
68{ 80{
69 localPackage = p; 81 localPackage = p;
70 82
71 if ( localPackage ) 83 if ( localPackage )
72 if ( localPackage->getVersion() != getVersion() ) 84 if ( localPackage->getVersion() != getVersion() )
73 differentVersionAvailable = true; 85 differentVersionAvailable = true;
74 else 86 else
75 differentVersionAvailable = false; 87 differentVersionAvailable = false;
76} 88}
77 89
78void Package :: setVersion( const QString &v ) 90void Package :: setVersion( const QString &v )
79{ 91{
80 version = v; 92 version = v;
81 93
82 if ( localPackage ) 94 if ( localPackage )
83 if ( localPackage->getVersion() != getVersion() ) 95 if ( localPackage->getVersion() != getVersion() )
84 differentVersionAvailable = true; 96 differentVersionAvailable = true;
85 else 97 else
86 differentVersionAvailable = false; 98 differentVersionAvailable = false;
87} 99}
88 100
89void Package :: setPackageName( const QString &name ) 101void Package :: setPackageName( const QString &name )
90{ 102{
91 packageName = name; 103 packageName = name;
92} 104}
93 105
94void Package :: setDescription( const QString &d ) 106void Package :: setDescription( const QString &d )
95{ 107{
96 description = d; 108 description = d;
97} 109}
98 110
99void Package :: setFilename( const QString &f ) 111void Package :: setFilename( const QString &f )
100{ 112{
101 filename = f; 113 filename = f;
102} 114}
103 115
104 116
105QString Package :: getInstalledVersion() 117QString Package :: getInstalledVersion()
106{ 118{
107 if ( localPackage ) 119 if ( localPackage )
108 return localPackage->getVersion(); 120 return localPackage->getVersion();
109 else 121 else
110 return getVersion(); 122 return getVersion();
111} 123}
112 124
113QString Package :: getInstalledPackageName() 125QString Package :: getInstalledPackageName()
114{ 126{
115 if ( localPackage ) 127 if ( localPackage )
116 return localPackage->getPackageName(); 128 return localPackage->getPackageName();
117 else 129 else
118 return getPackageName(); 130 return getPackageName();
119} 131}
120 132
121bool Package :: isInstalled() 133bool Package :: isInstalled()
122{ 134{
123 return installed || ( localPackage && localPackage->isInstalled() ); 135 return installed || ( localPackage && localPackage->isInstalled() );
124} 136}
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
@@ -1,650 +1,650 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>SettingsBase</class> 2<class>SettingsBase</class>
3<widget> 3<widget>
4 <class>QDialog</class> 4 <class>QDialog</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>Settings</cstring> 7 <cstring>Settings</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>235</width> 14 <width>235</width>
15 <height>390</height> 15 <height>390</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Package Servers</string> 20 <string>Package Servers</string>
21 </property> 21 </property>
22 <property> 22 <property>
23 <name>layoutMargin</name> 23 <name>layoutMargin</name>
24 </property> 24 </property>
25 <property> 25 <property>
26 <name>layoutSpacing</name> 26 <name>layoutSpacing</name>
27 </property> 27 </property>
28 <grid> 28 <grid>
29 <property stdset="1"> 29 <property stdset="1">
30 <name>margin</name> 30 <name>margin</name>
31 <number>11</number> 31 <number>11</number>
32 </property> 32 </property>
33 <property stdset="1"> 33 <property stdset="1">
34 <name>spacing</name> 34 <name>spacing</name>
35 <number>6</number> 35 <number>6</number>
36 </property> 36 </property>
37 <widget row="0" column="0" > 37 <widget row="0" column="0" >
38 <class>QTabWidget</class> 38 <class>QTabWidget</class>
39 <property stdset="1"> 39 <property stdset="1">
40 <name>name</name> 40 <name>name</name>
41 <cstring>TabWidget</cstring> 41 <cstring>TabWidget</cstring>
42 </property> 42 </property>
43 <property stdset="1"> 43 <property stdset="1">
44 <name>enabled</name> 44 <name>enabled</name>
45 <bool>true</bool> 45 <bool>true</bool>
46 </property> 46 </property>
47 <property> 47 <property>
48 <name>layoutMargin</name> 48 <name>layoutMargin</name>
49 </property> 49 </property>
50 <property> 50 <property>
51 <name>layoutSpacing</name> 51 <name>layoutSpacing</name>
52 </property> 52 </property>
53 <widget> 53 <widget>
54 <class>QWidget</class> 54 <class>QWidget</class>
55 <property stdset="1"> 55 <property stdset="1">
56 <name>name</name> 56 <name>name</name>
57 <cstring>tab</cstring> 57 <cstring>tab</cstring>
58 </property> 58 </property>
59 <attribute> 59 <attribute>
60 <name>title</name> 60 <name>title</name>
61 <string>Servers</string> 61 <string>Servers</string>
62 </attribute> 62 </attribute>
63 <grid> 63 <grid>
64 <property stdset="1"> 64 <property stdset="1">
65 <name>margin</name> 65 <name>margin</name>
66 <number>11</number> 66 <number>11</number>
67 </property> 67 </property>
68 <property stdset="1"> 68 <property stdset="1">
69 <name>spacing</name> 69 <name>spacing</name>
70 <number>6</number> 70 <number>6</number>
71 </property> 71 </property>
72 <widget row="0" column="0" > 72 <widget row="0" column="0" >
73 <class>QLayoutWidget</class> 73 <class>QLayoutWidget</class>
74 <property stdset="1"> 74 <property stdset="1">
75 <name>name</name> 75 <name>name</name>
76 <cstring>Layout2</cstring> 76 <cstring>Layout2</cstring>
77 </property> 77 </property>
78 <hbox> 78 <hbox>
79 <property stdset="1"> 79 <property stdset="1">
80 <name>margin</name> 80 <name>margin</name>
81 <number>0</number> 81 <number>0</number>
82 </property> 82 </property>
83 <property stdset="1"> 83 <property stdset="1">
84 <name>spacing</name> 84 <name>spacing</name>
85 <number>6</number> 85 <number>6</number>
86 </property> 86 </property>
87 <widget> 87 <widget>
88 <class>QLabel</class> 88 <class>QLabel</class>
89 <property stdset="1"> 89 <property stdset="1">
90 <name>name</name> 90 <name>name</name>
91 <cstring>Servers</cstring> 91 <cstring>Servers</cstring>
92 </property> 92 </property>
93 <property stdset="1"> 93 <property stdset="1">
94 <name>text</name> 94 <name>text</name>
95 <string>Servers</string> 95 <string>Servers</string>
96 </property> 96 </property>
97 </widget> 97 </widget>
98 <spacer> 98 <spacer>
99 <property> 99 <property>
100 <name>name</name> 100 <name>name</name>
101 <cstring>Spacer2</cstring> 101 <cstring>Spacer2</cstring>
102 </property> 102 </property>
103 <property stdset="1"> 103 <property stdset="1">
104 <name>orientation</name> 104 <name>orientation</name>
105 <enum>Horizontal</enum> 105 <enum>Horizontal</enum>
106 </property> 106 </property>
107 <property stdset="1"> 107 <property stdset="1">
108 <name>sizeType</name> 108 <name>sizeType</name>
109 <enum>Expanding</enum> 109 <enum>Expanding</enum>
110 </property> 110 </property>
111 <property> 111 <property>
112 <name>sizeHint</name> 112 <name>sizeHint</name>
113 <size> 113 <size>
114 <width>20</width> 114 <width>20</width>
115 <height>20</height> 115 <height>20</height>
116 </size> 116 </size>
117 </property> 117 </property>
118 </spacer> 118 </spacer>
119 </hbox> 119 </hbox>
120 </widget> 120 </widget>
121 <widget row="1" column="0" > 121 <widget row="1" column="0" >
122 <class>QLayoutWidget</class> 122 <class>QLayoutWidget</class>
123 <property stdset="1"> 123 <property stdset="1">
124 <name>name</name> 124 <name>name</name>
125 <cstring>Layout8</cstring> 125 <cstring>Layout8</cstring>
126 </property> 126 </property>
127 <grid> 127 <grid>
128 <property stdset="1"> 128 <property stdset="1">
129 <name>margin</name> 129 <name>margin</name>
130 <number>0</number> 130 <number>0</number>
131 </property> 131 </property>
132 <property stdset="1"> 132 <property stdset="1">
133 <name>spacing</name> 133 <name>spacing</name>
134 <number>6</number> 134 <number>6</number>
135 </property> 135 </property>
136 <widget row="0" column="0" rowspan="1" colspan="2" > 136 <widget row="0" column="0" rowspan="1" colspan="2" >
137 <class>QListBox</class> 137 <class>QListBox</class>
138 <property stdset="1"> 138 <property stdset="1">
139 <name>name</name> 139 <name>name</name>
140 <cstring>servers</cstring> 140 <cstring>servers</cstring>
141 </property> 141 </property>
142 <property stdset="1"> 142 <property stdset="1">
143 <name>selectionMode</name> 143 <name>selectionMode</name>
144 <enum>Extended</enum> 144 <enum>Extended</enum>
145 </property> 145 </property>
146 </widget> 146 </widget>
147 <widget row="2" column="0" rowspan="1" colspan="2" > 147 <widget row="2" column="0" rowspan="1" colspan="2" >
148 <class>QLayoutWidget</class> 148 <class>QLayoutWidget</class>
149 <property stdset="1"> 149 <property stdset="1">
150 <name>name</name> 150 <name>name</name>
151 <cstring>Layout6</cstring> 151 <cstring>Layout6</cstring>
152 </property> 152 </property>
153 <grid> 153 <grid>
154 <property stdset="1"> 154 <property stdset="1">
155 <name>margin</name> 155 <name>margin</name>
156 <number>0</number> 156 <number>0</number>
157 </property> 157 </property>
158 <property stdset="1"> 158 <property stdset="1">
159 <name>spacing</name> 159 <name>spacing</name>
160 <number>6</number> 160 <number>6</number>
161 </property> 161 </property>
162 <widget row="2" column="1" > 162 <widget row="2" column="1" >
163 <class>QCheckBox</class> 163 <class>QCheckBox</class>
164 <property stdset="1"> 164 <property stdset="1">
165 <name>name</name> 165 <name>name</name>
166 <cstring>active</cstring> 166 <cstring>active</cstring>
167 </property> 167 </property>
168 <property stdset="1"> 168 <property stdset="1">
169 <name>text</name> 169 <name>text</name>
170 <string>Active Server</string> 170 <string>Active Server</string>
171 </property> 171 </property>
172 </widget> 172 </widget>
173 <widget row="0" column="0" > 173 <widget row="0" column="0" >
174 <class>QLabel</class> 174 <class>QLabel</class>
175 <property stdset="1"> 175 <property stdset="1">
176 <name>name</name> 176 <name>name</name>
177 <cstring>TextLabel1_3</cstring> 177 <cstring>TextLabel1_3</cstring>
178 </property> 178 </property>
179 <property stdset="1"> 179 <property stdset="1">
180 <name>text</name> 180 <name>text</name>
181 <string>Name:</string> 181 <string>Name:</string>
182 </property> 182 </property>
183 </widget> 183 </widget>
184 <widget row="1" column="0" > 184 <widget row="1" column="0" >
185 <class>QLabel</class> 185 <class>QLabel</class>
186 <property stdset="1"> 186 <property stdset="1">
187 <name>name</name> 187 <name>name</name>
188 <cstring>TextLabel2_3</cstring> 188 <cstring>TextLabel2_3</cstring>
189 </property> 189 </property>
190 <property stdset="1"> 190 <property stdset="1">
191 <name>text</name> 191 <name>text</name>
192 <string>URL:</string> 192 <string>URL:</string>
193 </property> 193 </property>
194 </widget> 194 </widget>
195 <widget row="0" column="1" > 195 <widget row="0" column="1" >
196 <class>QLineEdit</class> 196 <class>QLineEdit</class>
197 <property stdset="1"> 197 <property stdset="1">
198 <name>name</name> 198 <name>name</name>
199 <cstring>servername</cstring> 199 <cstring>servername</cstring>
200 </property> 200 </property>
201 </widget> 201 </widget>
202 <widget row="1" column="1" > 202 <widget row="1" column="1" >
203 <class>QLineEdit</class> 203 <class>QLineEdit</class>
204 <property stdset="1"> 204 <property stdset="1">
205 <name>name</name> 205 <name>name</name>
206 <cstring>serverurl</cstring> 206 <cstring>serverurl</cstring>
207 </property> 207 </property>
208 </widget> 208 </widget>
209 <widget row="3" column="1" > 209 <widget row="3" column="1" >
210 <class>QPushButton</class> 210 <class>QPushButton</class>
211 <property stdset="1"> 211 <property stdset="1">
212 <name>name</name> 212 <name>name</name>
213 <cstring>btnChangeServer</cstring> 213 <cstring>btnChangeServer</cstring>
214 </property> 214 </property>
215 <property stdset="1"> 215 <property stdset="1">
216 <name>text</name> 216 <name>text</name>
217 <string>Change</string> 217 <string>Change</string>
218 </property> 218 </property>
219 </widget> 219 </widget>
220 </grid> 220 </grid>
221 </widget> 221 </widget>
222 <widget row="1" column="1" > 222 <widget row="1" column="1" >
223 <class>QPushButton</class> 223 <class>QPushButton</class>
224 <property stdset="1"> 224 <property stdset="1">
225 <name>name</name> 225 <name>name</name>
226 <cstring>removeserver</cstring> 226 <cstring>removeserver</cstring>
227 </property> 227 </property>
228 <property stdset="1"> 228 <property stdset="1">
229 <name>enabled</name> 229 <name>enabled</name>
230 <bool>true</bool> 230 <bool>true</bool>
231 </property> 231 </property>
232 <property stdset="1"> 232 <property stdset="1">
233 <name>text</name> 233 <name>text</name>
234 <string>Remove</string> 234 <string>Remove</string>
235 </property> 235 </property>
236 <property stdset="1"> 236 <property stdset="1">
237 <name>autoDefault</name> 237 <name>autoDefault</name>
238 <bool>false</bool> 238 <bool>false</bool>
239 </property> 239 </property>
240 </widget> 240 </widget>
241 <widget row="1" column="0" > 241 <widget row="1" column="0" >
242 <class>QPushButton</class> 242 <class>QPushButton</class>
243 <property stdset="1"> 243 <property stdset="1">
244 <name>name</name> 244 <name>name</name>
245 <cstring>newserver</cstring> 245 <cstring>newserver</cstring>
246 </property> 246 </property>
247 <property stdset="1"> 247 <property stdset="1">
248 <name>enabled</name> 248 <name>enabled</name>
249 <bool>true</bool> 249 <bool>true</bool>
250 </property> 250 </property>
251 <property stdset="1"> 251 <property stdset="1">
252 <name>text</name> 252 <name>text</name>
253 <string>New</string> 253 <string>New</string>
254 </property> 254 </property>
255 <property stdset="1"> 255 <property stdset="1">
256 <name>autoDefault</name> 256 <name>autoDefault</name>
257 <bool>false</bool> 257 <bool>false</bool>
258 </property> 258 </property>
259 </widget> 259 </widget>
260 </grid> 260 </grid>
261 </widget> 261 </widget>
262 </grid> 262 </grid>
263 </widget> 263 </widget>
264 <widget> 264 <widget>
265 <class>QWidget</class> 265 <class>QWidget</class>
266 <property stdset="1"> 266 <property stdset="1">
267 <name>name</name> 267 <name>name</name>
268 <cstring>tab</cstring> 268 <cstring>tab</cstring>
269 </property> 269 </property>
270 <attribute> 270 <attribute>
271 <name>title</name> 271 <name>title</name>
272 <string>Destinations</string> 272 <string>Destinations</string>
273 </attribute> 273 </attribute>
274 <grid> 274 <grid>
275 <property stdset="1"> 275 <property stdset="1">
276 <name>margin</name> 276 <name>margin</name>
277 <number>11</number> 277 <number>11</number>
278 </property> 278 </property>
279 <property stdset="1"> 279 <property stdset="1">
280 <name>spacing</name> 280 <name>spacing</name>
281 <number>6</number> 281 <number>6</number>
282 </property> 282 </property>
283 <widget row="0" column="0" > 283 <widget row="0" column="0" >
284 <class>QLayoutWidget</class> 284 <class>QLayoutWidget</class>
285 <property stdset="1"> 285 <property stdset="1">
286 <name>name</name> 286 <name>name</name>
287 <cstring>Layout3</cstring> 287 <cstring>Layout3</cstring>
288 </property> 288 </property>
289 <hbox> 289 <hbox>
290 <property stdset="1"> 290 <property stdset="1">
291 <name>margin</name> 291 <name>margin</name>
292 <number>0</number> 292 <number>0</number>
293 </property> 293 </property>
294 <property stdset="1"> 294 <property stdset="1">
295 <name>spacing</name> 295 <name>spacing</name>
296 <number>6</number> 296 <number>6</number>
297 </property> 297 </property>
298 <widget> 298 <widget>
299 <class>QLabel</class> 299 <class>QLabel</class>
300 <property stdset="1"> 300 <property stdset="1">
301 <name>name</name> 301 <name>name</name>
302 <cstring>Destinations</cstring> 302 <cstring>Destinations</cstring>
303 </property> 303 </property>
304 <property stdset="1"> 304 <property stdset="1">
305 <name>text</name> 305 <name>text</name>
306 <string>Destinations</string> 306 <string>Destinations</string>
307 </property> 307 </property>
308 </widget> 308 </widget>
309 <spacer> 309 <spacer>
310 <property> 310 <property>
311 <name>name</name> 311 <name>name</name>
312 <cstring>Spacer2_2</cstring> 312 <cstring>Spacer2_2</cstring>
313 </property> 313 </property>
314 <property stdset="1"> 314 <property stdset="1">
315 <name>orientation</name> 315 <name>orientation</name>
316 <enum>Horizontal</enum> 316 <enum>Horizontal</enum>
317 </property> 317 </property>
318 <property stdset="1"> 318 <property stdset="1">
319 <name>sizeType</name> 319 <name>sizeType</name>
320 <enum>Expanding</enum> 320 <enum>Expanding</enum>
321 </property> 321 </property>
322 <property> 322 <property>
323 <name>sizeHint</name> 323 <name>sizeHint</name>
324 <size> 324 <size>
325 <width>20</width> 325 <width>20</width>
326 <height>20</height> 326 <height>20</height>
327 </size> 327 </size>
328 </property> 328 </property>
329 </spacer> 329 </spacer>
330 </hbox> 330 </hbox>
331 </widget> 331 </widget>
332 <widget row="2" column="0" > 332 <widget row="2" column="0" >
333 <class>QLayoutWidget</class> 333 <class>QLayoutWidget</class>
334 <property stdset="1"> 334 <property stdset="1">
335 <name>name</name> 335 <name>name</name>
336 <cstring>Layout5</cstring> 336 <cstring>Layout5</cstring>
337 </property> 337 </property>
338 <hbox> 338 <hbox>
339 <property stdset="1"> 339 <property stdset="1">
340 <name>margin</name> 340 <name>margin</name>
341 <number>0</number> 341 <number>0</number>
342 </property> 342 </property>
343 <property stdset="1"> 343 <property stdset="1">
344 <name>spacing</name> 344 <name>spacing</name>
345 <number>6</number> 345 <number>6</number>
346 </property> 346 </property>
347 <widget> 347 <widget>
348 <class>QPushButton</class> 348 <class>QPushButton</class>
349 <property stdset="1"> 349 <property stdset="1">
350 <name>name</name> 350 <name>name</name>
351 <cstring>newdestination</cstring> 351 <cstring>newdestination</cstring>
352 </property> 352 </property>
353 <property stdset="1"> 353 <property stdset="1">
354 <name>enabled</name> 354 <name>enabled</name>
355 <bool>true</bool> 355 <bool>true</bool>
356 </property> 356 </property>
357 <property stdset="1"> 357 <property stdset="1">
358 <name>text</name> 358 <name>text</name>
359 <string>New</string> 359 <string>New</string>
360 </property> 360 </property>
361 <property stdset="1"> 361 <property stdset="1">
362 <name>autoDefault</name> 362 <name>autoDefault</name>
363 <bool>false</bool> 363 <bool>false</bool>
364 </property> 364 </property>
365 </widget> 365 </widget>
366 <widget> 366 <widget>
367 <class>QPushButton</class> 367 <class>QPushButton</class>
368 <property stdset="1"> 368 <property stdset="1">
369 <name>name</name> 369 <name>name</name>
370 <cstring>removedestination</cstring> 370 <cstring>removedestination</cstring>
371 </property> 371 </property>
372 <property stdset="1"> 372 <property stdset="1">
373 <name>enabled</name> 373 <name>enabled</name>
374 <bool>true</bool> 374 <bool>true</bool>
375 </property> 375 </property>
376 <property stdset="1"> 376 <property stdset="1">
377 <name>text</name> 377 <name>text</name>
378 <string>Remove</string> 378 <string>Remove</string>
379 </property> 379 </property>
380 <property stdset="1"> 380 <property stdset="1">
381 <name>autoDefault</name> 381 <name>autoDefault</name>
382 <bool>false</bool> 382 <bool>false</bool>
383 </property> 383 </property>
384 </widget> 384 </widget>
385 </hbox> 385 </hbox>
386 </widget> 386 </widget>
387 <spacer row="0" column="0" > 387 <spacer row="0" column="0" >
388 <property> 388 <property>
389 <name>name</name> 389 <name>name</name>
390 <cstring>Spacer3</cstring> 390 <cstring>Spacer3</cstring>
391 </property> 391 </property>
392 <property stdset="1"> 392 <property stdset="1">
393 <name>orientation</name> 393 <name>orientation</name>
394 <enum>Horizontal</enum> 394 <enum>Horizontal</enum>
395 </property> 395 </property>
396 <property stdset="1"> 396 <property stdset="1">
397 <name>sizeType</name> 397 <name>sizeType</name>
398 <enum>Expanding</enum> 398 <enum>Expanding</enum>
399 </property> 399 </property>
400 <property> 400 <property>
401 <name>sizeHint</name> 401 <name>sizeHint</name>
402 <size> 402 <size>
403 <width>20</width> 403 <width>20</width>
404 <height>20</height> 404 <height>20</height>
405 </size> 405 </size>
406 </property> 406 </property>
407 </spacer> 407 </spacer>
408 <widget row="1" column="0" > 408 <widget row="1" column="0" >
409 <class>QListBox</class> 409 <class>QListBox</class>
410 <property stdset="1"> 410 <property stdset="1">
411 <name>name</name> 411 <name>name</name>
412 <cstring>destinations</cstring> 412 <cstring>destinations</cstring>
413 </property> 413 </property>
414 <property stdset="1"> 414 <property stdset="1">
415 <name>selectionMode</name> 415 <name>selectionMode</name>
416 <enum>Single</enum> 416 <enum>Single</enum>
417 </property> 417 </property>
418 </widget> 418 </widget>
419 <widget row="3" column="0" > 419 <widget row="3" column="0" >
420 <class>QLayoutWidget</class> 420 <class>QLayoutWidget</class>
421 <property stdset="1"> 421 <property stdset="1">
422 <name>name</name> 422 <name>name</name>
423 <cstring>Layout13</cstring> 423 <cstring>Layout13</cstring>
424 </property> 424 </property>
425 <grid> 425 <grid>
426 <property stdset="1"> 426 <property stdset="1">
427 <name>margin</name> 427 <name>margin</name>
428 <number>0</number> 428 <number>0</number>
429 </property> 429 </property>
430 <property stdset="1"> 430 <property stdset="1">
431 <name>spacing</name> 431 <name>spacing</name>
432 <number>6</number> 432 <number>6</number>
433 </property> 433 </property>
434 <widget row="1" column="0" > 434 <widget row="1" column="0" >
435 <class>QLabel</class> 435 <class>QLabel</class>
436 <property stdset="1"> 436 <property stdset="1">
437 <name>name</name> 437 <name>name</name>
438 <cstring>TextLabel1_3_2_2</cstring> 438 <cstring>TextLabel1_3_2_2</cstring>
439 </property> 439 </property>
440 <property stdset="1"> 440 <property stdset="1">
441 <name>text</name> 441 <name>text</name>
442 <string>URL:</string> 442 <string>URL:</string>
443 </property> 443 </property>
444 </widget> 444 </widget>
445 <widget row="3" column="1" > 445 <widget row="3" column="1" >
446 <class>QPushButton</class> 446 <class>QPushButton</class>
447 <property stdset="1"> 447 <property stdset="1">
448 <name>name</name> 448 <name>name</name>
449 <cstring>btnChangeDest</cstring> 449 <cstring>btnChangeDest</cstring>
450 </property> 450 </property>
451 <property stdset="1"> 451 <property stdset="1">
452 <name>text</name> 452 <name>text</name>
453 <string>Change</string> 453 <string>Change</string>
454 </property> 454 </property>
455 </widget> 455 </widget>
456 <widget row="0" column="1" > 456 <widget row="0" column="1" >
457 <class>QLineEdit</class> 457 <class>QLineEdit</class>
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>
507 <name>title</name> 507 <name>title</name>
508 <string>General</string> 508 <string>General</string>
509 </attribute> 509 </attribute>
510 <widget> 510 <widget>
511 <class>QLabel</class> 511 <class>QLabel</class>
512 <property stdset="1"> 512 <property stdset="1">
513 <name>name</name> 513 <name>name</name>
514 <cstring>TextLabel1</cstring> 514 <cstring>TextLabel1</cstring>
515 </property> 515 </property>
516 <property stdset="1"> 516 <property stdset="1">
517 <name>geometry</name> 517 <name>geometry</name>
518 <rect> 518 <rect>
519 <x>20</x> 519 <x>20</x>
520 <y>30</y> 520 <y>30</y>
521 <width>150</width> 521 <width>150</width>
522 <height>20</height> 522 <height>20</height>
523 </rect> 523 </rect>
524 </property> 524 </property>
525 <property stdset="1"> 525 <property stdset="1">
526 <name>text</name> 526 <name>text</name>
527 <string>(Will take effect on restart)</string> 527 <string>(Will take effect on restart)</string>
528 </property> 528 </property>
529 </widget> 529 </widget>
530 <widget> 530 <widget>
531 <class>QCheckBox</class> 531 <class>QCheckBox</class>
532 <property stdset="1"> 532 <property stdset="1">
533 <name>name</name> 533 <name>name</name>
534 <cstring>jumpTo</cstring> 534 <cstring>jumpTo</cstring>
535 </property> 535 </property>
536 <property stdset="1"> 536 <property stdset="1">
537 <name>geometry</name> 537 <name>geometry</name>
538 <rect> 538 <rect>
539 <x>17</x> 539 <x>17</x>
540 <y>14</y> 540 <y>14</y>
541 <width>150</width> 541 <width>150</width>
542 <height>20</height> 542 <height>20</height>
543 </rect> 543 </rect>
544 </property> 544 </property>
545 <property stdset="1"> 545 <property stdset="1">
546 <name>text</name> 546 <name>text</name>
547 <string>Show Jump To Letters</string> 547 <string>Show Jump To Letters</string>
548 </property> 548 </property>
549 </widget> 549 </widget>
550 </widget> 550 </widget>
551 </widget> 551 </widget>
552 </grid> 552 </grid>
553</widget> 553</widget>
554<connections> 554<connections>
555 <connection> 555 <connection>
556 <sender>newserver</sender> 556 <sender>newserver</sender>
557 <signal>clicked()</signal> 557 <signal>clicked()</signal>
558 <receiver>Settings</receiver> 558 <receiver>Settings</receiver>
559 <slot>newServer()</slot> 559 <slot>newServer()</slot>
560 </connection> 560 </connection>
561 <connection> 561 <connection>
562 <sender>removeserver</sender> 562 <sender>removeserver</sender>
563 <signal>clicked()</signal> 563 <signal>clicked()</signal>
564 <receiver>Settings</receiver> 564 <receiver>Settings</receiver>
565 <slot>removeServer()</slot> 565 <slot>removeServer()</slot>
566 </connection> 566 </connection>
567 <connection> 567 <connection>
568 <sender>newdestination</sender> 568 <sender>newdestination</sender>
569 <signal>clicked()</signal> 569 <signal>clicked()</signal>
570 <receiver>Settings</receiver> 570 <receiver>Settings</receiver>
571 <slot>newDestination()</slot> 571 <slot>newDestination()</slot>
572 </connection> 572 </connection>
573 <connection> 573 <connection>
574 <sender>removedestination</sender> 574 <sender>removedestination</sender>
575 <signal>clicked()</signal> 575 <signal>clicked()</signal>
576 <receiver>Settings</receiver> 576 <receiver>Settings</receiver>
577 <slot>removeDestination()</slot> 577 <slot>removeDestination()</slot>
578 </connection> 578 </connection>
579 <connection> 579 <connection>
580 <sender>servers</sender> 580 <sender>servers</sender>
581 <signal>highlighted(int)</signal> 581 <signal>highlighted(int)</signal>
582 <receiver>Settings</receiver> 582 <receiver>Settings</receiver>
583 <slot>editServer(int)</slot> 583 <slot>editServer(int)</slot>
584 </connection> 584 </connection>
585 <connection> 585 <connection>
586 <sender>destinations</sender> 586 <sender>destinations</sender>
587 <signal>highlighted(int)</signal> 587 <signal>highlighted(int)</signal>
588 <receiver>Settings</receiver> 588 <receiver>Settings</receiver>
589 <slot>editDestination(int)</slot> 589 <slot>editDestination(int)</slot>
590 </connection> 590 </connection>
591 <connection> 591 <connection>
592 <sender>btnChangeServer</sender> 592 <sender>btnChangeServer</sender>
593 <signal>clicked()</signal> 593 <signal>clicked()</signal>
594 <receiver>Settings</receiver> 594 <receiver>Settings</receiver>
595 <slot>changeServerDetails()</slot> 595 <slot>changeServerDetails()</slot>
596 </connection> 596 </connection>
597 <connection> 597 <connection>
598 <sender>btnChangeDest</sender> 598 <sender>btnChangeDest</sender>
599 <signal>clicked()</signal> 599 <signal>clicked()</signal>
600 <receiver>Settings</receiver> 600 <receiver>Settings</receiver>
601 <slot>changeDestinationDetails()</slot> 601 <slot>changeDestinationDetails()</slot>
602 </connection> 602 </connection>
603 <connection> 603 <connection>
604 <sender>jumpTo</sender> 604 <sender>jumpTo</sender>
605 <signal>toggled(bool)</signal> 605 <signal>toggled(bool)</signal>
606 <receiver>Settings</receiver> 606 <receiver>Settings</receiver>
607 <slot>toggleJumpTo(bool)</slot> 607 <slot>toggleJumpTo(bool)</slot>
608 </connection> 608 </connection>
609 <slot access="public">activeServerChanged()</slot> 609 <slot access="public">activeServerChanged()</slot>
610 <slot access="public">changeDestinationDetails()</slot> 610 <slot access="public">changeDestinationDetails()</slot>
611 <slot access="public">changeServerDetails()</slot> 611 <slot access="public">changeServerDetails()</slot>
612 <slot access="public">createLinksToDest()</slot> 612 <slot access="public">createLinksToDest()</slot>
613 <slot access="public">destNameChanged(const QString&amp;)</slot> 613 <slot access="public">destNameChanged(const QString&amp;)</slot>
614 <slot access="public">destUrlChanged(const QString&amp;)</slot> 614 <slot access="public">destUrlChanged(const QString&amp;)</slot>
615 <slot access="public">editDestination(int)</slot> 615 <slot access="public">editDestination(int)</slot>
616 <slot access="public">editServer(int)</slot> 616 <slot access="public">editServer(int)</slot>
617 <slot access="public">installationSettingChange(int)</slot> 617 <slot access="public">installationSettingChange(int)</slot>
618 <slot access="public">installationSettingSetName(const QString &amp;)</slot> 618 <slot access="public">installationSettingSetName(const QString &amp;)</slot>
619 <slot access="public">linkEnabled(bool)</slot> 619 <slot access="public">linkEnabled(bool)</slot>
620 <slot access="public">newDestination()</slot> 620 <slot access="public">newDestination()</slot>
621 <slot access="public">newInstallationSetting()</slot> 621 <slot access="public">newInstallationSetting()</slot>
622 <slot access="public">newServer()</slot> 622 <slot access="public">newServer()</slot>
623 <slot access="public">removeDestination()</slot> 623 <slot access="public">removeDestination()</slot>
624 <slot access="public">removeInstallationSetting()</slot> 624 <slot access="public">removeInstallationSetting()</slot>
625 <slot access="public">removeLinksToDest()</slot> 625 <slot access="public">removeLinksToDest()</slot>
626 <slot access="public">removeServer()</slot> 626 <slot access="public">removeServer()</slot>
627 <slot access="public">renameInstallationSetting()</slot> 627 <slot access="public">renameInstallationSetting()</slot>
628 <slot access="public">serverNameChanged(const QString&amp;)</slot> 628 <slot access="public">serverNameChanged(const QString&amp;)</slot>
629 <slot access="public">serverUrlChanged(const QString&amp;)</slot> 629 <slot access="public">serverUrlChanged(const QString&amp;)</slot>
630 <slot access="public">toggleJumpTo(bool)</slot> 630 <slot access="public">toggleJumpTo(bool)</slot>
631</connections> 631</connections>
632<tabstops> 632<tabstops>
633 <tabstop>servers</tabstop> 633 <tabstop>servers</tabstop>
634 <tabstop>newserver</tabstop> 634 <tabstop>newserver</tabstop>
635 <tabstop>removeserver</tabstop> 635 <tabstop>removeserver</tabstop>
636 <tabstop>servername</tabstop> 636 <tabstop>servername</tabstop>
637 <tabstop>serverurl</tabstop> 637 <tabstop>serverurl</tabstop>
638 <tabstop>active</tabstop> 638 <tabstop>active</tabstop>
639 <tabstop>btnChangeServer</tabstop> 639 <tabstop>btnChangeServer</tabstop>
640 <tabstop>TabWidget</tabstop> 640 <tabstop>TabWidget</tabstop>
641 <tabstop>destinations</tabstop> 641 <tabstop>destinations</tabstop>
642 <tabstop>newdestination</tabstop> 642 <tabstop>newdestination</tabstop>
643 <tabstop>removedestination</tabstop> 643 <tabstop>removedestination</tabstop>
644 <tabstop>destinationname</tabstop> 644 <tabstop>destinationname</tabstop>
645 <tabstop>destinationurl</tabstop> 645 <tabstop>destinationurl</tabstop>
646 <tabstop>linkToRoot</tabstop> 646 <tabstop>linkToRoot</tabstop>
647 <tabstop>btnChangeDest</tabstop> 647 <tabstop>btnChangeDest</tabstop>
648 <tabstop>jumpTo</tabstop> 648 <tabstop>jumpTo</tabstop>
649</tabstops> 649</tabstops>
650</UI> 650</UI>