author | tille <tille> | 2002-04-28 01:35:36 (UTC) |
---|---|---|
committer | tille <tille> | 2002-04-28 01:35:36 (UTC) |
commit | 61cc74e0e4602d0df07b250f2786f0f0e96da28f (patch) (unidiff) | |
tree | 7fab7d278163082856f0561ec9e451922f6066e3 | |
parent | a64cc0ad0574ae1e15c4965d2557c3e06cc3fd65 (diff) | |
download | opie-61cc74e0e4602d0df07b250f2786f0f0e96da28f.zip opie-61cc74e0e4602d0df07b250f2786f0f0e96da28f.tar.gz opie-61cc74e0e4602d0df07b250f2786f0f0e96da28f.tar.bz2 |
gui fixes
-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.cpp | 16 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.h | 2 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pksettings.cpp | 4 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 24 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.h | 1 |
5 files changed, 33 insertions, 14 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp index 6bf9a7a..c95f482 100644 --- a/noncore/unsupported/oipkg/mainwindow.cpp +++ b/noncore/unsupported/oipkg/mainwindow.cpp | |||
@@ -21,4 +21,5 @@ | |||
21 | #include <qtabwidget.h> | 21 | #include <qtabwidget.h> |
22 | #include <qcombobox.h> | 22 | #include <qcombobox.h> |
23 | #include <qmessagebox.h> | ||
23 | #include <qlayout.h> | 24 | #include <qlayout.h> |
24 | 25 | ||
@@ -26,4 +27,5 @@ | |||
26 | #include "packagelistitem.h" | 27 | #include "packagelistitem.h" |
27 | 28 | ||
29 | |||
28 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) : | 30 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) : |
29 | QMainWindow( parent, name, f ) | 31 | QMainWindow( parent, name, f ) |
@@ -36,4 +38,8 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) : | |||
36 | setCaption( tr("Package Manager") ); | 38 | setCaption( tr("Package Manager") ); |
37 | 39 | ||
40 | //wait = new QMessageBox(tr("oipkg"),tr("Please wait")//,QMessageBox::Information,QMessageBox::NoButton,QMessageBox::NoButton,QMessageBox::NoButton); | ||
41 | wait = new QMessageBox(this); | ||
42 | wait->setText(tr("Please wait")); | ||
43 | |||
38 | channel = new QCopChannel( "QPE/Application/oipkg", this ); | 44 | channel = new QCopChannel( "QPE/Application/oipkg", this ); |
39 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), | 45 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), |
@@ -195,4 +201,5 @@ void MainWindow::runIpkg() | |||
195 | void MainWindow::updateList() | 201 | void MainWindow::updateList() |
196 | { | 202 | { |
203 | wait->show(); | ||
197 | QTimer *t = new QTimer( this ); | 204 | QTimer *t = new QTimer( this ); |
198 | connect( t, SIGNAL(timeout()), SLOT( rotateUpdateIcon() ) ); | 205 | connect( t, SIGNAL(timeout()), SLOT( rotateUpdateIcon() ) ); |
@@ -201,22 +208,29 @@ void MainWindow::updateList() | |||
201 | ipkg->update(); | 208 | ipkg->update(); |
202 | getList(); | 209 | getList(); |
203 | t->stop(); | 210 | t->stop(); |
211 | wait->hide(); | ||
212 | |||
204 | } | 213 | } |
205 | 214 | ||
206 | void MainWindow::getList() | 215 | void MainWindow::getList() |
207 | { | 216 | { |
217 | wait->show(); | ||
208 | packageList.update(); | 218 | packageList.update(); |
209 | displayList(); | 219 | displayList(); |
220 | wait->hide(); | ||
210 | } | 221 | } |
211 | 222 | ||
212 | void MainWindow::filterList() | 223 | void MainWindow::filterList() |
213 | { | 224 | { |
225 | wait->show(); | ||
214 | QString f = ""; | 226 | QString f = ""; |
215 | if ( findAction->isOn() ) f = findEdit->text(); | 227 | if ( findAction->isOn() ) f = findEdit->text(); |
216 | packageList.filterPackages( f ); | 228 | packageList.filterPackages( f ); |
229 | wait->hide(); | ||
217 | } | 230 | } |
218 | 231 | ||
219 | void MainWindow::displayList() | 232 | void MainWindow::displayList() |
220 | { | 233 | { |
234 | wait->hide(); | ||
221 | filterList(); | 235 | filterList(); |
222 | listViewPackages->clear(); | 236 | listViewPackages->clear(); |
diff --git a/noncore/unsupported/oipkg/mainwindow.h b/noncore/unsupported/oipkg/mainwindow.h index bcb0cc9..a713d00 100644 --- a/noncore/unsupported/oipkg/mainwindow.h +++ b/noncore/unsupported/oipkg/mainwindow.h | |||
@@ -17,4 +17,5 @@ class QLineEdit; | |||
17 | class PackageListItem; | 17 | class PackageListItem; |
18 | class QCopChannel; | 18 | class QCopChannel; |
19 | class QMessageBox; | ||
19 | 20 | ||
20 | class MainWindow : public QMainWindow | 21 | class MainWindow : public QMainWindow |
@@ -70,4 +71,5 @@ private: | |||
70 | QComboBox *section; | 71 | QComboBox *section; |
71 | QComboBox *subsection; | 72 | QComboBox *subsection; |
73 | QMessageBox *wait; | ||
72 | private slots: | 74 | private slots: |
73 | void rotateUpdateIcon(); | 75 | void rotateUpdateIcon(); |
diff --git a/noncore/unsupported/oipkg/pksettings.cpp b/noncore/unsupported/oipkg/pksettings.cpp index f84a9c4..be01837 100644 --- a/noncore/unsupported/oipkg/pksettings.cpp +++ b/noncore/unsupported/oipkg/pksettings.cpp | |||
@@ -295,7 +295,7 @@ void PackageManagerSettings::readInstallationSetting(int setting) | |||
295 | { | 295 | { |
296 | if ( activeDestination->text( i ) == dest ) | 296 | if ( activeDestination->text( i ) == dest ) |
297 | activeDestination->setCurrentItem( i ); | 297 | activeDestination->setCurrentItem( i ); |
298 | if ( activeLinkDestination->text( i ) == linkdest ) | 298 | if ( activeLinkDestination->text( i ) == linkdest ) |
299 | activeLinkDestination->setCurrentItem( i ); | 299 | activeLinkDestination->setCurrentItem( i ); |
300 | } | 300 | } |
301 | } | 301 | } |
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index f0992f5..ecc97b2 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp | |||
@@ -203,6 +203,6 @@ void PmIpkg::commit( PackageList pl ) | |||
203 | void PmIpkg::startDialog() | 203 | void PmIpkg::startDialog() |
204 | { | 204 | { |
205 | QDialog *d = new QDialog(); | 205 | installDialog = new QDialog(0,0,true); |
206 | QGridLayout *RunWindowLayout = new QGridLayout( d ); | 206 | QGridLayout *RunWindowLayout = new QGridLayout( installDialog ); |
207 | RunWindowLayout->setSpacing( 2 ); | 207 | RunWindowLayout->setSpacing( 2 ); |
208 | RunWindowLayout->setMargin( 2 ); | 208 | RunWindowLayout->setMargin( 2 ); |
@@ -212,5 +212,5 @@ void PmIpkg::startDialog() | |||
212 | buttons->setMargin( 0 ); | 212 | buttons->setMargin( 0 ); |
213 | 213 | ||
214 | PackageListView *plv = new PackageListView(d, "install",settings); | 214 | PackageListView *plv = new PackageListView(installDialog, "install",settings); |
215 | RunWindowLayout->addWidget( plv, 1, 0 ); | 215 | RunWindowLayout->addWidget( plv, 1, 0 ); |
216 | for (Package *it=to_remove.first(); it != 0; it=to_remove.next() ) | 216 | for (Package *it=to_remove.first(); it != 0; it=to_remove.next() ) |
@@ -222,5 +222,5 @@ void PmIpkg::startDialog() | |||
222 | plv->insertItem( new PackageListItem(plv, it,settings) ); | 222 | plv->insertItem( new PackageListItem(plv, it,settings) ); |
223 | } | 223 | } |
224 | QPushButton *doItButton = new QPushButton( d, "doItButton" ); | 224 | QPushButton *doItButton = new QPushButton( installDialog, "doItButton" ); |
225 | doItButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, doItButton->sizePolicy().hasHeightForWidth() ) ); | 225 | doItButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, doItButton->sizePolicy().hasHeightForWidth() ) ); |
226 | QFont doItButton_font( doItButton->font() ); | 226 | QFont doItButton_font( doItButton->font() ); |
@@ -231,5 +231,5 @@ void PmIpkg::startDialog() | |||
231 | buttons->addWidget( doItButton ); | 231 | buttons->addWidget( doItButton ); |
232 | 232 | ||
233 | QPushButton *installButton = new QPushButton( d, "installButton" ); | 233 | QPushButton *installButton = new QPushButton( installDialog, "installButton" ); |
234 | QFont installButton_font( installButton->font() ); | 234 | QFont installButton_font( installButton->font() ); |
235 | installButton_font.setPointSize( 8 ); | 235 | installButton_font.setPointSize( 8 ); |
@@ -239,5 +239,5 @@ void PmIpkg::startDialog() | |||
239 | buttons->addWidget( installButton ); | 239 | buttons->addWidget( installButton ); |
240 | 240 | ||
241 | QPushButton *removeButton = new QPushButton( d, "removeButton" ); | 241 | QPushButton *removeButton = new QPushButton( installDialog, "removeButton" ); |
242 | QFont removeButton_font( removeButton->font() ); | 242 | QFont removeButton_font( removeButton->font() ); |
243 | removeButton_font.setPointSize( 7 ); | 243 | removeButton_font.setPointSize( 7 ); |
@@ -247,5 +247,5 @@ void PmIpkg::startDialog() | |||
247 | buttons->addWidget( removeButton ); | 247 | buttons->addWidget( removeButton ); |
248 | 248 | ||
249 | QPushButton *cancelButton = new QPushButton( d, "cancelButton" ); | 249 | QPushButton *cancelButton = new QPushButton( installDialog, "cancelButton" ); |
250 | QFont cancelButton_font( cancelButton->font() ); | 250 | QFont cancelButton_font( cancelButton->font() ); |
251 | cancelButton_font.setPointSize( 8 ); | 251 | cancelButton_font.setPointSize( 8 ); |
@@ -264,8 +264,8 @@ void PmIpkg::startDialog() | |||
264 | this, SLOT( remove() ) ); | 264 | this, SLOT( remove() ) ); |
265 | connect( cancelButton, SIGNAL( clicked() ), | 265 | connect( cancelButton, SIGNAL( clicked() ), |
266 | d, SLOT( close() ) ); | 266 | installDialog, SLOT( close() ) ); |
267 | d->showMaximized(); | 267 | installDialog->showMaximized(); |
268 | d->exec(); | 268 | if ( installDialog->exec() ) doIt(); |
269 | // d->close(); | 269 | installDialog->close(); |
270 | } | 270 | } |
271 | 271 | ||
@@ -280,4 +280,5 @@ void PmIpkg::remove() | |||
280 | { | 280 | { |
281 | if ( to_remove.count() == 0 ) return; | 281 | if ( to_remove.count() == 0 ) return; |
282 | installDialog->close(); | ||
282 | show( true ); | 283 | show( true ); |
283 | 284 | ||
@@ -301,4 +302,5 @@ void PmIpkg::install() | |||
301 | { | 302 | { |
302 | if ( to_install.count() == 0 ) return; | 303 | if ( to_install.count() == 0 ) return; |
304 | installDialog->close(); | ||
303 | show( true ); | 305 | show( true ); |
304 | out("<hr><hr><b>"+tr("Installing")+"<br>"+tr("please wait")+"</b><br>"); | 306 | out("<hr><hr><b>"+tr("Installing")+"<br>"+tr("please wait")+"</b><br>"); |
diff --git a/noncore/unsupported/oipkg/pmipkg.h b/noncore/unsupported/oipkg/pmipkg.h index f70283e..c5e6255 100644 --- a/noncore/unsupported/oipkg/pmipkg.h +++ b/noncore/unsupported/oipkg/pmipkg.h | |||
@@ -29,4 +29,5 @@ private: | |||
29 | PackageManagerSettings* settings; | 29 | PackageManagerSettings* settings; |
30 | RunWindow *runwindow; | 30 | RunWindow *runwindow; |
31 | QDialog *installDialog; | ||
31 | QList<Package> to_remove; | 32 | QList<Package> to_remove; |
32 | QList<Package> to_install; | 33 | QList<Package> to_install; |