Diffstat (limited to 'noncore/settings/aqpkg/mainwin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/mainwin.cpp | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp index f0e8e48..0102292 100644 --- a/noncore/settings/aqpkg/mainwin.cpp +++ b/noncore/settings/aqpkg/mainwin.cpp | |||
@@ -1,20 +1,32 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | mainwin.cpp - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Mon Aug 26 13:32:30 BST 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
17 | 29 | ||
18 | #include <linux/limits.h> | 30 | #include <linux/limits.h> |
19 | #include <unistd.h> | 31 | #include <unistd.h> |
20 | 32 | ||
@@ -301,9 +313,8 @@ void MainWindow :: init() | |||
301 | void MainWindow :: setDocument( const QString &doc ) | 313 | void MainWindow :: setDocument( const QString &doc ) |
302 | { | 314 | { |
303 | // Remove path from package | 315 | // Remove path from package |
304 | QString package = Utils::getPackageNameFromIpkFilename( doc ); | 316 | QString package = Utils::getPackageNameFromIpkFilename( doc ); |
305 | // std::cout << "Selecting package " << package << std::endl; | ||
306 | 317 | ||
307 | // First select local server | 318 | // First select local server |
308 | for ( int i = 0 ; i < serversList->count() ; ++i ) | 319 | for ( int i = 0 ; i < serversList->count() ; ++i ) |
309 | { | 320 | { |
@@ -553,12 +564,10 @@ void MainWindow :: updateData() | |||
553 | m_status->setText( tr( "Building server list:\n\t%1" ).arg( serverName ) ); | 564 | m_status->setText( tr( "Building server list:\n\t%1" ).arg( serverName ) ); |
554 | m_progress->setProgress( i ); | 565 | m_progress->setProgress( i ); |
555 | qApp->processEvents(); | 566 | qApp->processEvents(); |
556 | 567 | ||
557 | // cout << "Adding " << it->getServerName() << " to combobox" << endl; | ||
558 | if ( !server->isServerActive() ) | 568 | if ( !server->isServerActive() ) |
559 | { | 569 | { |
560 | // cout << serverName << " is not active" << endl; | ||
561 | i--; | 570 | i--; |
562 | continue; | 571 | continue; |
563 | } | 572 | } |
564 | 573 | ||
@@ -712,25 +721,19 @@ void MainWindow :: serverSelected( int, bool raiseProgress ) | |||
712 | void MainWindow :: searchForPackage( const QString &text ) | 721 | void MainWindow :: searchForPackage( const QString &text ) |
713 | { | 722 | { |
714 | if ( !text.isEmpty() ) | 723 | if ( !text.isEmpty() ) |
715 | { | 724 | { |
716 | // cout << "searching for " << text << endl; | ||
717 | // look through package list for text startng at current position | 725 | // look through package list for text startng at current position |
718 | // vector<InstallData> workingPackages; | ||
719 | QCheckListItem *start = (QCheckListItem *)packagesList->currentItem(); | 726 | QCheckListItem *start = (QCheckListItem *)packagesList->currentItem(); |
720 | // if ( start != 0 ) | ||
721 | // start = (QCheckListItem *)start->nextSibling(); | ||
722 | 727 | ||
723 | if ( start == 0 ) | 728 | if ( start == 0 ) |
724 | start = (QCheckListItem *)packagesList->firstChild(); | 729 | start = (QCheckListItem *)packagesList->firstChild(); |
725 | 730 | ||
726 | for ( QCheckListItem *item = start; item != 0 ; | 731 | for ( QCheckListItem *item = start; item != 0 ; |
727 | item = (QCheckListItem *)item->nextSibling() ) | 732 | item = (QCheckListItem *)item->nextSibling() ) |
728 | { | 733 | { |
729 | // cout << "checking " << item->text().lower() << endl; | ||
730 | if ( item->text().lower().find( text ) != -1 ) | 734 | if ( item->text().lower().find( text ) != -1 ) |
731 | { | 735 | { |
732 | // cout << "matched " << item->text() << endl; | ||
733 | packagesList->ensureItemVisible( item ); | 736 | packagesList->ensureItemVisible( item ); |
734 | packagesList->setCurrentItem( item ); | 737 | packagesList->setCurrentItem( item ); |
735 | break; | 738 | break; |
736 | } | 739 | } |
@@ -1012,10 +1015,8 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item ) | |||
1012 | 1015 | ||
1013 | if ( p->getInstalledTo() ) | 1016 | if ( p->getInstalledTo() ) |
1014 | { | 1017 | { |
1015 | newitem->destination = p->getInstalledTo(); | 1018 | newitem->destination = p->getInstalledTo(); |
1016 | // cout << "dest - " << p->getInstalledTo()->getDestinationName() << endl; | ||
1017 | // cout << "dest - " << p->getInstalledTo()->getDestinationPath() << endl; | ||
1018 | } | 1019 | } |
1019 | else | 1020 | else |
1020 | { | 1021 | { |
1021 | newitem->destination = p->getLocalPackage()->getInstalledTo(); | 1022 | newitem->destination = p->getLocalPackage()->getInstalledTo(); |