Diffstat (limited to 'noncore/settings/packagemanager/installdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/installdlg.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/noncore/settings/packagemanager/installdlg.cpp b/noncore/settings/packagemanager/installdlg.cpp index 36851b0..8aed10d 100644 --- a/noncore/settings/packagemanager/installdlg.cpp +++ b/noncore/settings/packagemanager/installdlg.cpp | |||
@@ -127,21 +127,23 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap | |||
127 | m_output = new QMultiLineEdit( groupBox ); | 127 | m_output = new QMultiLineEdit( groupBox ); |
128 | m_output->setReadOnly( true ); | 128 | m_output->setReadOnly( true ); |
129 | groupBoxLayout->addWidget( m_output ); | 129 | groupBoxLayout->addWidget( m_output ); |
130 | layout->addMultiCellWidget( groupBox, 2, 2, 0, 1 ); | 130 | layout->addMultiCellWidget( groupBox, 2, 2, 0, 1 ); |
131 | 131 | ||
132 | QPixmap pic; | 132 | QPixmap pic; |
133 | pic.convertFromImage( Resource::loadImage( "packagemanager/apply" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 133 | pic.convertFromImage( Resource::loadImage( "packagemanager/apply" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); |
134 | m_btnStart = new QPushButton( pic, tr( "Start" ), this ); | 134 | m_btnStart = new QPushButton( pic, tr( "Start" ), this ); |
135 | m_btnStart->setMinimumHeight( AppLnk::smallIconSize() ); | ||
135 | layout->addWidget( m_btnStart, 3, 0 ); | 136 | layout->addWidget( m_btnStart, 3, 0 ); |
136 | connect( m_btnStart, SIGNAL(clicked()), this, SLOT(slotBtnStart()) ); | 137 | connect( m_btnStart, SIGNAL(clicked()), this, SLOT(slotBtnStart()) ); |
137 | 138 | ||
138 | pic.convertFromImage( Resource::loadImage( "SettingsIcon" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 139 | pic.convertFromImage( Resource::loadImage( "SettingsIcon" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); |
139 | m_btnOptions = new QPushButton( pic, tr( "Options" ), this ); | 140 | m_btnOptions = new QPushButton( pic, tr( "Options" ), this ); |
141 | m_btnOptions->setMinimumHeight( AppLnk::smallIconSize() ); | ||
140 | layout->addWidget( m_btnOptions, 3, 1 ); | 142 | layout->addWidget( m_btnOptions, 3, 1 ); |
141 | connect( m_btnOptions, SIGNAL( clicked() ), this, SLOT(slotBtnOptions()) ); | 143 | connect( m_btnOptions, SIGNAL( clicked() ), this, SLOT(slotBtnOptions()) ); |
142 | 144 | ||
143 | // Display packages being acted upon in output widget | 145 | // Display packages being acted upon in output widget |
144 | for( int i = 0; i < m_numCommands; i++ ) | 146 | for( int i = 0; i < m_numCommands; i++ ) |
145 | { | 147 | { |
146 | if ( !m_packages[ i ].isEmpty() ) | 148 | if ( !m_packages[ i ].isEmpty() ) |
147 | { | 149 | { |
@@ -216,17 +218,17 @@ void InstallDlg::slotBtnStart() | |||
216 | if ( btnText == tr( "Abort" ) ) | 218 | if ( btnText == tr( "Abort" ) ) |
217 | { | 219 | { |
218 | // Prevent unexecuted commands from executing | 220 | // Prevent unexecuted commands from executing |
219 | m_currCommand = 999; | 221 | m_currCommand = 999; |
220 | 222 | ||
221 | // Allow user to close dialog | 223 | // Allow user to close dialog |
222 | m_btnStart->setText( tr( "Close" ) ); | 224 | m_btnStart->setText( tr( "Close" ) ); |
223 | QPixmap pic; | 225 | QPixmap pic; |
224 | pic.convertFromImage( Resource::loadImage( "enter" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 226 | pic.convertFromImage( Resource::loadImage( "close" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); |
225 | m_btnStart->setIconSet( pic ); | 227 | m_btnStart->setIconSet( pic ); |
226 | return; | 228 | return; |
227 | } | 229 | } |
228 | else if ( btnText == tr( "Close" ) ) | 230 | else if ( btnText == tr( "Close" ) ) |
229 | { | 231 | { |
230 | // TODO - force reload of package data | 232 | // TODO - force reload of package data |
231 | emit closeInstallDlg(); | 233 | emit closeInstallDlg(); |
232 | return; | 234 | return; |
@@ -240,17 +242,17 @@ void InstallDlg::slotBtnStart() | |||
240 | m_destination->setEnabled( false ); | 242 | m_destination->setEnabled( false ); |
241 | } | 243 | } |
242 | 244 | ||
243 | m_btnOptions->setEnabled( false ); | 245 | m_btnOptions->setEnabled( false ); |
244 | if ( m_numCommands > 1 ) | 246 | if ( m_numCommands > 1 ) |
245 | { | 247 | { |
246 | m_btnStart->setText( tr( "Abort" ) ); | 248 | m_btnStart->setText( tr( "Abort" ) ); |
247 | QPixmap pic; | 249 | QPixmap pic; |
248 | pic.convertFromImage( Resource::loadImage( "close" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 250 | pic.convertFromImage( Resource::loadImage( "reset" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); |
249 | m_btnStart->setIconSet( pic ); | 251 | m_btnStart->setIconSet( pic ); |
250 | } | 252 | } |
251 | else | 253 | else |
252 | { | 254 | { |
253 | m_btnStart->setEnabled( false ); | 255 | m_btnStart->setEnabled( false ); |
254 | } | 256 | } |
255 | 257 | ||
256 | for ( m_currCommand = 0; m_currCommand < m_numCommands; m_currCommand++ ) | 258 | for ( m_currCommand = 0; m_currCommand < m_numCommands; m_currCommand++ ) |
@@ -259,17 +261,17 @@ void InstallDlg::slotBtnStart() | |||
259 | m_packman->executeCommand( m_command[ m_currCommand ], m_packages[ m_currCommand ], dest, | 261 | m_packman->executeCommand( m_command[ m_currCommand ], m_packages[ m_currCommand ], dest, |
260 | this, SLOT(slotOutput(const QString &)), true ); | 262 | this, SLOT(slotOutput(const QString &)), true ); |
261 | } | 263 | } |
262 | 264 | ||
263 | // All commands executed, allow user to close dialog | 265 | // All commands executed, allow user to close dialog |
264 | m_btnStart->setEnabled( true ); | 266 | m_btnStart->setEnabled( true ); |
265 | m_btnStart->setText( tr( "Close" ) ); | 267 | m_btnStart->setText( tr( "Close" ) ); |
266 | QPixmap pic; | 268 | QPixmap pic; |
267 | pic.convertFromImage( Resource::loadImage( "enter" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 269 | pic.convertFromImage( Resource::loadImage( "close" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); |
268 | m_btnStart->setIconSet( pic ); | 270 | m_btnStart->setIconSet( pic ); |
269 | 271 | ||
270 | m_btnOptions->setEnabled( true ); | 272 | m_btnOptions->setEnabled( true ); |
271 | m_btnOptions->setText( tr( "Save output" ) ); | 273 | m_btnOptions->setText( tr( "Save output" ) ); |
272 | pic.convertFromImage( Resource::loadImage( "save" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 274 | pic.convertFromImage( Resource::loadImage( "save" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); |
273 | m_btnOptions->setIconSet( pic ); | 275 | m_btnOptions->setIconSet( pic ); |
274 | } | 276 | } |
275 | 277 | ||