summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/mainwin.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/aqpkg/mainwin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp86
1 files changed, 40 insertions, 46 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp
index a25f5a7..947aace 100644
--- a/noncore/settings/aqpkg/mainwin.cpp
+++ b/noncore/settings/aqpkg/mainwin.cpp
@@ -47,2 +47,3 @@
#include "inputdlg.h"
+#include "ipkg.h"
#include "installdlgimpl.h"
@@ -90,5 +91,2 @@ MainWindow :: MainWindow()
QGridLayout *layout = new QGridLayout( w );
- //QVBoxLayout *vbox = new QVBoxLayout( w, 0, -1 );
- //QHBoxLayout *hbox3 = new QHBoxLayout( vbox, -1 );
- //QHBoxLayout *hbox4 = new QHBoxLayout( vbox, -1 );
@@ -102,8 +100,2 @@ MainWindow :: MainWindow()
layout->addWidget( b, i / 13, i % 13);
-/*
- if ( i < 13 )
- hbox3->addWidget( b );
- else
- hbox4->addWidget( b );
-*/
}
@@ -800,9 +792,9 @@ void MainWindow :: updateServer()
- Ipkg ipkg;
- ipkg.setOption( "update" );
-
- InstallDlgImpl dlg( &ipkg, tr( "Refreshing server package lists" ), this, tr( "Upgrade" ), true );
- dlg.showDlg();
+ Ipkg *ipkg = new Ipkg;
+ ipkg->setOption( "update" );
- reloadData();
+ InstallDlgImpl *dlg = new InstallDlgImpl( ipkg, tr( "Refreshing server package lists" ),
+ tr( "Update lists" ) );
+ connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
+ dlg->showMaximized();
@@ -829,12 +821,13 @@ void MainWindow :: upgradePackages()
// Now run upgrade
- Ipkg ipkg;
- ipkg.setOption( "upgrade" );
-
- InstallDlgImpl dlg( &ipkg, tr( "Upgrading installed packages" ), this, tr( "Upgrade" ), true );
- dlg.showDlg();
+ Ipkg *ipkg = new Ipkg;
+ ipkg->setOption( "upgrade" );
- reloadData();
+ InstallDlgImpl *dlg = new InstallDlgImpl( ipkg, tr( "Upgrading installed packages" ),
+ tr ( "Upgrade" ) );
+ connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
+ dlg->showMaximized();
}
}
- void MainWindow :: downloadPackage()
+
+void MainWindow :: downloadPackage()
{
@@ -900,3 +893,3 @@ void MainWindow :: upgradePackages()
{
- reloadData();
+ reloadData( 0x0 );
}
@@ -972,13 +965,5 @@ void MainWindow :: downloadRemotePackage()
- InstallDlgImpl dlg2( workingPackages, mgr, this, "Install", true );
- dlg2.showDlg();
-
- reloadData();
-
-#ifdef QWS
- // Finally let the main system update itself
- QCopEnvelope e("QPE/System", "linkChanged(QString)");
- QString lf = QString::null;
- e << lf;
-#endif
+ InstallDlgImpl *dlg = new InstallDlgImpl( workingPackages, mgr, tr( "Download" ) );
+ connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
+ dlg->showMaximized();
}
@@ -1018,13 +1003,5 @@ void MainWindow :: applyChanges()
// do the stuff
- InstallDlgImpl dlg( workingPackages, mgr, this, "Install", true );
- dlg.showDlg();
-
- reloadData();
-
-#ifdef QWS
- // Finally let the main system update itself
- QCopEnvelope e("QPE/System", "linkChanged(QString)");
- QString lf = QString::null;
- e << lf;
-#endif
+ InstallDlgImpl *dlg = new InstallDlgImpl( workingPackages, mgr, tr( "Apply changes" ) );
+ connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
+ dlg->showMaximized();
}
@@ -1152,7 +1129,24 @@ InstallData MainWindow :: dealWithItem( QCheckListItem *item )
-void MainWindow :: reloadData()
+void MainWindow :: reloadData( InstallDlgImpl *dlg )
{
stack->raiseWidget( progressWindow );
+
+ if ( dlg )
+ {
+ dlg->close();
+ delete dlg;
+ }
+
mgr->reloadServerData();
serverSelected( -1, FALSE );
+
+#ifdef QWS
+ m_status->setText( tr( "Updating Launcher..." ) );
+
+ // Finally let the main system update itself
+ QCopEnvelope e("QPE/System", "linkChanged(QString)");
+ QString lf = QString::null;
+ e << lf;
+#endif
+
stack->raiseWidget( networkPkgWindow );