-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.cpp | 1 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 2 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/utils.cpp | 2 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/utils.h | 2 |
4 files changed, 3 insertions, 4 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp index 11ab406..233eae6 100644 --- a/noncore/unsupported/oipkg/mainwindow.cpp +++ b/noncore/unsupported/oipkg/mainwindow.cpp | |||
@@ -312,148 +312,147 @@ void MainWindow::subSectionChanged() | |||
312 | this, SLOT( sectionChanged() ) ); | 312 | this, SLOT( sectionChanged() ) ); |
313 | disconnect( subsection, SIGNAL(activated(int) ), | 313 | disconnect( subsection, SIGNAL(activated(int) ), |
314 | this, SLOT( subSectionChanged() ) ); | 314 | this, SLOT( subSectionChanged() ) ); |
315 | packageListServers.setSubSection( subsection->currentText() ); | 315 | packageListServers.setSubSection( subsection->currentText() ); |
316 | connect( section, SIGNAL( activated(int) ), | 316 | connect( section, SIGNAL( activated(int) ), |
317 | this, SLOT( sectionChanged() ) ); | 317 | this, SLOT( sectionChanged() ) ); |
318 | connect( subsection, SIGNAL(activated(int) ), | 318 | connect( subsection, SIGNAL(activated(int) ), |
319 | this, SLOT( subSectionChanged() ) ); | 319 | this, SLOT( subSectionChanged() ) ); |
320 | displayList(); | 320 | displayList(); |
321 | } | 321 | } |
322 | 322 | ||
323 | void MainWindow::setSections() | 323 | void MainWindow::setSections() |
324 | { | 324 | { |
325 | section->clear(); | 325 | section->clear(); |
326 | section->insertStringList( packageListServers.getSections() ); | 326 | section->insertStringList( packageListServers.getSections() ); |
327 | } | 327 | } |
328 | 328 | ||
329 | void MainWindow::setSubSections() | 329 | void MainWindow::setSubSections() |
330 | { | 330 | { |
331 | subsection->clear(); | 331 | subsection->clear(); |
332 | subsection->insertStringList( packageListServers.getSubSections() ); | 332 | subsection->insertStringList( packageListServers.getSubSections() ); |
333 | } | 333 | } |
334 | 334 | ||
335 | 335 | ||
336 | void MainWindow::showSettings() | 336 | void MainWindow::showSettings() |
337 | { | 337 | { |
338 | if ( settings->showDialog( 0 ) ) | 338 | if ( settings->showDialog( 0 ) ) |
339 | updateList(); | 339 | updateList(); |
340 | } | 340 | } |
341 | void MainWindow::showSettingsSrv() | 341 | void MainWindow::showSettingsSrv() |
342 | { | 342 | { |
343 | if ( settings->showDialog( 1 ) ) | 343 | if ( settings->showDialog( 1 ) ) |
344 | updateList(); | 344 | updateList(); |
345 | } | 345 | } |
346 | void MainWindow::showSettingsDst() | 346 | void MainWindow::showSettingsDst() |
347 | { | 347 | { |
348 | if ( settings->showDialog( 2 ) ) | 348 | if ( settings->showDialog( 2 ) ) |
349 | updateList(); | 349 | updateList(); |
350 | } | 350 | } |
351 | 351 | ||
352 | void MainWindow::sectionShow(bool b) | 352 | void MainWindow::sectionShow(bool b) |
353 | { | 353 | { |
354 | if (b) sectionBar->show(); | 354 | if (b) sectionBar->show(); |
355 | else sectionBar->hide(); | 355 | else sectionBar->hide(); |
356 | sectionAction->setOn( b ); | 356 | sectionAction->setOn( b ); |
357 | } | 357 | } |
358 | 358 | ||
359 | void MainWindow::sectionClose() | 359 | void MainWindow::sectionClose() |
360 | { | 360 | { |
361 | sectionAction->setOn( false ); | 361 | sectionAction->setOn( false ); |
362 | } | 362 | } |
363 | 363 | ||
364 | void MainWindow::findShow(bool b) | 364 | void MainWindow::findShow(bool b) |
365 | { | 365 | { |
366 | if (b) findBar->show(); | 366 | if (b) findBar->show(); |
367 | else findBar->hide(); | 367 | else findBar->hide(); |
368 | findAction->setOn( b ); | 368 | findAction->setOn( b ); |
369 | } | 369 | } |
370 | 370 | ||
371 | void MainWindow::findClose() | 371 | void MainWindow::findClose() |
372 | { | 372 | { |
373 | findAction->setOn( false ); | 373 | findAction->setOn( false ); |
374 | } | 374 | } |
375 | 375 | ||
376 | void MainWindow::searchShow(bool b) | 376 | void MainWindow::searchShow(bool b) |
377 | { | 377 | { |
378 | if (b) searchBar->show(); | 378 | if (b) searchBar->show(); |
379 | else searchBar->hide(); | 379 | else searchBar->hide(); |
380 | searchAction->setOn( b ); | 380 | searchAction->setOn( b ); |
381 | } | 381 | } |
382 | 382 | ||
383 | void MainWindow::searchClose() | 383 | void MainWindow::searchClose() |
384 | { | 384 | { |
385 | searchAction->setOn( false ); | 385 | searchAction->setOn( false ); |
386 | } | 386 | } |
387 | 387 | ||
388 | 388 | ||
389 | void MainWindow::destShow(bool b) | 389 | void MainWindow::destShow(bool b) |
390 | { | 390 | { |
391 | if (b) destBar->show(); | 391 | if (b) destBar->show(); |
392 | else destBar->hide(); | 392 | else destBar->hide(); |
393 | destAction->setOn( b ); | 393 | destAction->setOn( b ); |
394 | } | 394 | } |
395 | 395 | ||
396 | void MainWindow::destClose() | 396 | void MainWindow::destClose() |
397 | { | 397 | { |
398 | destAction->setOn( false ); | 398 | destAction->setOn( false ); |
399 | } | 399 | } |
400 | 400 | ||
401 | void MainWindow::setDocument(const QString &fileName) | 401 | void MainWindow::setDocument(const QString &fileName) |
402 | { | 402 | { |
403 | if ( !QFile::exists( fileName ) ) return; | 403 | if ( !QFile::exists( fileName ) ) return; |
404 | ipkg->installFile( fileName ); | 404 | ipkg->installFile( fileName ); |
405 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); | 405 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); |
406 | QString lf = QString::null; | 406 | QString lf = QString::null; |
407 | e << lf; | 407 | e << lf; |
408 | exit; | ||
409 | } | 408 | } |
410 | 409 | ||
411 | 410 | ||
412 | void MainWindow::makeChannel() | 411 | void MainWindow::makeChannel() |
413 | { | 412 | { |
414 | channel = new QCopChannel( "QPE/Application/oipkg", this ); | 413 | channel = new QCopChannel( "QPE/Application/oipkg", this ); |
415 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), | 414 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), |
416 | this, SLOT(receive(const QCString&, const QByteArray&)) ); | 415 | this, SLOT(receive(const QCString&, const QByteArray&)) ); |
417 | } | 416 | } |
418 | 417 | ||
419 | 418 | ||
420 | 419 | ||
421 | void MainWindow::receive(const QCString &msg, const QByteArray &arg) | 420 | void MainWindow::receive(const QCString &msg, const QByteArray &arg) |
422 | { | 421 | { |
423 | pvDebug(3, "QCop "+msg+" "+QCString(arg)); | 422 | pvDebug(3, "QCop "+msg+" "+QCString(arg)); |
424 | if ( msg == "installFile(QString)" ) | 423 | if ( msg == "installFile(QString)" ) |
425 | { | 424 | { |
426 | ipkg->installFile( QString(arg) ); | 425 | ipkg->installFile( QString(arg) ); |
427 | }else if( msg == "removeFile(QString)" ) | 426 | }else if( msg == "removeFile(QString)" ) |
428 | { | 427 | { |
429 | ipkg->removeFile( QString(arg) ); | 428 | ipkg->removeFile( QString(arg) ); |
430 | }else if( msg == "createLinks(QString)" ) | 429 | }else if( msg == "createLinks(QString)" ) |
431 | { | 430 | { |
432 | ipkg->createLinks( QString(arg) ); | 431 | ipkg->createLinks( QString(arg) ); |
433 | }else if( msg == "removeLinks(QString)" ) | 432 | }else if( msg == "removeLinks(QString)" ) |
434 | { | 433 | { |
435 | ipkg->removeLinks( QString(arg) ); | 434 | ipkg->removeLinks( QString(arg) ); |
436 | }else{ | 435 | }else{ |
437 | pvDebug(2,"Huh what do ya want") | 436 | pvDebug(2,"Huh what do ya want") |
438 | } | 437 | } |
439 | } | 438 | } |
440 | 439 | ||
441 | 440 | ||
442 | void MainWindow::createLinks() | 441 | void MainWindow::createLinks() |
443 | { | 442 | { |
444 | pvDebug(2,"creating links..."); | 443 | pvDebug(2,"creating links..."); |
445 | ipkg->createLinks( settings->destinationurl->text() ); | 444 | ipkg->createLinks( settings->destinationurl->text() ); |
446 | } | 445 | } |
447 | 446 | ||
448 | void MainWindow::removeLinks() | 447 | void MainWindow::removeLinks() |
449 | { | 448 | { |
450 | pvDebug(2,"removing links..."); | 449 | pvDebug(2,"removing links..."); |
451 | ipkg->removeLinks( settings->destinationurl->text() ); | 450 | ipkg->removeLinks( settings->destinationurl->text() ); |
452 | } | 451 | } |
453 | 452 | ||
454 | void MainWindow::remotePackageQuery() | 453 | void MainWindow::remotePackageQuery() |
455 | { | 454 | { |
456 | packageListSearch.query( searchEdit->text() ); | 455 | packageListSearch.query( searchEdit->text() ); |
457 | packageListSearch.update(); | 456 | packageListSearch.update(); |
458 | displayList(); | 457 | displayList(); |
459 | } | 458 | } |
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index 2a534d2..0817247 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp | |||
@@ -370,97 +370,97 @@ void PmIpkg::install() | |||
370 | } | 370 | } |
371 | } | 371 | } |
372 | out("\n"); | 372 | out("\n"); |
373 | to_install.clear(); | 373 | to_install.clear(); |
374 | } | 374 | } |
375 | 375 | ||
376 | void PmIpkg::createLinks( const QString &dest ) | 376 | void PmIpkg::createLinks( const QString &dest ) |
377 | { | 377 | { |
378 | pvDebug(2,"PmIpkg::createLinks "+dest); | 378 | pvDebug(2,"PmIpkg::createLinks "+dest); |
379 | linkOpp=createLink; | 379 | linkOpp=createLink; |
380 | QString url = settings->getDestinationUrlByName( dest ); | 380 | QString url = settings->getDestinationUrlByName( dest ); |
381 | url = url==""?dest:url; | 381 | url = url==""?dest:url; |
382 | processLinkDir( "/opt", url ); | 382 | processLinkDir( "/opt", url ); |
383 | processLinkDir( "/usr", url ); | 383 | processLinkDir( "/usr", url ); |
384 | } | 384 | } |
385 | 385 | ||
386 | void PmIpkg::removeLinks( const QString &dest ) | 386 | void PmIpkg::removeLinks( const QString &dest ) |
387 | { | 387 | { |
388 | pvDebug(2,"PmIpkg::removeLinks "+dest); | 388 | pvDebug(2,"PmIpkg::removeLinks "+dest); |
389 | linkOpp=removeLink; | 389 | linkOpp=removeLink; |
390 | QString url = settings->getDestinationUrlByName( dest ); | 390 | QString url = settings->getDestinationUrlByName( dest ); |
391 | url = url==""?dest:url; | 391 | url = url==""?dest:url; |
392 | processLinkDir( "/opt", url ); | 392 | processLinkDir( "/opt", url ); |
393 | processLinkDir( "/usr", url ); | 393 | processLinkDir( "/usr", url ); |
394 | } | 394 | } |
395 | 395 | ||
396 | void PmIpkg::update() | 396 | void PmIpkg::update() |
397 | { | 397 | { |
398 | show(); | 398 | show(); |
399 | if ( runIpkg( "update" ) ) | 399 | if ( runIpkg( "update" ) ) |
400 | runwindow->close(); | 400 | runwindow->close(); |
401 | else out("An error occurred!\nPlease check the log."); | 401 | else out("An error occurred!\nPlease check the log."); |
402 | } | 402 | } |
403 | 403 | ||
404 | void PmIpkg::out( QString o ) | 404 | void PmIpkg::out( QString o ) |
405 | { | 405 | { |
406 | runwindow->outPut->append(o); | 406 | runwindow->outPut->append(o); |
407 | runwindow->outPut->setCursorPosition(runwindow->outPut->numLines() + 1,0,FALSE); | 407 | runwindow->outPut->setCursorPosition(runwindow->outPut->numLines() + 1,0,FALSE); |
408 | } | 408 | } |
409 | 409 | ||
410 | 410 | ||
411 | 411 | ||
412 | 412 | ||
413 | void PmIpkg::show() | 413 | void PmIpkg::show() |
414 | { | 414 | { |
415 | if (!runwindow->isVisible()) | 415 | if (!runwindow->isVisible()) |
416 | { | 416 | { |
417 | runwindow->showMaximized(); | 417 | runwindow->showMaximized(); |
418 | runwindow->show(); | 418 | runwindow->show(); |
419 | } | 419 | } |
420 | runwindow->outPut->setText(""); | 420 | runwindow->outPut->setText(""); |
421 | } | 421 | } |
422 | 422 | ||
423 | void PmIpkg::installFile(const QString &fileName, const QString &dest) | 423 | void PmIpkg::installFile(const QString &fileName, const QString &dest) |
424 | { | 424 | { |
425 | 425 | ||
426 | to_install.clear(); | 426 | to_install.clear(); |
427 | to_remove.clear(); | 427 | to_remove.clear(); |
428 | pvDebug( 2,"PmIpkg::installFile "+ fileName); | 428 | pvDebug( 2,"PmIpkg::installFile "+ fileName); |
429 | Package *p = new Package(fileName,settings); | 429 | Package *p = new Package(fileName,settings); |
430 | if ( dest!="") p->setDest( dest ); | 430 | if ( dest!="") p->setDest( dest ); |
431 | to_install.append( p ); | 431 | to_install.append( p ); |
432 | commit(); | 432 | commit(); |
433 | delete p; | 433 | delete p; |
434 | } | 434 | } |
435 | 435 | ||
436 | void PmIpkg::removeFile(const QString &fileName, const QString &dest) | 436 | void PmIpkg::removeFile(const QString &fileName, const QString &dest) |
437 | { | 437 | { |
438 | 438 | ||
439 | to_install.clear(); | 439 | to_install.clear(); |
440 | to_remove.clear(); | 440 | to_remove.clear(); |
441 | pvDebug( 2,"PmIpkg::removeFile "+ fileName); | 441 | pvDebug( 2,"PmIpkg::removeFile "+ fileName); |
442 | Package *p = new Package(fileName,settings); | 442 | Package *p = new Package(fileName,settings); |
443 | if ( dest!="") p->setDest( dest ); | 443 | if ( dest!="") p->setDest( dest ); |
444 | to_remove.append( p ); | 444 | to_remove.append( p ); |
445 | commit(); | 445 | commit(); |
446 | delete p; | 446 | delete p; |
447 | } | 447 | } |
448 | 448 | ||
449 | 449 | ||
450 | void PmIpkg::clearLists() | 450 | void PmIpkg::clearLists() |
451 | { | 451 | { |
452 | to_remove.clear(); | 452 | to_remove.clear(); |
453 | to_install.clear(); | 453 | to_install.clear(); |
454 | } | 454 | } |
455 | 455 | ||
456 | 456 | ||
457 | void PmIpkg::getIpkgOutput(OProcess *proc, char *buffer, int buflen) | 457 | void PmIpkg::getIpkgOutput(OProcess *proc, char *buffer, int buflen) |
458 | { | 458 | { |
459 | QString lineStr, lineStrOld; | 459 | QString lineStr, lineStrOld; |
460 | lineStr = buffer; | 460 | lineStr = buffer; |
461 | lineStr=lineStr.left(buflen); | 461 | lineStr=lineStr.left(buflen); |
462 | //Configuring opie-oipkg...Done | 462 | //Configuring opie-oipkg...Done |
463 | if (lineStr!=lineStrOld) | 463 | if (lineStr!=lineStrOld) |
464 | out(lineStr); | 464 | out(lineStr); |
465 | lineStrOld = lineStr; | 465 | lineStrOld = lineStr; |
466 | } \ No newline at end of file | 466 | } |
diff --git a/noncore/unsupported/oipkg/utils.cpp b/noncore/unsupported/oipkg/utils.cpp index 13b17fb..66dcf10 100644 --- a/noncore/unsupported/oipkg/utils.cpp +++ b/noncore/unsupported/oipkg/utils.cpp | |||
@@ -1,27 +1,27 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | utils.cpp - description | 2 | utils.cpp - description |
3 | ------------------- | 3 | ------------------- |
4 | begin : Sun Apr 28 2002 | 4 | begin : Sun Apr 28 2002 |
5 | copyright : (C) 2002 by tille | 5 | copyright : (C) 2002 by tille |
6 | email : tille@handhelds.org | 6 | email : tille@handhelds.org |
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 <qcombobox.h> | 18 | #include <qcombobox.h> |
19 | #include <qstring.h> | 19 | #include <qstring.h> |
20 | #include "utils.h" | 20 | #include "utils.h" |
21 | 21 | ||
22 | void setComboName( QComboBox* combo, QString s) | 22 | void setComboName( QComboBox* combo, QString s) |
23 | { | 23 | { |
24 | for ( int i = 0; i < combo->count(); i++) | 24 | for ( int i = 0; i < combo->count(); i++) |
25 | if ( combo->text( i ) == s ) | 25 | if ( combo->text( i ) == s ) |
26 | combo->setCurrentItem( i ); | 26 | combo->setCurrentItem( i ); |
27 | } \ No newline at end of file | 27 | } |
diff --git a/noncore/unsupported/oipkg/utils.h b/noncore/unsupported/oipkg/utils.h index bb033c5..ecc70dc 100644 --- a/noncore/unsupported/oipkg/utils.h +++ b/noncore/unsupported/oipkg/utils.h | |||
@@ -1,18 +1,18 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | utils.h - description | 2 | utils.h - description |
3 | ------------------- | 3 | ------------------- |
4 | begin : Sun Apr 28 2002 | 4 | begin : Sun Apr 28 2002 |
5 | copyright : (C) 2002 by tille | 5 | copyright : (C) 2002 by tille |
6 | email : tille@handhelds.org | 6 | email : tille@handhelds.org |
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 | void setComboName( QComboBox*, QString ); \ No newline at end of file | 18 | void setComboName( QComboBox*, QString ); |