author | tille <tille> | 2002-04-23 11:16:45 (UTC) |
---|---|---|
committer | tille <tille> | 2002-04-23 11:16:45 (UTC) |
commit | a3205d9bf5570af8441ed81cd6d9eeadf22319c9 (patch) (unidiff) | |
tree | e2403e5dcc46906570cb070b852ee83d9a8af0b8 /noncore/unsupported/oipkg/pksettings.cpp | |
parent | 7e8db7f310d7a43326337a7960e59d9e313b8534 (diff) | |
download | opie-a3205d9bf5570af8441ed81cd6d9eeadf22319c9.zip opie-a3205d9bf5570af8441ed81cd6d9eeadf22319c9.tar.gz opie-a3205d9bf5570af8441ed81cd6d9eeadf22319c9.tar.bz2 |
... mostly rewritten.
Diffstat (limited to 'noncore/unsupported/oipkg/pksettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/pksettings.cpp | 487 |
1 files changed, 487 insertions, 0 deletions
diff --git a/noncore/unsupported/oipkg/pksettings.cpp b/noncore/unsupported/oipkg/pksettings.cpp new file mode 100644 index 0000000..32224b5 --- a/dev/null +++ b/noncore/unsupported/oipkg/pksettings.cpp | |||
@@ -0,0 +1,487 @@ | |||
1 | #include "pksettings.h" | ||
2 | |||
3 | #include <qpe/process.h> | ||
4 | #include <qpe/resource.h> | ||
5 | #include <qpe/stringutil.h> | ||
6 | #include <qpe/qpeapplication.h> | ||
7 | #include <qpe/qcopenvelope_qws.h> | ||
8 | #include <qpe/applnk.h> | ||
9 | #include <qpe/config.h> | ||
10 | |||
11 | #include <qprogressbar.h> | ||
12 | #include <qcombobox.h> | ||
13 | #include <qdict.h> | ||
14 | #include <qfile.h> | ||
15 | #include <qlineedit.h> | ||
16 | #include <qpushbutton.h> | ||
17 | #include <qlistview.h> | ||
18 | #include <qlistbox.h> | ||
19 | #include <qcheckbox.h> | ||
20 | #include <qmessagebox.h> | ||
21 | #include <qpainter.h> | ||
22 | #include <qpixmap.h> | ||
23 | #include <qregexp.h> | ||
24 | #include <qstring.h> | ||
25 | #include <qobject.h> | ||
26 | #include <qtextstream.h> | ||
27 | #include <qtextview.h> | ||
28 | #include <qtoolbutton.h> | ||
29 | #include <qtabwidget.h> | ||
30 | |||
31 | #include <stdlib.h> | ||
32 | #include <unistd.h> | ||
33 | #include "debug.h" | ||
34 | |||
35 | PackageManagerSettings::PackageManagerSettings( QWidget* parent, const char* name, WFlags fl ) | ||
36 | : PackageManagerSettingsBase( parent, name, fl ) | ||
37 | { | ||
38 | connect( newserver, SIGNAL(clicked()), this, SLOT(newServer()) ); | ||
39 | connect( removeserver, SIGNAL(clicked()), this, SLOT(removeServer()) ); | ||
40 | connect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); | ||
41 | connect( newdestination, SIGNAL(clicked()), this, SLOT(newDestination()) ); | ||
42 | connect( removedestination, SIGNAL(clicked()), this, SLOT(removeDestination()) ); | ||
43 | connect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); | ||
44 | // connect( CheckBoxLink, SIGNAL(toggled(bool)), | ||
45 | // activeLinkDestination, SLOT(setEnabled(bool)) ); | ||
46 | |||
47 | connect( settingName, SIGNAL(activated(int)), this, SLOT(installationSettingChange(int)) ); | ||
48 | connect( settingName, SIGNAL(textChanged(const QString &)), this, SLOT(installationSettingSetName(const QString &)) ); | ||
49 | connect( newsetting, SIGNAL(clicked()), this, SLOT(newInstallationSetting()) ); | ||
50 | connect( renamesetting, SIGNAL(clicked()), this, SLOT(renameInstallationSetting()) ); | ||
51 | connect( removesetting, SIGNAL(clicked()), this, SLOT(removeInstallationSetting()) ); | ||
52 | servername->setEnabled(FALSE); | ||
53 | serverurl->setEnabled(FALSE); | ||
54 | serverurlDic.setAutoDelete(TRUE); | ||
55 | destinationname->setEnabled(FALSE); | ||
56 | destinationurl->setEnabled(FALSE); | ||
57 | destinationurlDic.setAutoDelete(TRUE); | ||
58 | readSettings(); | ||
59 | } | ||
60 | |||
61 | PackageManagerSettings::~PackageManagerSettings() | ||
62 | { | ||
63 | } | ||
64 | |||
65 | |||
66 | void PackageManagerSettings::newServer() | ||
67 | { | ||
68 | int i = servers->count(); | ||
69 | if ( servername->isEnabled() || serverurl->text().isEmpty() ) { | ||
70 | serverurlDic.insert(i,new QString("http://")); | ||
71 | servers->insertItem(tr("New")); | ||
72 | activeServers->insertItem(tr("New")); | ||
73 | } else { | ||
74 | // allows one-level undo | ||
75 | serverurlDic.insert(i,new QString(serverurl->text())); | ||
76 | servers->insertItem(servername->text()); | ||
77 | activeServers->insertItem(servername->text()); | ||
78 | } | ||
79 | servers->setSelected(i,TRUE); | ||
80 | editServer(i); | ||
81 | } | ||
82 | |||
83 | void PackageManagerSettings::newDestination() | ||
84 | { | ||
85 | int i = destinations->count(); | ||
86 | if ( destinationname->isEnabled() || destinationurl->text().isEmpty() ) { | ||
87 | destinationurlDic.insert(i,new QString("/")); | ||
88 | destinations->insertItem(tr("New")); | ||
89 | activeDestination->insertItem(tr("New")); | ||
90 | activeLinkDestination->insertItem(tr("New")); | ||
91 | } else { | ||
92 | // allows one-level undo | ||
93 | destinationurlDic.insert(i,new QString(destinationurl->text())); | ||
94 | destinations->insertItem(destinationname->text()); | ||
95 | activeDestination->insertItem(destinationname->text()); | ||
96 | activeLinkDestination->insertItem(destinationname->text()); | ||
97 | } | ||
98 | destinations->setSelected(i,TRUE); | ||
99 | editDestination(i); | ||
100 | } | ||
101 | |||
102 | |||
103 | void PackageManagerSettings::editServer(int i) | ||
104 | { | ||
105 | if ( servername->isEnabled() ) { | ||
106 | disconnect( servername, SIGNAL(textChanged(const QString&)), this, SLOT(serverNameChanged(const QString&)) ); | ||
107 | disconnect( serverurl, SIGNAL(textChanged(const QString&)), this, SLOT(serverUrlChanged(const QString&)) ); | ||
108 | } else { | ||
109 | servername->setEnabled(TRUE); | ||
110 | serverurl->setEnabled(TRUE); | ||
111 | } | ||
112 | |||
113 | servername->setText( servers->text(i) ); | ||
114 | serverurl->setText( *serverurlDic[i] ); | ||
115 | |||
116 | editedserver = i; | ||
117 | |||
118 | connect( servername, SIGNAL(textChanged(const QString&)), this, SLOT(serverNameChanged(const QString&)) ); | ||
119 | connect( serverurl, SIGNAL(textChanged(const QString&)), this, SLOT(serverUrlChanged(const QString&)) ); | ||
120 | } | ||
121 | |||
122 | |||
123 | void PackageManagerSettings::editDestination(int i) | ||
124 | { | ||
125 | if ( destinationname->isEnabled() ) { | ||
126 | disconnect( destinationname, SIGNAL(textChanged(const QString&)), this, SLOT(destNameChanged(const QString&)) ); | ||
127 | disconnect( destinationurl, SIGNAL(textChanged(const QString&)), this, SLOT(destUrlChanged(const QString&)) ); | ||
128 | } else { | ||
129 | destinationname->setEnabled(TRUE); | ||
130 | destinationurl->setEnabled(TRUE); | ||
131 | } | ||
132 | |||
133 | destinationname->setText( destinations->text(i) ); | ||
134 | destinationurl->setText( *destinationurlDic[i] ); | ||
135 | |||
136 | editeddestination = i; | ||
137 | |||
138 | connect( destinationname, SIGNAL(textChanged(const QString&)), this, SLOT(destNameChanged(const QString&)) ); | ||
139 | connect( destinationurl, SIGNAL(textChanged(const QString&)), this, SLOT(destUrlChanged(const QString&)) ); | ||
140 | } | ||
141 | |||
142 | void PackageManagerSettings::removeServer() | ||
143 | { | ||
144 | disconnect( servername, SIGNAL(textChanged(const QString&)), this, SLOT(serverNameChanged(const QString&)) ); | ||
145 | disconnect( serverurl, SIGNAL(textChanged(const QString&)), this, SLOT(serverUrlChanged(const QString&)) ); | ||
146 | servername->setText(servers->text(editedserver)); | ||
147 | serverurl->setText(*serverurlDic[editedserver]); | ||
148 | disconnect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); | ||
149 | servers->removeItem(editedserver); | ||
150 | activeServers->removeItem(editedserver); | ||
151 | connect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); | ||
152 | servername->setEnabled(FALSE); | ||
153 | serverurl->setEnabled(FALSE); | ||
154 | } | ||
155 | |||
156 | void PackageManagerSettings::removeDestination() | ||
157 | { | ||
158 | disconnect( destinationname, SIGNAL(textChanged(const QString&)), this, SLOT(destNameChanged(const QString&)) ); | ||
159 | disconnect( destinationurl, SIGNAL(textChanged(const QString&)), this, SLOT(destUrlChanged(const QString&)) ); | ||
160 | destinationname->setText(destinations->text(editedserver)); | ||
161 | destinationurl->setText(*destinationurlDic[editedserver]); | ||
162 | disconnect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); | ||
163 | destinations->removeItem(editeddestination); | ||
164 | activeDestination->removeItem(editeddestination); | ||
165 | activeLinkDestination->removeItem(editeddestination); | ||
166 | connect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); | ||
167 | destinationname->setEnabled(FALSE); | ||
168 | destinationurl->setEnabled(FALSE); | ||
169 | } | ||
170 | |||
171 | void PackageManagerSettings::serverNameChanged(const QString& t) | ||
172 | { | ||
173 | disconnect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); | ||
174 | servers->changeItem( t, editedserver ); | ||
175 | activeServers->changeItem( t, editedserver ); | ||
176 | connect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); | ||
177 | } | ||
178 | |||
179 | void PackageManagerSettings::destNameChanged(const QString& t) | ||
180 | { | ||
181 | disconnect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); | ||
182 | destinations->changeItem( t, editeddestination ); | ||
183 | activeDestination->changeItem( t, editeddestination ); | ||
184 | activeLinkDestination->changeItem( t, editeddestination ); | ||
185 | connect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); | ||
186 | } | ||
187 | |||
188 | void PackageManagerSettings::serverUrlChanged(const QString& t) | ||
189 | { | ||
190 | serverurlDic.replace(editedserver, new QString(t)); | ||
191 | } | ||
192 | |||
193 | void PackageManagerSettings::destUrlChanged(const QString& t) | ||
194 | { | ||
195 | destinationurlDic.replace(editeddestination, new QString(t)); | ||
196 | } | ||
197 | |||
198 | void PackageManagerSettings::writeIpkgConfig(const QString& conffile) | ||
199 | { | ||
200 | QFile conf(conffile); | ||
201 | if ( ! conf.open(IO_WriteOnly) ) return; | ||
202 | QTextStream s(&conf); | ||
203 | s << "# Written by qpie Package Manager\n"; | ||
204 | for (int i=0; i<(int)activeServers->count(); i++) | ||
205 | { | ||
206 | QString url = serverurlDic[i] ? *serverurlDic[i] : QString("???"); | ||
207 | if ( !activeServers->isSelected(i) ) | ||
208 | s << "#"; | ||
209 | s << "src " << activeServers->text(i) << " " << url << "\n"; | ||
210 | } | ||
211 | for (int i=0; i<(int)destinations->count(); i++) | ||
212 | { | ||
213 | QString url = destinationurlDic[i] ? *destinationurlDic[i] : QString("???"); | ||
214 | s << "dest " << destinations->text(i) << " " << url << "\n"; | ||
215 | } | ||
216 | conf.close(); | ||
217 | } | ||
218 | |||
219 | |||
220 | void PackageManagerSettings::readInstallationSettings() | ||
221 | { | ||
222 | Config cfg( "oipkg", Config::User ); | ||
223 | cfg.setGroup( "Settings" ); | ||
224 | installationSettingsCount = cfg.readNumEntry( "count", -1 ); | ||
225 | currentSetting = cfg.readNumEntry( "current", 0 );// o should be -1 | ||
226 | |||
227 | for (int i = 0; i < installationSettingsCount; i++) | ||
228 | { | ||
229 | cfg.setGroup( "Setting_" + QString::number(i) ); | ||
230 | settingName->insertItem( cfg.readEntry( "name", "???" ), i ); | ||
231 | }; | ||
232 | readInstallationSetting( currentSetting ); | ||
233 | } | ||
234 | |||
235 | |||
236 | |||
237 | /** | ||
238 | * remove from conf file | ||
239 | */ | ||
240 | void PackageManagerSettings::removeInstallationSetting() | ||
241 | { | ||
242 | settingName->removeItem( settingName->currentItem() ); | ||
243 | Config cfg( "oipkg", Config::User ); | ||
244 | cfg.setGroup( "Setting_" + QString::number( installationSettingsCount ) ); | ||
245 | cfg.clearGroup(); | ||
246 | installationSettingsCount--; | ||
247 | changed = true; | ||
248 | settingName->setEditable( false ); | ||
249 | } | ||
250 | |||
251 | /** | ||
252 | * write to confgile | ||
253 | */ | ||
254 | void PackageManagerSettings::newInstallationSetting() | ||
255 | { | ||
256 | installationSettingsCount++; | ||
257 | settingName->insertItem( "New", installationSettingsCount ); | ||
258 | settingName->setCurrentItem( installationSettingsCount ); | ||
259 | settingName->setEditable( true ); | ||
260 | changed = true; | ||
261 | } | ||
262 | |||
263 | void PackageManagerSettings::installationSettingChange(int cs) | ||
264 | { | ||
265 | writeCurrentInstallationSetting(); | ||
266 | currentSetting = cs; | ||
267 | readInstallationSetting( cs ); | ||
268 | } | ||
269 | |||
270 | void PackageManagerSettings::writeInstallationSettings() | ||
271 | { | ||
272 | if ( ! changed ) return ; | ||
273 | { | ||
274 | Config cfg( "oipkg", Config::User ); | ||
275 | cfg.setGroup( "Settings" ); | ||
276 | cfg.writeEntry( "count", installationSettingsCount ); | ||
277 | cfg.writeEntry( "current", currentSetting ); | ||
278 | } | ||
279 | writeCurrentInstallationSetting(); | ||
280 | } | ||
281 | |||
282 | |||
283 | void PackageManagerSettings::readInstallationSetting(int setting) | ||
284 | { | ||
285 | if ( setting < 0 ) return; | ||
286 | Config cfg( "oipkg", Config::User ); | ||
287 | cfg.setGroup( "Setting_" + QString::number( setting ) ); | ||
288 | CheckBoxLink->setChecked( cfg.readBoolEntry( "link", false ) ); | ||
289 | QString dest = cfg.readEntry( "dest" ); | ||
290 | QString linkdest = cfg.readEntry( "linkdest" ); | ||
291 | pvDebug(3, "dest="+dest); | ||
292 | pvDebug(3, "linkdest="+linkdest); | ||
293 | |||
294 | for ( int i = 0; i < activeDestination->count(); i++) | ||
295 | { | ||
296 | if ( activeDestination->text( i ) == dest ) | ||
297 | activeDestination->setCurrentItem( i ); | ||
298 | if ( activeLinkDestination->text( i ) == linkdest ) | ||
299 | activeLinkDestination->setCurrentItem( i ); | ||
300 | } | ||
301 | } | ||
302 | |||
303 | void PackageManagerSettings::writeCurrentInstallationSetting() | ||
304 | { | ||
305 | Config cfg( "oipkg", Config::User ); | ||
306 | changed = false; | ||
307 | cfg.setGroup( "Setting_" + QString::number(currentSetting) ); | ||
308 | cfg.writeEntry( "link", CheckBoxLink->isChecked() ); | ||
309 | cfg.writeEntry( "dest", getDestinationName() ); | ||
310 | cfg.writeEntry( "linkdest" , getLinkDestinationName() ); | ||
311 | QStringList sers = getActiveServers(); | ||
312 | int srvc = 0; | ||
313 | for ( QStringList::Iterator it = sers.begin(); it != sers.end(); ++it ) { | ||
314 | cfg.writeEntry( "server_" + QString::number(srvc++), *it ); | ||
315 | } | ||
316 | cfg.writeEntry( "server_count", srvc ); | ||
317 | } | ||
318 | |||
319 | void PackageManagerSettings::renameInstallationSetting() | ||
320 | { | ||
321 | settingName->setEditable( true ); | ||
322 | changed = true; | ||
323 | } | ||
324 | |||
325 | void PackageManagerSettings::installationSettingSetName(const QString &name) | ||
326 | { | ||
327 | settingName->changeItem( name, settingName->currentItem() ); | ||
328 | changed = true; | ||
329 | } | ||
330 | |||
331 | |||
332 | bool PackageManagerSettings::readIpkgConfig(const QString& conffile) | ||
333 | { | ||
334 | QFile conf(conffile); | ||
335 | if ( conf.open(IO_ReadOnly) ) { | ||
336 | QTextStream s(&conf); | ||
337 | servers->clear(); | ||
338 | activeServers->clear(); | ||
339 | activeDestination->clear(); | ||
340 | activeLinkDestination->clear(); | ||
341 | serverurlDic.clear(); | ||
342 | destinationurlDic.clear(); | ||
343 | ipkg_old=0; | ||
344 | int currentserver=0; | ||
345 | while ( !s.atEnd() ) { | ||
346 | QString l = s.readLine(); | ||
347 | QStringList token = QStringList::split(' ', l); | ||
348 | if ( token[0] == "src" || token[0] == "#src" ) { | ||
349 | currentserver=servers->count(); | ||
350 | serverurlDic.insert(servers->count(),new QString(token[2])); | ||
351 | int a = token[0] == "src" ? 1 : 0; | ||
352 | int i = servers->count(); | ||
353 | servers->insertItem(token[1]); | ||
354 | activeServers->insertItem( token[1] ); | ||
355 | activeServers->setSelected(i,a); | ||
356 | } else if ( token[0] == "dest" ) { | ||
357 | currentserver=destinations->count(); | ||
358 | destinationurlDic.insert(destinations->count(),new QString(token[2])); | ||
359 | destinations->insertItem(token[1]); | ||
360 | activeDestination->insertItem( token[1] ); | ||
361 | activeLinkDestination->insertItem( token[1] ); | ||
362 | |||
363 | } else if ( token[0] == "option" ) { | ||
364 | // ### somehow need to use the settings from netsetup | ||
365 | // if ( token[1] == "http_proxy" ) | ||
366 | // http->setText(token[2]); | ||
367 | // else if ( token[1] == "ftp_proxy" ) | ||
368 | // ftp->setText(token[2]); | ||
369 | // else if ( token[1] == "proxy_username" ) | ||
370 | // username->setText(token[2]); | ||
371 | // else if ( token[1] == "proxy_password" ) | ||
372 | // password->setText(token[2]); | ||
373 | } else { | ||
374 | // Old style? | ||
375 | int eq = l.find('='); | ||
376 | if ( eq >= 0 ) { | ||
377 | QString v = l.mid(eq+1).stripWhiteSpace(); | ||
378 | if ( v[0] == '"' || v[0] == '\'' ) { | ||
379 | int cl=v.find(v[0],1); | ||
380 | if ( cl >= 0 ) | ||
381 | v = v.mid(1,cl-1); | ||
382 | } | ||
383 | if ( l.left(12) == "IPKG_SOURCE=" ) { | ||
384 | ipkg_old=1; | ||
385 | currentserver=servers->count(); | ||
386 | serverurlDic.insert(servers->count(),new QString(v)); | ||
387 | servers->insertItem(v); | ||
388 | } else if ( l.left(13) == "#IPKG_SOURCE=" ) { | ||
389 | serverurlDic.insert(servers->count(),new QString(v)); | ||
390 | servers->insertItem(v); | ||
391 | } else if ( l.left(10) == "IPKG_ROOT=" ) { | ||
392 | // ### no UI | ||
393 | // } else if ( l.left(20) == "IPKG_PROXY_USERNAME=" ) { | ||
394 | // username->setText(v); | ||
395 | // } else if ( l.left(20) == "IPKG_PROXY_PASSWORD=" ) { | ||
396 | // password->setText(v); | ||
397 | // } else if ( l.left(16) == "IPKG_PROXY_HTTP=" ) { | ||
398 | // http->setText(v); | ||
399 | // } else if ( l.left(16) == "IPKG_PROXY_FTP=" ) { | ||
400 | // ftp->setText(v); | ||
401 | } | ||
402 | } | ||
403 | } | ||
404 | } | ||
405 | if ( ipkg_old ) { | ||
406 | servers->setSelectionMode(QListBox::Single); | ||
407 | servers->setSelected(currentserver,TRUE); | ||
408 | } | ||
409 | return TRUE; | ||
410 | } else { | ||
411 | return FALSE; | ||
412 | } | ||
413 | } | ||
414 | |||
415 | |||
416 | /** | ||
417 | * read from config file(s) | ||
418 | */ | ||
419 | void PackageManagerSettings::readSettings() | ||
420 | { | ||
421 | readIpkgConfig("/etc/ipkg.conf"); | ||
422 | readInstallationSettings(); | ||
423 | } | ||
424 | |||
425 | void PackageManagerSettings::writeSettings() | ||
426 | { | ||
427 | writeIpkgConfig("/etc/ipkg.conf"); | ||
428 | writeInstallationSettings(); | ||
429 | } | ||
430 | /** shows the setting dialog */ | ||
431 | bool PackageManagerSettings::showDialog( int i ) | ||
432 | { | ||
433 | TabWidget->setCurrentPage( i ); | ||
434 | showMaximized(); | ||
435 | bool ret = exec(); | ||
436 | if ( ret ) writeSettings(); | ||
437 | else readSettings(); | ||
438 | return ret; | ||
439 | } | ||
440 | /** Returns the installation destination */ | ||
441 | QString PackageManagerSettings::getDestinationName() | ||
442 | { | ||
443 | return activeDestination->currentText(); | ||
444 | } | ||
445 | /** Returns the link destination */ | ||
446 | QString PackageManagerSettings::getLinkDestinationName() | ||
447 | { | ||
448 | return activeLinkDestination->currentText(); | ||
449 | } | ||
450 | /** Returns the URL of the active destination */ | ||
451 | QString PackageManagerSettings::getDestinationUrl() | ||
452 | { | ||
453 | int dnr = activeDestination->currentItem(); | ||
454 | return *destinationurlDic.find(dnr); | ||
455 | } | ||
456 | /** Should oipkg create links form install destination to link destination */ | ||
457 | bool PackageManagerSettings::createLinks() | ||
458 | { | ||
459 | return CheckBoxLink->isChecked(); | ||
460 | } | ||
461 | /** get the servers that are active */ | ||
462 | QStringList PackageManagerSettings::getActiveServers() | ||
463 | { | ||
464 | QStringList sl; | ||
465 | for (int i=0; i<(int)activeServers->count(); i++) | ||
466 | { | ||
467 | if ( activeServers->isSelected(i) ) | ||
468 | sl += activeServers->text(i); | ||
469 | } | ||
470 | return sl; | ||
471 | } | ||
472 | /** returns the destination listed in ipkg.conf */ | ||
473 | QStringList PackageManagerSettings::getDestinationUrls() | ||
474 | { | ||
475 | QStringList sl; | ||
476 | for (int i=0; i<(int)destinations->count(); i++) | ||
477 | { | ||
478 | sl += *destinationurlDic[i]; | ||
479 | } | ||
480 | return sl; | ||
481 | } | ||
482 | |||
483 | void PackageManagerSettings::linkEnabled( bool b ) | ||
484 | { | ||
485 | changed = true; | ||
486 | activeLinkDestination->setEnabled( b ); | ||
487 | } | ||