Diffstat (limited to 'noncore/settings/aqpkg/installdlgimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/installdlgimpl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/settings/aqpkg/installdlgimpl.cpp b/noncore/settings/aqpkg/installdlgimpl.cpp index 1f0bb5f..2bb8b4d 100644 --- a/noncore/settings/aqpkg/installdlgimpl.cpp +++ b/noncore/settings/aqpkg/installdlgimpl.cpp | |||
@@ -162,95 +162,96 @@ void InstallDlgImpl :: init( bool displayextrainfo ) | |||
162 | QLabel *label2 = new QLabel( tr( "Space Avail" ), this ); | 162 | QLabel *label2 = new QLabel( tr( "Space Avail" ), this ); |
163 | layout->addWidget( label2, 1, 0 ); | 163 | layout->addWidget( label2, 1, 0 ); |
164 | txtAvailableSpace = new QLabel( "", this ); | 164 | txtAvailableSpace = new QLabel( "", this ); |
165 | layout->addWidget( txtAvailableSpace, 1, 1 ); | 165 | layout->addWidget( txtAvailableSpace, 1, 1 ); |
166 | } | 166 | } |
167 | else | 167 | else |
168 | { | 168 | { |
169 | destination = 0x0; | 169 | destination = 0x0; |
170 | txtAvailableSpace = 0x0; | 170 | txtAvailableSpace = 0x0; |
171 | } | 171 | } |
172 | 172 | ||
173 | QGroupBox *GroupBox2 = new QGroupBox( 0, Qt::Vertical, tr( "Output" ), this ); | 173 | QGroupBox *GroupBox2 = new QGroupBox( 0, Qt::Vertical, tr( "Output" ), this ); |
174 | GroupBox2->layout()->setSpacing( 0 ); | 174 | GroupBox2->layout()->setSpacing( 0 ); |
175 | GroupBox2->layout()->setMargin( 4 ); | 175 | GroupBox2->layout()->setMargin( 4 ); |
176 | 176 | ||
177 | QVBoxLayout *GroupBox2Layout = new QVBoxLayout( GroupBox2->layout() ); | 177 | QVBoxLayout *GroupBox2Layout = new QVBoxLayout( GroupBox2->layout() ); |
178 | output = new QMultiLineEdit( GroupBox2 ); | 178 | output = new QMultiLineEdit( GroupBox2 ); |
179 | GroupBox2Layout->addWidget( output ); | 179 | GroupBox2Layout->addWidget( output ); |
180 | layout->addMultiCellWidget( GroupBox2, 2, 2, 0, 1 ); | 180 | layout->addMultiCellWidget( GroupBox2, 2, 2, 0, 1 ); |
181 | 181 | ||
182 | btnInstall = new QPushButton( Resource::loadPixmap( "aqpkg/apply" ), tr( "Start" ), this ); | 182 | btnInstall = new QPushButton( Resource::loadPixmap( "aqpkg/apply" ), tr( "Start" ), this ); |
183 | layout->addWidget( btnInstall, 3, 0 ); | 183 | layout->addWidget( btnInstall, 3, 0 ); |
184 | connect( btnInstall, SIGNAL( clicked() ), this, SLOT( installSelected() ) ); | 184 | connect( btnInstall, SIGNAL( clicked() ), this, SLOT( installSelected() ) ); |
185 | 185 | ||
186 | btnOptions = new QPushButton( Resource::loadPixmap( "aqpkg/config" ), tr( "Options" ), this ); | 186 | btnOptions = new QPushButton( Resource::loadPixmap( "SettingsIcon" ), tr( "Options" ), this ); |
187 | layout->addWidget( btnOptions, 3, 1 ); | 187 | layout->addWidget( btnOptions, 3, 1 ); |
188 | connect( btnOptions, SIGNAL( clicked() ), this, SLOT( optionsSelected() ) ); | 188 | connect( btnOptions, SIGNAL( clicked() ), this, SLOT( optionsSelected() ) ); |
189 | } | 189 | } |
190 | 190 | ||
191 | void InstallDlgImpl :: optionsSelected() | 191 | void InstallDlgImpl :: optionsSelected() |
192 | { | 192 | { |
193 | InstallOptionsDlgImpl opt( flags, this, "Option", true ); | 193 | InstallOptionsDlgImpl opt( flags, this, "Option", true ); |
194 | opt.exec(); | 194 | opt.exec(); |
195 | 195 | ||
196 | // set options selected from dialog | 196 | // set options selected from dialog |
197 | flags = opt.getFlags(); | 197 | flags = opt.getFlags(); |
198 | 198 | ||
199 | #ifdef QWS | 199 | #ifdef QWS |
200 | Config cfg( "aqpkg" ); | 200 | Config cfg( "aqpkg" ); |
201 | cfg.setGroup( "settings" ); | 201 | cfg.setGroup( "settings" ); |
202 | cfg.writeEntry( "installFlags", flags ); | 202 | cfg.writeEntry( "installFlags", flags ); |
203 | #endif | 203 | #endif |
204 | } | 204 | } |
205 | 205 | ||
206 | void InstallDlgImpl :: installSelected() | 206 | void InstallDlgImpl :: installSelected() |
207 | { | 207 | { |
208 | if ( btnInstall->text() == tr( "Abort" ) ) | 208 | if ( btnInstall->text() == tr( "Abort" ) ) |
209 | { | 209 | { |
210 | if ( pIpkg ) | 210 | if ( pIpkg ) |
211 | { | 211 | { |
212 | displayText( tr( "\n**** User Clicked ABORT ***" ) ); | 212 | displayText( tr( "\n**** User Clicked ABORT ***" ) ); |
213 | pIpkg->abort(); | 213 | pIpkg->abort(); |
214 | displayText( tr( "**** Process Aborted ****" ) ); | 214 | displayText( tr( "**** Process Aborted ****" ) ); |
215 | } | 215 | } |
216 | 216 | ||
217 | btnInstall->setText( tr( "Close" ) ); | 217 | btnInstall->setText( tr( "Close" ) ); |
218 | btnInstall->setIconSet( Resource::loadPixmap( "enter" ) ); | 218 | btnInstall->setIconSet( Resource::loadPixmap( "enter" ) ); |
219 | return; | 219 | return; |
220 | } | 220 | } |
221 | else if ( btnInstall->text() == tr( "Close" ) ) | 221 | else if ( btnInstall->text() == tr( "Close" ) ) |
222 | { | 222 | { |
223 | emit reloadData( this ); | 223 | emit reloadData( this ); |
224 | return; | 224 | return; |
225 | } | 225 | } |
226 | 226 | ||
227 | // Disable buttons | 227 | // Disable buttons |
228 | btnOptions->setEnabled( false ); | 228 | btnOptions->setEnabled( false ); |
229 | // btnInstall->setEnabled( false ); | 229 | // btnInstall->setEnabled( false ); |
230 | 230 | ||
231 | btnInstall->setText( tr( "Abort" ) ); | 231 | btnInstall->setText( tr( "Abort" ) ); |
232 | btnInstall->setIconSet( Resource::loadPixmap( "close" ) ); | 232 | btnInstall->setIconSet( Resource::loadPixmap( "close" ) ); |
233 | |||
233 | if ( pIpkg ) | 234 | if ( pIpkg ) |
234 | { | 235 | { |
235 | output->setText( "" ); | 236 | output->setText( "" ); |
236 | connect( pIpkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &))); | 237 | connect( pIpkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &))); |
237 | pIpkg->runIpkg(); | 238 | pIpkg->runIpkg(); |
238 | } | 239 | } |
239 | else | 240 | else |
240 | { | 241 | { |
241 | output->setText( "" ); | 242 | output->setText( "" ); |
242 | Destination *d = dataMgr->getDestination( destination->currentText() ); | 243 | Destination *d = dataMgr->getDestination( destination->currentText() ); |
243 | QString dest = d->getDestinationName(); | 244 | QString dest = d->getDestinationName(); |
244 | QString destDir = d->getDestinationPath(); | 245 | QString destDir = d->getDestinationPath(); |
245 | int instFlags = flags; | 246 | int instFlags = flags; |
246 | if ( d->linkToRoot() ) | 247 | if ( d->linkToRoot() ) |
247 | instFlags |= MAKE_LINKS; | 248 | instFlags |= MAKE_LINKS; |
248 | 249 | ||
249 | #ifdef QWS | 250 | #ifdef QWS |
250 | // Save settings | 251 | // Save settings |
251 | Config cfg( "aqpkg" ); | 252 | Config cfg( "aqpkg" ); |
252 | cfg.setGroup( "settings" ); | 253 | cfg.setGroup( "settings" ); |
253 | cfg.writeEntry( "dest", dest ); | 254 | cfg.writeEntry( "dest", dest ); |
254 | #endif | 255 | #endif |
255 | 256 | ||
256 | pIpkg = new Ipkg; | 257 | pIpkg = new Ipkg; |