summaryrefslogtreecommitdiff
path: root/noncore
Unidiff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/entrydlg.cpp8
-rw-r--r--noncore/settings/packagemanager/installdlg.cpp26
-rw-r--r--noncore/settings/packagemanager/mainwindow.cpp38
-rw-r--r--noncore/settings/packagemanager/oipkgconfigdlg.cpp52
-rw-r--r--noncore/settings/packagemanager/packageinfodlg.cpp8
5 files changed, 65 insertions, 67 deletions
diff --git a/noncore/settings/packagemanager/entrydlg.cpp b/noncore/settings/packagemanager/entrydlg.cpp
index 5d61342..1e87e64 100644
--- a/noncore/settings/packagemanager/entrydlg.cpp
+++ b/noncore/settings/packagemanager/entrydlg.cpp
@@ -22,49 +22,49 @@
22:     =  ...= . :.=- 22:     =  ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU 23 -.   .:....=;==+<; You should have received a copy of the GNU
24  -_. . .   )=.  = Library General Public License along with 24  -_. . .   )=.  = Library General Public License along with
25    --        :-=` this library; see the file COPYING.LIB. 25    --        :-=` this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation, 26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330, 27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA. 28 Boston, MA 02111-1307, USA.
29*/ 29*/
30 30
31#include "entrydlg.h" 31#include "entrydlg.h"
32 32
33#include <opie2/ofiledialog.h> 33#include <opie2/ofiledialog.h>
34#include <opie2/oresource.h>
34 35
35#include <qpe/qpeapplication.h> 36#include <qpe/qpeapplication.h>
36#include <qpe/resource.h>
37 37
38#include <qlabel.h> 38#include <qlabel.h>
39#include <qlayout.h> 39#include <qlayout.h>
40#include <qlineedit.h> 40#include <qlineedit.h>
41#include <qpushbutton.h> 41#include <qpushbutton.h>
42 42
43EntryDlg::EntryDlg( const QString &label, QWidget* parent, const char* name, bool modal ) 43EntryDlg::EntryDlg( const QString &label, QWidget* parent, const char* name, bool modal )
44 : QDialog( parent, name, modal ) 44 : QDialog( parent, name, modal )
45{ 45{
46 QGridLayout *layout = new QGridLayout( this, 3, 2, 2, 4 ); 46 QGridLayout *layout = new QGridLayout( this, 3, 2, 2, 4 );
47 47
48 QLabel *l = new QLabel( label, this ); 48 QLabel *l = new QLabel( label, this );
49 l->setAlignment( AlignLeft | AlignTop | WordBreak ); 49 l->setAlignment( AlignLeft | AlignTop | WordBreak );
50 layout->addMultiCellWidget( l, 0, 0, 0, 1 ); 50 layout->addMultiCellWidget( l, 0, 0, 0, 1 );
51 51
52 m_entry = new QLineEdit( this ); 52 m_entry = new QLineEdit( this );
53 layout->addWidget( m_entry, 1, 0 ); 53 layout->addWidget( m_entry, 1, 0 );
54 connect( m_entry, SIGNAL(returnPressed()), this, SLOT(slotTryAccept()) ); 54 connect( m_entry, SIGNAL(returnPressed()), this, SLOT(slotTryAccept()) );
55 55
56 QPixmap pic; 56 QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon ),
57 pic.convertFromImage( Resource::loadImage( "folder" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 57 QString::null, this );
58 QPushButton *btn = new QPushButton( pic, QString::null, this ); 58 btn->setMinimumHeight( AppLnk::smallIconSize()+4 );
59 btn->setMaximumWidth( btn->height() ); 59 btn->setMaximumWidth( btn->height() );
60 connect( btn, SIGNAL(clicked()), this, SLOT(slotSelectPath()) ); 60 connect( btn, SIGNAL(clicked()), this, SLOT(slotSelectPath()) );
61 layout->addWidget( btn, 1, 1 ); 61 layout->addWidget( btn, 1, 1 );
62 62
63 layout->setRowStretch( 2, 10 ); 63 layout->setRowStretch( 2, 10 );
64 64
65 resize( width(), l->height() + btn->height() + 8 ); 65 resize( width(), l->height() + btn->height() + 8 );
66} 66}
67 67
68void EntryDlg::setText( const QString &text ) 68void EntryDlg::setText( const QString &text )
69{ 69{
70 m_entry->setText( text ); 70 m_entry->setText( text );
diff --git a/noncore/settings/packagemanager/installdlg.cpp b/noncore/settings/packagemanager/installdlg.cpp
index 205d7ed..15d88ad 100644
--- a/noncore/settings/packagemanager/installdlg.cpp
+++ b/noncore/settings/packagemanager/installdlg.cpp
@@ -22,27 +22,27 @@
22:     =  ...= . :.=- 22:     =  ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU 23 -.   .:....=;==+<; You should have received a copy of the GNU
24  -_. . .   )=.  = Library General Public License along with 24  -_. . .   )=.  = Library General Public License along with
25    --        :-=` this library; see the file COPYING.LIB. 25    --        :-=` this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation, 26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330, 27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA. 28 Boston, MA 02111-1307, USA.
29*/ 29*/
30 30
31#include "installdlg.h" 31#include "installdlg.h"
32 32
33#include <opie2/ofiledialog.h> 33#include <opie2/ofiledialog.h>
34#include <opie2/oresource.h>
34 35
35#include <qpe/fileselector.h> 36#include <qpe/fileselector.h>
36#include <qpe/resource.h>
37#include <qpe/storage.h> 37#include <qpe/storage.h>
38 38
39#include <qapplication.h> 39#include <qapplication.h>
40#include <qcombobox.h> 40#include <qcombobox.h>
41#include <qfileinfo.h> 41#include <qfileinfo.h>
42#include <qgroupbox.h> 42#include <qgroupbox.h>
43#include <qlabel.h> 43#include <qlabel.h>
44#include <qlayout.h> 44#include <qlayout.h>
45#include <qmap.h> 45#include <qmap.h>
46#include <qmultilineedit.h> 46#include <qmultilineedit.h>
47#include <qpushbutton.h> 47#include <qpushbutton.h>
48 48
@@ -121,33 +121,32 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap
121 } 121 }
122 122
123 QGroupBox *groupBox = new QGroupBox( 0, Qt::Vertical, tr( "Output" ), this ); 123 QGroupBox *groupBox = new QGroupBox( 0, Qt::Vertical, tr( "Output" ), this );
124 groupBox->layout()->setSpacing( 0 ); 124 groupBox->layout()->setSpacing( 0 );
125 groupBox->layout()->setMargin( 4 ); 125 groupBox->layout()->setMargin( 4 );
126 126
127 QVBoxLayout *groupBoxLayout = new QVBoxLayout( groupBox->layout() ); 127 QVBoxLayout *groupBoxLayout = new QVBoxLayout( groupBox->layout() );
128 m_output = new QMultiLineEdit( groupBox ); 128 m_output = new QMultiLineEdit( groupBox );
129 m_output->setReadOnly( true ); 129 m_output->setReadOnly( true );
130 groupBoxLayout->addWidget( m_output ); 130 groupBoxLayout->addWidget( m_output );
131 layout->addMultiCellWidget( groupBox, 2, 2, 0, 1 ); 131 layout->addMultiCellWidget( groupBox, 2, 2, 0, 1 );
132 132
133 QPixmap pic; 133 m_btnStart = new QPushButton( Opie::Core::OResource::loadPixmap( "packagemanager/apply",
134 pic.convertFromImage( Resource::loadImage( "packagemanager/apply" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 134 Opie::Core::OResource::SmallIcon ), tr( "Start" ), this );
135 m_btnStart = new QPushButton( pic, tr( "Start" ), this );
136 m_btnStart->setMinimumHeight( AppLnk::smallIconSize() ); 135 m_btnStart->setMinimumHeight( AppLnk::smallIconSize() );
137 layout->addWidget( m_btnStart, 3, 0 ); 136 layout->addWidget( m_btnStart, 3, 0 );
138 connect( m_btnStart, SIGNAL(clicked()), this, SLOT(slotBtnStart()) ); 137 connect( m_btnStart, SIGNAL(clicked()), this, SLOT(slotBtnStart()) );
139 138
140 pic.convertFromImage( Resource::loadImage( "SettingsIcon" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 139 m_btnOptions = new QPushButton( Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon ),
141 m_btnOptions = new QPushButton( pic, tr( "Options" ), this ); 140 tr( "Options" ), this );
142 m_btnOptions->setMinimumHeight( AppLnk::smallIconSize() ); 141 m_btnOptions->setMinimumHeight( AppLnk::smallIconSize() );
143 layout->addWidget( m_btnOptions, 3, 1 ); 142 layout->addWidget( m_btnOptions, 3, 1 );
144 connect( m_btnOptions, SIGNAL( clicked() ), this, SLOT(slotBtnOptions()) ); 143 connect( m_btnOptions, SIGNAL( clicked() ), this, SLOT(slotBtnOptions()) );
145 144
146 // Display packages being acted upon in output widget 145 // Display packages being acted upon in output widget
147 for( int i = 0; i < m_numCommands; i++ ) 146 for( int i = 0; i < m_numCommands; i++ )
148 { 147 {
149 if ( !m_packages[ i ].isEmpty() ) 148 if ( !m_packages[ i ].isEmpty() )
150 { 149 {
151 QString lineStr = tr( "Packages to " ); 150 QString lineStr = tr( "Packages to " );
152 151
153 switch( m_command[ i ] ) 152 switch( m_command[ i ] )
@@ -214,75 +213,68 @@ void InstallDlg::slotDisplayAvailSpace( const QString &destination )
214} 213}
215 214
216void InstallDlg::slotBtnStart() 215void InstallDlg::slotBtnStart()
217{ 216{
218 QString btnText = m_btnStart->text(); 217 QString btnText = m_btnStart->text();
219 if ( btnText == tr( "Abort" ) ) 218 if ( btnText == tr( "Abort" ) )
220 { 219 {
221 // Prevent unexecuted commands from executing 220 // Prevent unexecuted commands from executing
222 m_currCommand = 999; 221 m_currCommand = 999;
223 222
224 // Allow user to close dialog 223 // Allow user to close dialog
225 m_btnStart->setText( tr( "Close" ) ); 224 m_btnStart->setText( tr( "Close" ) );
226 QPixmap pic; 225 m_btnStart->setIconSet( Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ) );
227 pic.convertFromImage( Resource::loadImage( "close" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
228 m_btnStart->setIconSet( pic );
229 return; 226 return;
230 } 227 }
231 else if ( btnText == tr( "Close" ) ) 228 else if ( btnText == tr( "Close" ) )
232 { 229 {
233 // TODO - force reload of package data 230 // TODO - force reload of package data
234 emit closeInstallDlg(); 231 emit closeInstallDlg();
235 return; 232 return;
236 } 233 }
237 234
238 // Start was clicked, start executing 235 // Start was clicked, start executing
239 QString dest; 236 QString dest;
240 if ( m_installFound ) 237 if ( m_installFound )
241 { 238 {
242 dest = m_destination->currentText(); 239 dest = m_destination->currentText();
243 m_destination->setEnabled( false ); 240 m_destination->setEnabled( false );
244 } 241 }
245 242
246 m_btnOptions->setEnabled( false ); 243 m_btnOptions->setEnabled( false );
247 if ( m_numCommands > 1 ) 244 if ( m_numCommands > 1 )
248 { 245 {
249 m_btnStart->setText( tr( "Abort" ) ); 246 m_btnStart->setText( tr( "Abort" ) );
250 QPixmap pic; 247 m_btnStart->setIconSet( Opie::Core::OResource::loadPixmap( "reset", Opie::Core::OResource::SmallIcon ) );
251 pic.convertFromImage( Resource::loadImage( "reset" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
252 m_btnStart->setIconSet( pic );
253 } 248 }
254 else 249 else
255 { 250 {
256 m_btnStart->setEnabled( false ); 251 m_btnStart->setEnabled( false );
257 } 252 }
258 253
259 for ( m_currCommand = 0; m_currCommand < m_numCommands; m_currCommand++ ) 254 for ( m_currCommand = 0; m_currCommand < m_numCommands; m_currCommand++ )
260 { 255 {
261 // Execute next command 256 // Execute next command
262 m_packman->executeCommand( m_command[ m_currCommand ], m_packages[ m_currCommand ], dest, 257 m_packman->executeCommand( m_command[ m_currCommand ], m_packages[ m_currCommand ], dest,
263 this, SLOT(slotOutput(const QString &)), true ); 258 this, SLOT(slotOutput(const QString &)), true );
264 } 259 }
265 260
266 // All commands executed, allow user to close dialog 261 // All commands executed, allow user to close dialog
267 m_btnStart->setEnabled( true ); 262 m_btnStart->setEnabled( true );
268 m_btnStart->setText( tr( "Close" ) ); 263 m_btnStart->setText( tr( "Close" ) );
269 QPixmap pic; 264 m_btnStart->setIconSet( Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ) );
270 pic.convertFromImage( Resource::loadImage( "close" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
271 m_btnStart->setIconSet( pic );
272 265
273 m_btnOptions->setEnabled( true ); 266 m_btnOptions->setEnabled( true );
274 m_btnOptions->setText( tr( "Save output" ) ); 267 m_btnOptions->setText( tr( "Save output" ) );
275 pic.convertFromImage( Resource::loadImage( "save" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 268 m_btnOptions->setIconSet( Opie::Core::OResource::loadPixmap( "save", Opie::Core::OResource::SmallIcon ) );
276 m_btnOptions->setIconSet( pic );
277} 269}
278 270
279void InstallDlg::slotBtnOptions() 271void InstallDlg::slotBtnOptions()
280{ 272{
281 QString btnText = m_btnOptions->text(); 273 QString btnText = m_btnOptions->text();
282 if ( btnText == tr( "Options" ) ) 274 if ( btnText == tr( "Options" ) )
283 { 275 {
284 // Display configuration dialog (only options tab is enabled) 276 // Display configuration dialog (only options tab is enabled)
285 m_packman->configureDlg( true ); 277 m_packman->configureDlg( true );
286 return; 278 return;
287 } 279 }
288 280
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
@@ -27,54 +27,54 @@
27 Inc., 59 Temple Place - Suite 330, 27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA. 28 Boston, MA 02111-1307, USA.
29*/ 29*/
30 30
31#include "mainwindow.h" 31#include "mainwindow.h"
32#include "installdlg.h" 32#include "installdlg.h"
33#include "filterdlg.h" 33#include "filterdlg.h"
34#include "promptdlg.h" 34#include "promptdlg.h"
35#include "entrydlg.h" 35#include "entrydlg.h"
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>
46#include <qlayout.h> 46#include <qlayout.h>
47#include <qlineedit.h> 47#include <qlineedit.h>
48#include <qmenubar.h> 48#include <qmenubar.h>
49#include <qmessagebox.h> 49#include <qmessagebox.h>
50#include <qpopupmenu.h> 50#include <qpopupmenu.h>
51#include <qtimer.h> 51#include <qtimer.h>
52#include <qtoolbar.h> 52#include <qtoolbar.h>
53#include <qwhatsthis.h> 53#include <qwhatsthis.h>
54 54
55MainWindow::MainWindow( QWidget *parent, const char *name, WFlags /*fl*/ ) 55MainWindow::MainWindow( QWidget *parent, const char *name, WFlags /*fl*/ )
56 : QMainWindow( parent, name, WStyle_ContextHelp ) 56 : QMainWindow( parent, name, WStyle_ContextHelp )
57 , m_config( "packman" ) 57 , m_config( "packman" )
58 , m_packman( &m_config, this ) 58 , m_packman( &m_config, this )
59 , m_menuBar( this ) 59 , m_menuBar( this )
60 , m_toolBar( this ) 60 , m_toolBar( this )
61 , m_findBar( this ) 61 , m_findBar( this )
62 , m_widgetStack( this ) 62 , m_widgetStack( this )
63 , m_packageList( this ) 63 , m_packageList( this )
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 )
72 , m_filterDest( QString::null ) 72 , m_filterDest( QString::null )
73 , m_filterStatus( OPackageManager::NotDefined ) 73 , m_filterStatus( OPackageManager::NotDefined )
74 , m_filterCategory( QString::null ) 74 , m_filterCategory( QString::null )
75 75
76{ 76{
77// setCaption( tr( "Package Manager" ) ); 77// setCaption( tr( "Package Manager" ) );
78 78
79 m_iconNull.fill( colorGroup().base() ); 79 m_iconNull.fill( colorGroup().base() );
80 80
@@ -150,59 +150,64 @@ void MainWindow::initUI()
150 150
151 // Find toolbar 151 // Find toolbar
152 addToolBar( &m_findBar, QMainWindow::Top, true ); 152 addToolBar( &m_findBar, QMainWindow::Top, true );
153 m_findBar.setHorizontalStretchable( true ); 153 m_findBar.setHorizontalStretchable( true );
154 m_findEdit = new QLineEdit( &m_findBar ); 154 m_findEdit = new QLineEdit( &m_findBar );
155 QWhatsThis::add( m_findEdit, tr( "Type the text to search for here." ) ); 155 QWhatsThis::add( m_findEdit, tr( "Type the text to search for here." ) );
156 m_findBar.setStretchableWidget( m_findEdit ); 156 m_findBar.setStretchableWidget( m_findEdit );
157 connect( m_findEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotFindChanged(const QString&)) ); 157 connect( m_findEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotFindChanged(const QString&)) );
158 158
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 );
192 //a->addTo( &m_toolBar ); 196 //a->addTo( &m_toolBar );
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 );
200 mb->insertItem( tr( "Actions" ), popup ); 205 mb->insertItem( tr( "Actions" ), popup );
201 206
202 // View menu 207 // View menu
203 popup = new QPopupMenu( this ); 208 popup = new QPopupMenu( this );
204 209
205 m_actionShowNotInstalled = new QAction( tr( "Show packages not installed" ), QString::null, 0, this, 0 ); 210 m_actionShowNotInstalled = new QAction( tr( "Show packages not installed" ), QString::null, 0, this, 0 );
206 m_actionShowNotInstalled->setToggleAction( true ); 211 m_actionShowNotInstalled->setToggleAction( true );
207 m_actionShowNotInstalled->setWhatsThis( tr( "Tap here to show packages available which have not been installed." ) ); 212 m_actionShowNotInstalled->setWhatsThis( tr( "Tap here to show packages available which have not been installed." ) );
208 connect( m_actionShowNotInstalled, SIGNAL(activated()), this, SLOT(slotShowNotInstalled()) ); 213 connect( m_actionShowNotInstalled, SIGNAL(activated()), this, SLOT(slotShowNotInstalled()) );
@@ -213,54 +218,57 @@ void MainWindow::initUI()
213 m_actionShowInstalled->setWhatsThis( tr( "Tap here to show packages currently installed on this device." ) ); 218 m_actionShowInstalled->setWhatsThis( tr( "Tap here to show packages currently installed on this device." ) );
214 connect( m_actionShowInstalled, SIGNAL(activated()), this, SLOT(slotShowInstalled()) ); 219 connect( m_actionShowInstalled, SIGNAL(activated()), this, SLOT(slotShowInstalled()) );
215 m_actionShowInstalled->addTo( popup ); 220 m_actionShowInstalled->addTo( popup );
216 221
217 m_actionShowUpdated = new QAction( tr( "Show updated packages" ), QString::null, 0, this, 0 ); 222 m_actionShowUpdated = new QAction( tr( "Show updated packages" ), QString::null, 0, this, 0 );
218 m_actionShowUpdated->setToggleAction( true ); 223 m_actionShowUpdated->setToggleAction( true );
219 m_actionShowUpdated->setWhatsThis( tr( "Tap here to show packages currently installed on this device which have a newer version available." ) ); 224 m_actionShowUpdated->setWhatsThis( tr( "Tap here to show packages currently installed on this device which have a newer version available." ) );
220 connect( m_actionShowUpdated, SIGNAL(activated()), this, SLOT(slotShowUpdated()) ); 225 connect( m_actionShowUpdated, SIGNAL(activated()), this, SLOT(slotShowUpdated()) );
221 m_actionShowUpdated->addTo( popup ); 226 m_actionShowUpdated->addTo( popup );
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)) );
230 m_actionFilter->addTo( popup ); 235 m_actionFilter->addTo( popup );
231 236
232 a = new QAction( tr( "Filter settings" ), QString::null, 0, this, 0 ); 237 a = new QAction( tr( "Filter settings" ), QString::null, 0, this, 0 );
233 a->setWhatsThis( tr( "Tap here to change the package filter criteria." ) ); 238 a->setWhatsThis( tr( "Tap here to change the package filter criteria." ) );
234 connect( a, SIGNAL(activated()), this, SLOT(slotFilterChange()) ); 239 connect( a, SIGNAL(activated()), this, SLOT(slotFilterChange()) );
235 a->addTo( popup ); 240 a->addTo( popup );
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()) );
248 m_actionFindNext->addTo( popup ); 255 m_actionFindNext->addTo( popup );
249 m_actionFindNext->addTo( &m_findBar ); 256 m_actionFindNext->addTo( &m_findBar );
250 257
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 );
258 m_findBar.hide(); 266 m_findBar.hide();
259} 267}
260 268
261void MainWindow::loadPackageList( OPackageList *packages, bool clearList ) 269void MainWindow::loadPackageList( OPackageList *packages, bool clearList )
262{ 270{
263 if ( clearList ) 271 if ( clearList )
264 m_packageList.clear(); 272 m_packageList.clear();
265 273
266 if ( packages ) 274 if ( packages )
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.cpp b/noncore/settings/packagemanager/oipkgconfigdlg.cpp
index 945571f..58c572b 100644
--- a/noncore/settings/packagemanager/oipkgconfigdlg.cpp
+++ b/noncore/settings/packagemanager/oipkgconfigdlg.cpp
@@ -22,27 +22,27 @@
22:     =  ...= . :.=- 22:     =  ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU 23 -.   .:....=;==+<; You should have received a copy of the GNU
24  -_. . .   )=.  = Library General Public License along with 24  -_. . .   )=.  = Library General Public License along with
25    --        :-=` this library; see the file COPYING.LIB. 25    --        :-=` this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation, 26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330, 27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA. 28 Boston, MA 02111-1307, USA.
29*/ 29*/
30 30
31#include "oipkgconfigdlg.h" 31#include "oipkgconfigdlg.h"
32 32
33#include <opie2/ofiledialog.h> 33#include <opie2/ofiledialog.h>
34#include <opie2/oresource.h>
34 35
35#include <qpe/qpeapplication.h> 36#include <qpe/qpeapplication.h>
36#include <qpe/resource.h>
37 37
38#include <qcheckbox.h> 38#include <qcheckbox.h>
39#include <qcombobox.h> 39#include <qcombobox.h>
40#include <qgroupbox.h> 40#include <qgroupbox.h>
41#include <qlabel.h> 41#include <qlabel.h>
42#include <qlineedit.h> 42#include <qlineedit.h>
43#include <qlistbox.h> 43#include <qlistbox.h>
44#include <qpushbutton.h> 44#include <qpushbutton.h>
45#include <qscrollview.h> 45#include <qscrollview.h>
46#include <qwhatsthis.h> 46#include <qwhatsthis.h>
47 47
48OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *parent ) 48OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *parent )
@@ -173,43 +173,42 @@ void OIpkgConfigDlg::initServerWidget()
173 sv->setResizePolicy( QScrollView::AutoOneFit ); 173 sv->setResizePolicy( QScrollView::AutoOneFit );
174 sv->setFrameStyle( QFrame::NoFrame ); 174 sv->setFrameStyle( QFrame::NoFrame );
175 QWidget *container = new QWidget( sv->viewport() ); 175 QWidget *container = new QWidget( sv->viewport() );
176 sv->addChild( container ); 176 sv->addChild( container );
177 QGridLayout *layout = new QGridLayout( container, 2, 3, 2, 4 ); 177 QGridLayout *layout = new QGridLayout( container, 2, 3, 2, 4 );
178 178
179 m_serverList = new QListBox( container ); 179 m_serverList = new QListBox( container );
180 QWhatsThis::add( m_serverList, tr( "This is a list of all servers configured. Select one here to edit or delete, or add a new one below." ) ); 180 QWhatsThis::add( m_serverList, tr( "This is a list of all servers configured. Select one here to edit or delete, or add a new one below." ) );
181 m_serverList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); 181 m_serverList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) );
182 connect( m_serverList, SIGNAL(highlighted(int)), this, SLOT(slotServerSelected(int)) ); 182 connect( m_serverList, SIGNAL(highlighted(int)), this, SLOT(slotServerSelected(int)) );
183 layout->addMultiCellWidget( m_serverList, 0, 0, 0, 2 ); 183 layout->addMultiCellWidget( m_serverList, 0, 0, 0, 2 );
184 184
185 QPixmap pic; 185 QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ),
186 pic.convertFromImage( Resource::loadImage( "new" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 186 tr( "New" ), container );
187 QPushButton *btn = new QPushButton( pic, tr( "New" ), container ); 187 btn->setMinimumHeight( AppLnk::smallIconSize()+4 );
188 btn->setMinimumHeight( AppLnk::smallIconSize() );
189 QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) ); 188 QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) );
190 connect( btn, SIGNAL(clicked()), this, SLOT(slotServerNew()) ); 189 connect( btn, SIGNAL(clicked()), this, SLOT(slotServerNew()) );
191 layout->addWidget( btn, 1, 0 ); 190 layout->addWidget( btn, 1, 0 );
192 191
193 pic.convertFromImage( Resource::loadImage( "edit" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 192 m_serverEditBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ),
194 m_serverEditBtn = new QPushButton( pic, tr( "Edit" ), container ); 193 tr( "Edit" ), container );
195 m_serverEditBtn->setMinimumHeight( AppLnk::smallIconSize() ); 194 m_serverEditBtn->setMinimumHeight( AppLnk::smallIconSize()+4 );
196 m_serverEditBtn->setEnabled( false ); 195 m_serverEditBtn->setEnabled( false );
197 QWhatsThis::add( m_serverEditBtn, tr( "Tap here to edit the entry selected above." ) ); 196 QWhatsThis::add( m_serverEditBtn, tr( "Tap here to edit the entry selected above." ) );
198 connect( m_serverEditBtn, SIGNAL(clicked()), this, SLOT(slotServerEdit()) ); 197 connect( m_serverEditBtn, SIGNAL(clicked()), this, SLOT(slotServerEdit()) );
199 layout->addWidget( m_serverEditBtn, 1, 1 ); 198 layout->addWidget( m_serverEditBtn, 1, 1 );
200 199
201 pic.convertFromImage( Resource::loadImage( "trash" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 200 m_serverDeleteBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "trash", Opie::Core::OResource::SmallIcon ),
202 m_serverDeleteBtn = new QPushButton( pic, tr( "Delete" ), container ); 201 tr( "Delete" ), container );
203 m_serverDeleteBtn->setMinimumHeight( AppLnk::smallIconSize() ); 202 m_serverDeleteBtn->setMinimumHeight( AppLnk::smallIconSize()+4 );
204 m_serverDeleteBtn->setEnabled( false ); 203 m_serverDeleteBtn->setEnabled( false );
205 QWhatsThis::add( m_serverDeleteBtn, tr( "Tap here to delete the entry selected above." ) ); 204 QWhatsThis::add( m_serverDeleteBtn, tr( "Tap here to delete the entry selected above." ) );
206 connect( m_serverDeleteBtn, SIGNAL(clicked()), this, SLOT(slotServerDelete()) ); 205 connect( m_serverDeleteBtn, SIGNAL(clicked()), this, SLOT(slotServerDelete()) );
207 layout->addWidget( m_serverDeleteBtn, 1, 2 ); 206 layout->addWidget( m_serverDeleteBtn, 1, 2 );
208} 207}
209 208
210void OIpkgConfigDlg::initDestinationWidget() 209void OIpkgConfigDlg::initDestinationWidget()
211{ 210{
212 m_destWidget = new QWidget( this ); 211 m_destWidget = new QWidget( this );
213 212
214 // Initialize UI 213 // Initialize UI
215 QVBoxLayout *vb = new QVBoxLayout( m_destWidget ); 214 QVBoxLayout *vb = new QVBoxLayout( m_destWidget );
@@ -218,43 +217,42 @@ void OIpkgConfigDlg::initDestinationWidget()
218 sv->setResizePolicy( QScrollView::AutoOneFit ); 217 sv->setResizePolicy( QScrollView::AutoOneFit );
219 sv->setFrameStyle( QFrame::NoFrame ); 218 sv->setFrameStyle( QFrame::NoFrame );
220 QWidget *container = new QWidget( sv->viewport() ); 219 QWidget *container = new QWidget( sv->viewport() );
221 sv->addChild( container ); 220 sv->addChild( container );
222 QGridLayout *layout = new QGridLayout( container, 2, 3, 2, 4 ); 221 QGridLayout *layout = new QGridLayout( container, 2, 3, 2, 4 );
223 222
224 m_destList = new QListBox( container ); 223 m_destList = new QListBox( container );
225 QWhatsThis::add( m_destList, tr( "This is a list of all destinations configured for this device. Select one here to edit or delete, or add a new one below." ) ); 224 QWhatsThis::add( m_destList, tr( "This is a list of all destinations configured for this device. Select one here to edit or delete, or add a new one below." ) );
226 m_destList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); 225 m_destList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) );
227 connect( m_destList, SIGNAL(highlighted(int)), this, SLOT(slotDestSelected(int)) ); 226 connect( m_destList, SIGNAL(highlighted(int)), this, SLOT(slotDestSelected(int)) );
228 layout->addMultiCellWidget( m_destList, 0, 0, 0, 2 ); 227 layout->addMultiCellWidget( m_destList, 0, 0, 0, 2 );
229 228
230 QPixmap pic; 229 QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ),
231 pic.convertFromImage( Resource::loadImage( "new" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 230 tr( "New" ), container );
232 QPushButton *btn = new QPushButton( pic, tr( "New" ), container ); 231 btn->setMinimumHeight( AppLnk::smallIconSize()+4 );
233 btn->setMinimumHeight( AppLnk::smallIconSize() );
234 QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) ); 232 QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) );
235 connect( btn, SIGNAL(clicked()), this, SLOT(slotDestNew()) ); 233 connect( btn, SIGNAL(clicked()), this, SLOT(slotDestNew()) );
236 layout->addWidget( btn, 1, 0 ); 234 layout->addWidget( btn, 1, 0 );
237 235
238 pic.convertFromImage( Resource::loadImage( "edit" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 236 m_destEditBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ),
239 m_destEditBtn = new QPushButton( pic, tr( "Edit" ), container ); 237 tr( "Edit" ), container );
240 m_destEditBtn->setMinimumHeight( AppLnk::smallIconSize() ); 238 m_destEditBtn->setMinimumHeight( AppLnk::smallIconSize()+4 );
241 m_destEditBtn->setEnabled( false ); 239 m_destEditBtn->setEnabled( false );
242 QWhatsThis::add( m_destEditBtn, tr( "Tap here to edit the entry selected above." ) ); 240 QWhatsThis::add( m_destEditBtn, tr( "Tap here to edit the entry selected above." ) );
243 connect( m_destEditBtn, SIGNAL(clicked()), this, SLOT(slotDestEdit()) ); 241 connect( m_destEditBtn, SIGNAL(clicked()), this, SLOT(slotDestEdit()) );
244 layout->addWidget( m_destEditBtn, 1, 1 ); 242 layout->addWidget( m_destEditBtn, 1, 1 );
245 243
246 pic.convertFromImage( Resource::loadImage( "trash" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 244 m_destDeleteBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "trash", Opie::Core::OResource::SmallIcon ),
247 m_destDeleteBtn = new QPushButton( pic, tr( "Delete" ), container ); 245 tr( "Delete" ), container );
248 m_destDeleteBtn->setMinimumHeight( AppLnk::smallIconSize() ); 246 m_destDeleteBtn->setMinimumHeight( AppLnk::smallIconSize()+4 );
249 m_destDeleteBtn->setEnabled( false ); 247 m_destDeleteBtn->setEnabled( false );
250 QWhatsThis::add( m_destDeleteBtn, tr( "Tap here to delete the entry selected above." ) ); 248 QWhatsThis::add( m_destDeleteBtn, tr( "Tap here to delete the entry selected above." ) );
251 connect( m_destDeleteBtn, SIGNAL(clicked()), this, SLOT(slotDestDelete()) ); 249 connect( m_destDeleteBtn, SIGNAL(clicked()), this, SLOT(slotDestDelete()) );
252 layout->addWidget( m_destDeleteBtn, 1, 2 ); 250 layout->addWidget( m_destDeleteBtn, 1, 2 );
253} 251}
254 252
255void OIpkgConfigDlg::initProxyWidget() 253void OIpkgConfigDlg::initProxyWidget()
256{ 254{
257 m_proxyWidget = new QWidget( this ); 255 m_proxyWidget = new QWidget( this );
258 256
259 // Initialize UI 257 // Initialize UI
260 QVBoxLayout *vb = new QVBoxLayout( m_proxyWidget ); 258 QVBoxLayout *vb = new QVBoxLayout( m_proxyWidget );
@@ -348,27 +346,28 @@ void OIpkgConfigDlg::initOptionsWidget()
348 m_optVerboseIpkg->insertItem( tr( "Normal messages" ) ); 346 m_optVerboseIpkg->insertItem( tr( "Normal messages" ) );
349 m_optVerboseIpkg->insertItem( tr( "Informative messages" ) ); 347 m_optVerboseIpkg->insertItem( tr( "Informative messages" ) );
350 m_optVerboseIpkg->insertItem( tr( "Troubleshooting output" ) ); 348 m_optVerboseIpkg->insertItem( tr( "Troubleshooting output" ) );
351 layout->addMultiCellWidget( m_optVerboseIpkg, 5, 5, 0, 1 ); 349 layout->addMultiCellWidget( m_optVerboseIpkg, 5, 5, 0, 1 );
352 350
353 l = new QLabel( tr( "Package source lists directory:" ), container ); 351 l = new QLabel( tr( "Package source lists directory:" ), container );
354 QWhatsThis::add( l, tr( "Enter the directory where package source feed information is stored." ) ); 352 QWhatsThis::add( l, tr( "Enter the directory where package source feed information is stored." ) );
355 layout->addMultiCellWidget( l, 6, 6, 0, 1 ); 353 layout->addMultiCellWidget( l, 6, 6, 0, 1 );
356 354
357 m_optSourceLists = new QLineEdit( container ); 355 m_optSourceLists = new QLineEdit( container );
358 QWhatsThis::add( m_optSourceLists, tr( "Enter the directory where package source feed information is stored." ) ); 356 QWhatsThis::add( m_optSourceLists, tr( "Enter the directory where package source feed information is stored." ) );
359 layout->addWidget( m_optSourceLists, 7, 0 ); 357 layout->addWidget( m_optSourceLists, 7, 0 );
360 QPixmap pic; 358
361 pic.convertFromImage( Resource::loadImage( "folder" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 359 QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon ),
362 QPushButton *btn = new QPushButton( pic, QString::null, container ); 360 QString::null, container );
361 btn->setMinimumHeight( AppLnk::smallIconSize()+4 );
363 btn->setMaximumWidth( btn->height() ); 362 btn->setMaximumWidth( btn->height() );
364 QWhatsThis::add( btn, tr( "Tap here to select the directory where package source feed information is stored." ) ); 363 QWhatsThis::add( btn, tr( "Tap here to select the directory where package source feed information is stored." ) );
365 connect( btn, SIGNAL(clicked()), this, SLOT(slotOptSelectSourceListsPath()) ); 364 connect( btn, SIGNAL(clicked()), this, SLOT(slotOptSelectSourceListsPath()) );
366 layout->addWidget( btn, 7, 1 ); 365 layout->addWidget( btn, 7, 1 );
367 366
368 layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ) ); 367 layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
369} 368}
370 369
371void OIpkgConfigDlg::initData() 370void OIpkgConfigDlg::initData()
372{ 371{
373 // Read ipkg configuration (server/destination/proxy) information 372 // Read ipkg configuration (server/destination/proxy) information
374 if ( m_ipkg && !m_installOptions ) 373 if ( m_ipkg && !m_installOptions )
@@ -653,27 +652,26 @@ OIpkgDestDlg::OIpkgDestDlg( OConfItem *dest, QWidget *parent )
653 layout->addStretch(); 652 layout->addStretch();
654 653
655 label = new QLabel( tr( "Location:" ), this ); 654 label = new QLabel( tr( "Location:" ), this );
656 QWhatsThis::add( label, tr( "Enter the absolute directory path of this entry here." ) ); 655 QWhatsThis::add( label, tr( "Enter the absolute directory path of this entry here." ) );
657 layout->addWidget( label ); 656 layout->addWidget( label );
658 657
659 QHBoxLayout *layout2 = new QHBoxLayout( this, 2, 4 ); 658 QHBoxLayout *layout2 = new QHBoxLayout( this, 2, 4 );
660 layout->addLayout( layout2 ); 659 layout->addLayout( layout2 );
661 660
662 m_location = new QLineEdit( this ); 661 m_location = new QLineEdit( this );
663 QWhatsThis::add( m_location, tr( "Enter the absolute directory path of this entry here." ) ); 662 QWhatsThis::add( m_location, tr( "Enter the absolute directory path of this entry here." ) );
664 layout2->addWidget( m_location ); 663 layout2->addWidget( m_location );
665 QPixmap pic; 664 QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon ),
666 pic.convertFromImage( Resource::loadImage( "folder" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 665 QString::null, this );
667 QPushButton *btn = new QPushButton( pic, QString::null, this );
668 btn->setMaximumWidth( btn->height() ); 666 btn->setMaximumWidth( btn->height() );
669 QWhatsThis::add( btn, tr( "Tap here to select the desired location." ) ); 667 QWhatsThis::add( btn, tr( "Tap here to select the desired location." ) );
670 connect( btn, SIGNAL(clicked()), this, SLOT(slotSelectPath()) ); 668 connect( btn, SIGNAL(clicked()), this, SLOT(slotSelectPath()) );
671 layout2->addWidget( btn ); 669 layout2->addWidget( btn );
672 670
673 // Populate initial information 671 // Populate initial information
674 if ( m_dest ) 672 if ( m_dest )
675 { 673 {
676 m_name->setText( m_dest->name() ); 674 m_name->setText( m_dest->name() );
677 m_location->setText( m_dest->value() ); 675 m_location->setText( m_dest->value() );
678 m_active->setChecked( m_dest->active() ); 676 m_active->setChecked( m_dest->active() );
679 } 677 }
diff --git a/noncore/settings/packagemanager/packageinfodlg.cpp b/noncore/settings/packagemanager/packageinfodlg.cpp
index e034f34..8b1b203 100644
--- a/noncore/settings/packagemanager/packageinfodlg.cpp
+++ b/noncore/settings/packagemanager/packageinfodlg.cpp
@@ -23,28 +23,27 @@
23 -.   .:....=;==+<; You should have received a copy of the GNU 23 -.   .:....=;==+<; You should have received a copy of the GNU
24  -_. . .   )=.  = Library General Public License along with 24  -_. . .   )=.  = Library General Public License along with
25    --        :-=` this library; see the file COPYING.LIB. 25    --        :-=` this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation, 26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330, 27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA. 28 Boston, MA 02111-1307, USA.
29*/ 29*/
30 30
31#include "packageinfodlg.h" 31#include "packageinfodlg.h"
32#include "opackage.h" 32#include "opackage.h"
33#include "opackagemanager.h" 33#include "opackagemanager.h"
34 34
35#include <opie2/oresource.h>
35#include <opie2/otabwidget.h> 36#include <opie2/otabwidget.h>
36 37
37#include <qpe/resource.h>
38
39#include <qlayout.h> 38#include <qlayout.h>
40#include <qpushbutton.h> 39#include <qpushbutton.h>
41#include <qwhatsthis.h> 40#include <qwhatsthis.h>
42 41
43PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QString &package ) 42PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QString &package )
44 : QWidget( 0l ) 43 : QWidget( 0l )
45 , m_packman( pm ) 44 , m_packman( pm )
46 , m_information( this ) 45 , m_information( this )
47 , m_files( this ) 46 , m_files( this )
48 , m_retrieveFiles( 0l ) 47 , m_retrieveFiles( 0l )
49{ 48{
50 // Initialize UI 49 // Initialize UI
@@ -87,26 +86,27 @@ PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QStr
87 QWidget *filesWidget = new QWidget( tabWidget ); 86 QWidget *filesWidget = new QWidget( tabWidget );
88 QVBoxLayout *filesLayout = new QVBoxLayout( filesWidget, 2, 2 ); 87 QVBoxLayout *filesLayout = new QVBoxLayout( filesWidget, 2, 2 );
89 QWhatsThis::add( &m_files, tr( "This area contains a list of files contained in this package." ) ); 88 QWhatsThis::add( &m_files, tr( "This area contains a list of files contained in this package." ) );
90 m_files.reparent( filesWidget, QPoint( 0, 0 ) ); 89 m_files.reparent( filesWidget, QPoint( 0, 0 ) );
91 m_files.setReadOnly( true ); 90 m_files.setReadOnly( true );
92 filesLayout->addWidget( &m_files ); 91 filesLayout->addWidget( &m_files );
93 92
94 // If file list is already cached, display 93 // If file list is already cached, display
95 if ( !m_package->files().isNull() ) 94 if ( !m_package->files().isNull() )
96 m_files.setText( m_package->files() ); 95 m_files.setText( m_package->files() );
97 else 96 else
98 { 97 {
99 m_retrieveFiles = new QPushButton( Resource::loadPixmap( "packagemanager/apply" ), 98 m_retrieveFiles = new QPushButton( Opie::Core::OResource::loadPixmap( "packagemanager/apply",
100 tr( "Retrieve file list" ), filesWidget ); 99 Opie::Core::OResource::SmallIcon ), tr( "Retrieve file list" ),
100 filesWidget );
101 QWhatsThis::add( m_retrieveFiles, tr( "Tap here to retrieve list of files contained in this package." ) ); 101 QWhatsThis::add( m_retrieveFiles, tr( "Tap here to retrieve list of files contained in this package." ) );
102 filesLayout->addWidget( m_retrieveFiles ); 102 filesLayout->addWidget( m_retrieveFiles );
103 connect( m_retrieveFiles, SIGNAL(clicked()), this, SLOT(slotBtnFileScan()) ); 103 connect( m_retrieveFiles, SIGNAL(clicked()), this, SLOT(slotBtnFileScan()) );
104 } 104 }
105 105
106 tabWidget->addTab( filesWidget, "binary", tr( "File list" ) ); 106 tabWidget->addTab( filesWidget, "binary", tr( "File list" ) );
107 tabWidget->setCurrentTab( tr( "Information" ) ); 107 tabWidget->setCurrentTab( tr( "Information" ) );
108 108
109 } 109 }
110 else 110 else
111 m_files.hide(); 111 m_files.hide();
112} 112}