Diffstat (limited to 'noncore/settings/aqpkg/mainwin.cpp') (more/less context) (show 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,24 +1,36 @@ -/*************************************************************************** - mainwin.cpp - description - ------------------- - begin : Mon Aug 26 13:32:30 BST 2002 - copyright : (C) 2002 by Andy Qua - email : andy.qua@blueyonder.co.uk - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* + This file is part of the OPIE Project + + =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> + .=l. Dan Williams <drw@handhelds.org> + .>+-= + _;:, .> :=|. This file is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This file is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General +..}^=.= = ; Public License for more details. +++= -. .` .: + : = ...= . :.=- You should have received a copy of the GNU + -. .:....=;==+<; General Public License along with this file; + -_. . . )=. = see the file COPYING. If not, write to the + -- :-=` Free Software Foundation, Inc., + 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ #include <linux/limits.h> #include <unistd.h> #include <qpe/qcopenvelope_qws.h> #include <qmenubar.h> #include <qpe/qpeapplication.h> #include <qtoolbar.h> @@ -297,17 +309,16 @@ void MainWindow :: init() stack->raiseWidget( networkPkgWindow ); } void MainWindow :: setDocument( const QString &doc ) { // Remove path from package QString package = Utils::getPackageNameFromIpkFilename( doc ); -// std::cout << "Selecting package " << package << std::endl; // First select local server for ( int i = 0 ; i < serversList->count() ; ++i ) { if ( serversList->text( i ) == LOCAL_IPKGS ) { serversList->setCurrentItem( i ); break; @@ -549,20 +560,18 @@ void MainWindow :: updateData() for ( ; it.current(); ++it, ++i ) { server = it.current(); serverName = server->getServerName(); m_status->setText( tr( "Building server list:\n\t%1" ).arg( serverName ) ); m_progress->setProgress( i ); qApp->processEvents(); -// cout << "Adding " << it->getServerName() << " to combobox" << endl; if ( !server->isServerActive() ) { -// cout << serverName << " is not active" << endl; i--; continue; } serversList->insertItem( serverName ); if ( serverName == currentlySelectedServer ) activeItem = i; } @@ -708,33 +717,27 @@ void MainWindow :: serverSelected( int, bool raiseProgress ) stack->raiseWidget( networkPkgWindow ); } } void MainWindow :: searchForPackage( const QString &text ) { if ( !text.isEmpty() ) { -// cout << "searching for " << text << endl; // look through package list for text startng at current position -// vector<InstallData> workingPackages; QCheckListItem *start = (QCheckListItem *)packagesList->currentItem(); -// if ( start != 0 ) -// start = (QCheckListItem *)start->nextSibling(); if ( start == 0 ) start = (QCheckListItem *)packagesList->firstChild(); for ( QCheckListItem *item = start; item != 0 ; item = (QCheckListItem *)item->nextSibling() ) { -// cout << "checking " << item->text().lower() << endl; if ( item->text().lower().find( text ) != -1 ) { -// cout << "matched " << item->text() << endl; packagesList->ensureItemVisible( item ); packagesList->setCurrentItem( item ); break; } } } } @@ -1008,18 +1011,16 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item ) if ( !p->isPackageStoredLocally() ) newitem->packageName = p->getInstalledPackageName(); else newitem->packageName = name; if ( p->getInstalledTo() ) { newitem->destination = p->getInstalledTo(); -// cout << "dest - " << p->getInstalledTo()->getDestinationName() << endl; -// cout << "dest - " << p->getInstalledTo()->getDestinationPath() << endl; } else { newitem->destination = p->getLocalPackage()->getInstalledTo(); } // Now see if version is newer or not int val = compareVersions( p->getInstalledVersion(), p->getVersion() ); |