summaryrefslogtreecommitdiff
path: root/noncore/settings/packagemanager/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/settings/packagemanager/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/packagemanager/mainwindow.cpp38
1 files changed, 23 insertions, 15 deletions
diff --git a/noncore/settings/packagemanager/mainwindow.cpp b/noncore/settings/packagemanager/mainwindow.cpp
index 0e40c01..e0e5e04 100644
--- a/noncore/settings/packagemanager/mainwindow.cpp
+++ b/noncore/settings/packagemanager/mainwindow.cpp
@@ -36,10 +36,10 @@
36#include "packageinfodlg.h" 36#include "packageinfodlg.h"
37 37
38#include <opie2/ofiledialog.h> 38#include <opie2/ofiledialog.h>
39#include <opie2/oresource.h>
39 40
40#include <qpe/qcopenvelope_qws.h> 41#include <qpe/qcopenvelope_qws.h>
41#include <qpe/qpeapplication.h> 42#include <qpe/qpeapplication.h>
42#include <qpe/resource.h>
43 43
44#include <qaction.h> 44#include <qaction.h>
45#include <qdir.h> 45#include <qdir.h>
@@ -64,8 +64,8 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags /*fl*/ )
64 , m_statusWidget( this ) 64 , m_statusWidget( this )
65 , m_statusText( &m_statusWidget ) 65 , m_statusText( &m_statusWidget )
66 , m_statusBar( &m_statusWidget ) 66 , m_statusBar( &m_statusWidget )
67 , m_iconUpdated( Resource::loadPixmap( "packagemanager/updated" ) ) 67 , m_iconUpdated( Opie::Core::OResource::loadPixmap( "packagemanager/updated" ) )
68 , m_iconInstalled( Resource::loadPixmap( "installed" ) ) 68 , m_iconInstalled( Opie::Core::OResource::loadPixmap( "installed" ) )
69 , m_iconNull( m_iconUpdated.size() ) 69 , m_iconNull( m_iconUpdated.size() )
70 , m_filterName( QString::null ) 70 , m_filterName( QString::null )
71 , m_filterServer( QString::null ) 71 , m_filterServer( QString::null )
@@ -159,33 +159,37 @@ void MainWindow::initUI()
159 // Packages menu 159 // Packages menu
160 QPopupMenu *popup = new QPopupMenu( this ); 160 QPopupMenu *popup = new QPopupMenu( this );
161 161
162 QAction *a = new QAction( tr( "Update lists" ), Resource::loadPixmap( "packagemanager/update" ), QString::null, 0, this, 0 ); 162 QAction *a = new QAction( tr( "Update lists" ), Opie::Core::OResource::loadPixmap( "packagemanager/update",
163 Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
163 a->setWhatsThis( tr( "Tap here to update package lists from servers." ) ); 164 a->setWhatsThis( tr( "Tap here to update package lists from servers." ) );
164 connect( a, SIGNAL(activated()), this, SLOT(slotUpdate()) ); 165 connect( a, SIGNAL(activated()), this, SLOT(slotUpdate()) );
165 a->addTo( popup ); 166 a->addTo( popup );
166 a->addTo( &m_toolBar ); 167 a->addTo( &m_toolBar );
167 168
168 QAction *actionUpgrade = new QAction( tr( "Upgrade" ), Resource::loadPixmap( "packagemanager/upgrade" ), QString::null, 0, this, 0 ); 169 QAction *actionUpgrade = new QAction( tr( "Upgrade" ), Opie::Core::OResource::loadPixmap( "packagemanager/upgrade",
170 Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
169 actionUpgrade->setWhatsThis( tr( "Tap here to upgrade all installed packages if a newer version is available." ) ); 171 actionUpgrade->setWhatsThis( tr( "Tap here to upgrade all installed packages if a newer version is available." ) );
170 connect( actionUpgrade, SIGNAL(activated()), this, SLOT(slotUpgrade()) ); 172 connect( actionUpgrade, SIGNAL(activated()), this, SLOT(slotUpgrade()) );
171 actionUpgrade->addTo( popup ); 173 actionUpgrade->addTo( popup );
172 actionUpgrade->addTo( &m_toolBar ); 174 actionUpgrade->addTo( &m_toolBar );
173 175
174 QPixmap iconDownload = Resource::loadPixmap( "packagemanager/download" ); 176 QPixmap iconDownload = Opie::Core::OResource::loadPixmap( "packagemanager/download", Opie::Core::OResource::SmallIcon );
175 QPixmap iconRemove = Resource::loadPixmap( "packagemanager/remove" ); 177 QPixmap iconRemove = Opie::Core::OResource::loadPixmap( "packagemanager/remove", Opie::Core::OResource::SmallIcon );
176 QAction *actionDownload = new QAction( tr( "Download" ), iconDownload, QString::null, 0, this, 0 ); 178 QAction *actionDownload = new QAction( tr( "Download" ), iconDownload, QString::null, 0, this, 0 );
177 actionDownload->setWhatsThis( tr( "Tap here to download the currently selected package(s)." ) ); 179 actionDownload->setWhatsThis( tr( "Tap here to download the currently selected package(s)." ) );
178 connect( actionDownload, SIGNAL(activated()), this, SLOT(slotDownload()) ); 180 connect( actionDownload, SIGNAL(activated()), this, SLOT(slotDownload()) );
179 actionDownload->addTo( popup ); 181 actionDownload->addTo( popup );
180 actionDownload->addTo( &m_toolBar ); 182 actionDownload->addTo( &m_toolBar );
181 183
182 a = new QAction( tr( "Apply changes" ), Resource::loadPixmap( "packagemanager/apply" ), QString::null, 0, this, 0 ); 184 a = new QAction( tr( "Apply changes" ), Opie::Core::OResource::loadPixmap( "packagemanager/apply",
185 Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
183 a->setWhatsThis( tr( "Tap here to install, remove or upgrade currently selected package(s)." ) ); 186 a->setWhatsThis( tr( "Tap here to install, remove or upgrade currently selected package(s)." ) );
184 connect( a, SIGNAL(activated()), this, SLOT(slotApply()) ); 187 connect( a, SIGNAL(activated()), this, SLOT(slotApply()) );
185 a->addTo( popup ); 188 a->addTo( popup );
186 a->addTo( &m_toolBar ); 189 a->addTo( &m_toolBar );
187 190
188 a = new QAction( tr( "Install local package" ), Resource::loadPixmap( "folder" ), QString::null, 0, this, 0 ); 191 a = new QAction( tr( "Install local package" ), Opie::Core::OResource::loadPixmap( "folder",
192 Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
189 a->setWhatsThis( tr( "Tap here to install a package file located on device." ) ); 193 a->setWhatsThis( tr( "Tap here to install a package file located on device." ) );
190 connect( a, SIGNAL(activated()), this, SLOT(slotInstallLocal()) ); 194 connect( a, SIGNAL(activated()), this, SLOT(slotInstallLocal()) );
191 a->addTo( popup ); 195 a->addTo( popup );
@@ -193,7 +197,8 @@ void MainWindow::initUI()
193 197
194 popup->insertSeparator(); 198 popup->insertSeparator();
195 199
196 a = new QAction( tr( "Configure" ), Resource::loadPixmap( "SettingsIcon" ), QString::null, 0, this, 0 ); 200 a = new QAction( tr( "Configure" ), Opie::Core::OResource::loadPixmap( "SettingsIcon",
201 Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
197 a->setWhatsThis( tr( "Tap here to configure this application." ) ); 202 a->setWhatsThis( tr( "Tap here to configure this application." ) );
198 connect( a, SIGNAL(activated()), this, SLOT(slotConfigure()) ); 203 connect( a, SIGNAL(activated()), this, SLOT(slotConfigure()) );
199 a->addTo( popup ); 204 a->addTo( popup );
@@ -222,8 +227,8 @@ void MainWindow::initUI()
222 227
223 popup->insertSeparator(); 228 popup->insertSeparator();
224 229
225 m_actionFilter = new QAction( tr( "Filter" ), Resource::loadPixmap( "packagemanager/filter" ), 230 m_actionFilter = new QAction( tr( "Filter" ), Opie::Core::OResource::loadPixmap( "packagemanager/filter",
226 QString::null, 0, this, 0 ); 231 Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
227 m_actionFilter->setToggleAction( true ); 232 m_actionFilter->setToggleAction( true );
228 m_actionFilter->setWhatsThis( tr( "Tap here to apply current filter." ) ); 233 m_actionFilter->setWhatsThis( tr( "Tap here to apply current filter." ) );
229 connect( m_actionFilter, SIGNAL(toggled(bool)), this, SLOT(slotFilter(bool)) ); 234 connect( m_actionFilter, SIGNAL(toggled(bool)), this, SLOT(slotFilter(bool)) );
@@ -236,12 +241,14 @@ void MainWindow::initUI()
236 241
237 popup->insertSeparator(); 242 popup->insertSeparator();
238 243
239 a = new QAction( tr( "Find" ), Resource::loadPixmap( "find" ), QString::null, 0, this, 0 ); 244 a = new QAction( tr( "Find" ), Opie::Core::OResource::loadPixmap( "find", Opie::Core::OResource::SmallIcon ),
245 QString::null, 0, this, 0 );
240 a->setWhatsThis( tr( "Tap here to search for text in package names." ) ); 246 a->setWhatsThis( tr( "Tap here to search for text in package names." ) );
241 connect( a, SIGNAL(activated()), this, SLOT(slotFindShowToolbar()) ); 247 connect( a, SIGNAL(activated()), this, SLOT(slotFindShowToolbar()) );
242 a->addTo( popup ); 248 a->addTo( popup );
243 249
244 m_actionFindNext = new QAction( tr( "Find next" ), Resource::loadIconSet( "next" ), QString::null, 0, this, 0 ); 250 m_actionFindNext = new QAction( tr( "Find next" ), Opie::Core::OResource::loadPixmap( "next",
251 Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
245 m_actionFindNext->setEnabled( false ); 252 m_actionFindNext->setEnabled( false );
246 m_actionFindNext->setWhatsThis( tr( "Tap here to find the next package name containing the text you are searching for." ) ); 253 m_actionFindNext->setWhatsThis( tr( "Tap here to find the next package name containing the text you are searching for." ) );
247 connect( m_actionFindNext, SIGNAL(activated()), this, SLOT(slotFindNext()) ); 254 connect( m_actionFindNext, SIGNAL(activated()), this, SLOT(slotFindNext()) );
@@ -251,7 +258,8 @@ void MainWindow::initUI()
251 mb->insertItem( tr( "View" ), popup ); 258 mb->insertItem( tr( "View" ), popup );
252 259
253 // Finish find toolbar creation 260 // Finish find toolbar creation
254 a = new QAction( QString::null, Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 261 a = new QAction( QString::null, Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ),
262 QString::null, 0, this, 0 );
255 a->setWhatsThis( tr( "Tap here to hide the find toolbar." ) ); 263 a->setWhatsThis( tr( "Tap here to hide the find toolbar." ) );
256 connect( a, SIGNAL(activated()), this, SLOT(slotFindHideToolbar()) ); 264 connect( a, SIGNAL(activated()), this, SLOT(slotFindHideToolbar()) );
257 a->addTo( &m_findBar ); 265 a->addTo( &m_findBar );