summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp16
-rw-r--r--noncore/unsupported/oipkg/mainwindow.h2
-rw-r--r--noncore/unsupported/oipkg/pksettings.cpp4
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp24
-rw-r--r--noncore/unsupported/oipkg/pmipkg.h1
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 @@
#include <qtabwidget.h>
#include <qcombobox.h>
+#include <qmessagebox.h>
#include <qlayout.h>
@@ -26,4 +27,5 @@
#include "packagelistitem.h"
+
MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) :
QMainWindow( parent, name, f )
@@ -36,4 +38,8 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) :
setCaption( tr("Package Manager") );
+// wait = new QMessageBox(tr("oipkg"),tr("Please wait")//,QMessageBox::Information,QMessageBox::NoButton,QMessageBox::NoButton,QMessageBox::NoButton);
+ wait = new QMessageBox(this);
+ wait->setText(tr("Please wait"));
+
channel = new QCopChannel( "QPE/Application/oipkg", this );
connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
@@ -195,4 +201,5 @@ void MainWindow::runIpkg()
void MainWindow::updateList()
{
+ wait->show();
QTimer *t = new QTimer( this );
connect( t, SIGNAL(timeout()), SLOT( rotateUpdateIcon() ) );
@@ -201,22 +208,29 @@ void MainWindow::updateList()
ipkg->update();
getList();
- t->stop();
+ t->stop();
+ wait->hide();
+
}
void MainWindow::getList()
{
+ wait->show();
packageList.update();
displayList();
+ wait->hide();
}
void MainWindow::filterList()
{
+ wait->show();
QString f = "";
if ( findAction->isOn() ) f = findEdit->text();
packageList.filterPackages( f );
+ wait->hide();
}
void MainWindow::displayList()
{
+ wait->hide();
filterList();
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;
class PackageListItem;
class QCopChannel;
+class QMessageBox;
class MainWindow : public QMainWindow
@@ -70,4 +71,5 @@ private:
QComboBox *section;
QComboBox *subsection;
+ QMessageBox *wait;
private slots:
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)
{
if ( activeDestination->text( i ) == dest )
- activeDestination->setCurrentItem( i );
+ activeDestination->setCurrentItem( i );
if ( activeLinkDestination->text( i ) == linkdest )
- activeLinkDestination->setCurrentItem( i );
+ activeLinkDestination->setCurrentItem( i );
}
}
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 )
void PmIpkg::startDialog()
{
- QDialog *d = new QDialog();
- QGridLayout *RunWindowLayout = new QGridLayout( d );
+ installDialog = new QDialog(0,0,true);
+ QGridLayout *RunWindowLayout = new QGridLayout( installDialog );
RunWindowLayout->setSpacing( 2 );
RunWindowLayout->setMargin( 2 );
@@ -212,5 +212,5 @@ void PmIpkg::startDialog()
buttons->setMargin( 0 );
- PackageListView *plv = new PackageListView(d, "install",settings);
+ PackageListView *plv = new PackageListView(installDialog, "install",settings);
RunWindowLayout->addWidget( plv, 1, 0 );
for (Package *it=to_remove.first(); it != 0; it=to_remove.next() )
@@ -222,5 +222,5 @@ void PmIpkg::startDialog()
plv->insertItem( new PackageListItem(plv, it,settings) );
}
- QPushButton *doItButton = new QPushButton( d, "doItButton" );
+ QPushButton *doItButton = new QPushButton( installDialog, "doItButton" );
doItButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, doItButton->sizePolicy().hasHeightForWidth() ) );
QFont doItButton_font( doItButton->font() );
@@ -231,5 +231,5 @@ void PmIpkg::startDialog()
buttons->addWidget( doItButton );
- QPushButton *installButton = new QPushButton( d, "installButton" );
+ QPushButton *installButton = new QPushButton( installDialog, "installButton" );
QFont installButton_font( installButton->font() );
installButton_font.setPointSize( 8 );
@@ -239,5 +239,5 @@ void PmIpkg::startDialog()
buttons->addWidget( installButton );
- QPushButton *removeButton = new QPushButton( d, "removeButton" );
+ QPushButton *removeButton = new QPushButton( installDialog, "removeButton" );
QFont removeButton_font( removeButton->font() );
removeButton_font.setPointSize( 7 );
@@ -247,5 +247,5 @@ void PmIpkg::startDialog()
buttons->addWidget( removeButton );
- QPushButton *cancelButton = new QPushButton( d, "cancelButton" );
+ QPushButton *cancelButton = new QPushButton( installDialog, "cancelButton" );
QFont cancelButton_font( cancelButton->font() );
cancelButton_font.setPointSize( 8 );
@@ -264,8 +264,8 @@ void PmIpkg::startDialog()
this, SLOT( remove() ) );
connect( cancelButton, SIGNAL( clicked() ),
- d, SLOT( close() ) );
- d->showMaximized();
- d->exec();
- // d->close();
+ installDialog, SLOT( close() ) );
+ installDialog->showMaximized();
+ if ( installDialog->exec() ) doIt();
+ installDialog->close();
}
@@ -280,4 +280,5 @@ void PmIpkg::remove()
{
if ( to_remove.count() == 0 ) return;
+ installDialog->close();
show( true );
@@ -301,4 +302,5 @@ void PmIpkg::install()
{
if ( to_install.count() == 0 ) return;
+ installDialog->close();
show( true );
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:
PackageManagerSettings* settings;
RunWindow *runwindow;
+ QDialog *installDialog;
QList<Package> to_remove;
QList<Package> to_install;