summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/mainwin.cpp
Unidiff
Diffstat (limited to 'noncore/settings/aqpkg/mainwin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp83
1 files changed, 47 insertions, 36 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp
index 6b31cd1..e07d8a0 100644
--- a/noncore/settings/aqpkg/mainwin.cpp
+++ b/noncore/settings/aqpkg/mainwin.cpp
@@ -1,27 +1,27 @@
1/* 1/*
2                This file is part of the OPIE Project 2 This file is part of the OPIE Project
3 3
4 =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> 4 =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk>
5             .=l. Dan Williams <drw@handhelds.org> 5 .=l. Dan Williams <drw@handhelds.org>
6           .>+-= 6 .>+-=
7 _;:,     .>    :=|. This file is free software; you can 7_;:, .> :=|. This file is free software; you can
8.> <`_,   >  .   <= redistribute it and/or modify it under 8.> <`_, > . <= redistribute it and/or modify it under
9:`=1 )Y*s>-.--   : the terms of the GNU General Public 9:`=1 )Y*s>-.-- : the terms of the GNU General Public
10.="- .-=="i,     .._ License as published by the Free Software 10.="- .-=="i, .._ License as published by the Free Software
11 - .   .-<_>     .<> Foundation; either version 2 of the License, 11- . .-<_> .<> Foundation; either version 2 of the License,
12     ._= =}       : or (at your option) any later version. 12 ._= =} : or (at your option) any later version.
13    .%`+i>       _;_. 13 .%`+i> _;_.
14    .i_,=:_.      -<s. This file is distributed in the hope that 14 .i_,=:_. -<s. This file is distributed in the hope that
15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 15 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
16    : ..    .:,     . . . without even the implied warranty of 16 : .. .:, . . . without even the implied warranty of
17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 17 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 18 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General
19..}^=.=       =       ; Public License for more details. 19..}^=.= = ; Public License for more details.
20++=   -.     .`     .: 20++= -. .` .:
21 :     =  ...= . :.=- You should have received a copy of the GNU 21: = ...= . :.=- You should have received a copy of the GNU
22 -.   .:....=;==+<; General Public License along with this file; 22-. .:....=;==+<; General Public License along with this file;
23  -_. . .   )=.  = see the file COPYING. If not, write to the 23 -_. . . )=. = see the file COPYING. If not, write to the
24    --        :-=` Free Software Foundation, Inc., 24 -- :-=` Free Software Foundation, Inc.,
25 59 Temple Place - Suite 330, 25 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA. 26 Boston, MA 02111-1307, USA.
27 27
@@ -40,10 +40,11 @@
40#include "utils.h" 40#include "utils.h"
41 41
42/* OPIE */ 42/* OPIE */
43#include <opie2/oresource.h>
44
43#include <qpe/qcopenvelope_qws.h> 45#include <qpe/qcopenvelope_qws.h>
44#include <qpe/qpeapplication.h> 46#include <qpe/qpeapplication.h>
45#include <qpe/config.h> 47#include <qpe/config.h>
46#include <qpe/resource.h>
47 48
48/* QT */ 49/* QT */
49#include <qmenubar.h> 50#include <qmenubar.h>
@@ -121,7 +122,8 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl )
121 layout->addWidget( b, i / 13, i % 13); 122 layout->addWidget( b, i / 13, i % 13);
122 } 123 }
123 124
124 QAction *a = new QAction( QString::null, Resource::loadPixmap( "close" ), QString::null, 0, w, 0 ); 125 QAction *a = new QAction( QString::null, Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ),
126 QString::null, 0, w, 0 );
125 a->setWhatsThis( tr( "Click here to hide the Quick Jump toolbar." ) ); 127 a->setWhatsThis( tr( "Click here to hide the Quick Jump toolbar." ) );
126 connect( a, SIGNAL( activated() ), this, SLOT( hideJumpBar() ) ); 128 connect( a, SIGNAL( activated() ), this, SLOT( hideJumpBar() ) );
127 a->addTo( jumpBar ); 129 a->addTo( jumpBar );
@@ -130,27 +132,30 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl )
130 // Packages menu 132 // Packages menu
131 QPopupMenu *popup = new QPopupMenu( this ); 133 QPopupMenu *popup = new QPopupMenu( this );
132 134
133 a = new QAction( tr( "Update lists" ), Resource::loadPixmap( "aqpkg/update" ), QString::null, 0, this, 0 ); 135 a = new QAction( tr( "Update lists" ), Opie::Core::OResource::loadPixmap( "aqpkg/update", Opie::Core::OResource::SmallIcon ),
136 QString::null, 0, this, 0 );
134 a->setWhatsThis( tr( "Click here to update package lists from servers." ) ); 137 a->setWhatsThis( tr( "Click here to update package lists from servers." ) );
135 connect( a, SIGNAL( activated() ), this, SLOT( updateServer() ) ); 138 connect( a, SIGNAL( activated() ), this, SLOT( updateServer() ) );
136 a->addTo( popup ); 139 a->addTo( popup );
137 a->addTo( bar ); 140 a->addTo( bar );
138 141
139 actionUpgrade = new QAction( tr( "Upgrade" ), Resource::loadPixmap( "aqpkg/upgrade" ), QString::null, 0, this, 0 ); 142 actionUpgrade = new QAction( tr( "Upgrade" ), Opie::Core::OResource::loadPixmap( "aqpkg/upgrade", Opie::Core::OResource::SmallIcon ),
143 QString::null, 0, this, 0 );
140 actionUpgrade->setWhatsThis( tr( "Click here to upgrade all installed packages if a newer version is available." ) ); 144 actionUpgrade->setWhatsThis( tr( "Click here to upgrade all installed packages if a newer version is available." ) );
141 connect( actionUpgrade, SIGNAL( activated() ), this, SLOT( upgradePackages() ) ); 145 connect( actionUpgrade, SIGNAL( activated() ), this, SLOT( upgradePackages() ) );
142 actionUpgrade->addTo( popup ); 146 actionUpgrade->addTo( popup );
143 actionUpgrade->addTo( bar ); 147 actionUpgrade->addTo( bar );
144 148
145 iconDownload = Resource::loadPixmap( "aqpkg/download" ); 149 iconDownload = Opie::Core::OResource::loadPixmap( "aqpkg/download", Opie::Core::OResource::SmallIcon );
146 iconRemove = Resource::loadPixmap( "aqpkg/remove" ); 150 iconRemove = Opie::Core::OResource::loadPixmap( "aqpkg/remove", Opie::Core::OResource::SmallIcon );
147 actionDownload = new QAction( tr( "Download" ), iconDownload, QString::null, 0, this, 0 ); 151 actionDownload = new QAction( tr( "Download" ), iconDownload, QString::null, 0, this, 0 );
148 actionDownload->setWhatsThis( tr( "Click here to download the currently selected package(s)." ) ); 152 actionDownload->setWhatsThis( tr( "Click here to download the currently selected package(s)." ) );
149 connect( actionDownload, SIGNAL( activated() ), this, SLOT( downloadPackage() ) ); 153 connect( actionDownload, SIGNAL( activated() ), this, SLOT( downloadPackage() ) );
150 actionDownload->addTo( popup ); 154 actionDownload->addTo( popup );
151 actionDownload->addTo( bar ); 155 actionDownload->addTo( bar );
152 156
153 a = new QAction( tr( "Apply changes" ), Resource::loadPixmap( "aqpkg/apply" ), QString::null, 0, this, 0 ); 157 a = new QAction( tr( "Apply changes" ), Opie::Core::OResource::loadPixmap( "aqpkg/apply", Opie::Core::OResource::SmallIcon ),
158 QString::null, 0, this, 0 );
154 a->setWhatsThis( tr( "Click here to install, remove or upgrade currently selected package(s)." ) ); 159 a->setWhatsThis( tr( "Click here to install, remove or upgrade currently selected package(s)." ) );
155 connect( a, SIGNAL( activated() ), this, SLOT( applyChanges() ) ); 160 connect( a, SIGNAL( activated() ), this, SLOT( applyChanges() ) );
156 a->addTo( popup ); 161 a->addTo( popup );
@@ -158,7 +163,8 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl )
158 163
159 popup->insertSeparator(); 164 popup->insertSeparator();
160 165
161 a = new QAction( tr( "Configure" ), Resource::loadPixmap( "SettingsIcon" ), QString::null, 0, this, 0 ); 166 a = new QAction( tr( "Configure" ), Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon ),
167 QString::null, 0, this, 0 );
162 a->setWhatsThis( tr( "Click here to configure this application." ) ); 168 a->setWhatsThis( tr( "Click here to configure this application." ) );
163 connect( a, SIGNAL( activated() ), this, SLOT( displaySettings() ) ); 169 connect( a, SIGNAL( activated() ), this, SLOT( displaySettings() ) );
164 a->addTo( popup ); 170 a->addTo( popup );
@@ -187,7 +193,8 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl )
187 193
188 popup->insertSeparator(); 194 popup->insertSeparator();
189 195
190 actionFilter = new QAction( tr( "Filter by category" ), Resource::loadPixmap( "aqpkg/filter" ), QString::null, 0, this, 0 ); 196 actionFilter = new QAction( tr( "Filter by category" ), Opie::Core::OResource::loadPixmap( "aqpkg/filter",
197 Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
191 actionFilter->setToggleAction( TRUE ); 198 actionFilter->setToggleAction( TRUE );
192 actionFilter->setWhatsThis( tr( "Click here to list packages belonging to one category." ) ); 199 actionFilter->setWhatsThis( tr( "Click here to list packages belonging to one category." ) );
193 connect( actionFilter, SIGNAL( activated() ), this, SLOT( filterCategory() ) ); 200 connect( actionFilter, SIGNAL( activated() ), this, SLOT( filterCategory() ) );
@@ -200,12 +207,14 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl )
200 207
201 popup->insertSeparator(); 208 popup->insertSeparator();
202 209
203 a = new QAction( tr( "Find" ), Resource::loadPixmap( "find" ), QString::null, 0, this, 0 ); 210 a = new QAction( tr( "Find" ), Opie::Core::OResource::loadPixmap( "find", Opie::Core::OResource::SmallIcon ),
211 QString::null, 0, this, 0 );
204 a->setWhatsThis( tr( "Click here to search for text in package names." ) ); 212 a->setWhatsThis( tr( "Click here to search for text in package names." ) );
205 connect( a, SIGNAL( activated() ), this, SLOT( displayFindBar() ) ); 213 connect( a, SIGNAL( activated() ), this, SLOT( displayFindBar() ) );
206 a->addTo( popup ); 214 a->addTo( popup );
207 215
208 actionFindNext = new QAction( tr( "Find next" ), Resource::loadIconSet( "next" ), QString::null, 0, this, 0 ); 216 actionFindNext = new QAction( tr( "Find next" ), Opie::Core::OResource::loadPixmap( "next", Opie::Core::OResource::SmallIcon ),
217 QString::null, 0, this, 0 );
209 actionFindNext->setEnabled( FALSE ); 218 actionFindNext->setEnabled( FALSE );
210 actionFindNext->setWhatsThis( tr( "Click here to find the next package name containing the text you are searching for." ) ); 219 actionFindNext->setWhatsThis( tr( "Click here to find the next package name containing the text you are searching for." ) );
211 connect( actionFindNext, SIGNAL( activated() ), this, SLOT( repeatFind() ) ); 220 connect( actionFindNext, SIGNAL( activated() ), this, SLOT( repeatFind() ) );
@@ -215,7 +224,8 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl )
215 224
216 popup->insertSeparator(); 225 popup->insertSeparator();
217 226
218 a = new QAction( tr( "Quick Jump keypad" ), Resource::loadPixmap( "aqpkg/keyboard" ), QString::null, 0, this, 0 ); 227 a = new QAction( tr( "Quick Jump keypad" ), Opie::Core::OResource::loadPixmap( "aqpkg/keyboard", Opie::Core::OResource::SmallIcon ),
228 QString::null, 0, this, 0 );
219 a->setWhatsThis( tr( "Click here to display/hide keypad to allow quick movement through the package list." ) ); 229 a->setWhatsThis( tr( "Click here to display/hide keypad to allow quick movement through the package list." ) );
220 connect( a, SIGNAL( activated() ), this, SLOT( displayJumpBar() ) ); 230 connect( a, SIGNAL( activated() ), this, SLOT( displayJumpBar() ) );
221 a->addTo( popup ); 231 a->addTo( popup );
@@ -223,7 +233,8 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl )
223 mb->insertItem( tr( "View" ), popup ); 233 mb->insertItem( tr( "View" ), popup );
224 234
225 // Finish find toolbar creation 235 // Finish find toolbar creation
226 a = new QAction( QString::null, Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 236 a = new QAction( QString::null, Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ),
237 QString::null, 0, this, 0 );
227 a->setWhatsThis( tr( "Click here to hide the find toolbar." ) ); 238 a->setWhatsThis( tr( "Click here to hide the find toolbar." ) );
228 connect( a, SIGNAL( activated() ), this, SLOT( hideFindBar() ) ); 239 connect( a, SIGNAL( activated() ), this, SLOT( hideFindBar() ) );
229 a->addTo( findBar ); 240 a->addTo( findBar );
@@ -258,8 +269,8 @@ void MainWindow :: initMainWidget()
258 connect( serversList, SIGNAL(activated(int)), this, SLOT(serverSelected(int)) ); 269 connect( serversList, SIGNAL(activated(int)), this, SLOT(serverSelected(int)) );
259 QWhatsThis::add( serversList, tr( "Click here to select a package feed." ) ); 270 QWhatsThis::add( serversList, tr( "Click here to select a package feed." ) );
260 271
261 installedIcon = Resource::loadPixmap( "installed" ); 272 installedIcon = Opie::Core::OResource::loadPixmap( "installed" );
262 updatedIcon = Resource::loadPixmap( "aqpkg/updated" ); 273 updatedIcon = Opie::Core::OResource::loadPixmap( "aqpkg/updated" );
263 274
264 packagesList = new QListView( networkPkgWindow ); 275 packagesList = new QListView( networkPkgWindow );
265 packagesList->addColumn( tr( "Packages" ), 225 ); 276 packagesList->addColumn( tr( "Packages" ), 225 );