summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/mainwin.cpp
Unidiff
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 @@
47#include "inputdlg.h" 47#include "inputdlg.h"
48#include "ipkg.h"
48#include "installdlgimpl.h" 49#include "installdlgimpl.h"
@@ -90,5 +91,2 @@ MainWindow :: MainWindow()
90 QGridLayout *layout = new QGridLayout( w ); 91 QGridLayout *layout = new QGridLayout( w );
91 //QVBoxLayout *vbox = new QVBoxLayout( w, 0, -1 );
92 //QHBoxLayout *hbox3 = new QHBoxLayout( vbox, -1 );
93 //QHBoxLayout *hbox4 = new QHBoxLayout( vbox, -1 );
94 92
@@ -102,8 +100,2 @@ MainWindow :: MainWindow()
102 layout->addWidget( b, i / 13, i % 13); 100 layout->addWidget( b, i / 13, i % 13);
103/*
104 if ( i < 13 )
105 hbox3->addWidget( b );
106 else
107 hbox4->addWidget( b );
108*/
109 } 101 }
@@ -800,9 +792,9 @@ void MainWindow :: updateServer()
800 792
801 Ipkg ipkg; 793 Ipkg *ipkg = new Ipkg;
802 ipkg.setOption( "update" ); 794 ipkg->setOption( "update" );
803
804 InstallDlgImpl dlg( &ipkg, tr( "Refreshing server package lists" ), this, tr( "Upgrade" ), true );
805 dlg.showDlg();
806 795
807 reloadData(); 796 InstallDlgImpl *dlg = new InstallDlgImpl( ipkg, tr( "Refreshing server package lists" ),
797 tr( "Update lists" ) );
798 connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
799 dlg->showMaximized();
808 800
@@ -829,12 +821,13 @@ void MainWindow :: upgradePackages()
829 // Now run upgrade 821 // Now run upgrade
830 Ipkg ipkg; 822 Ipkg *ipkg = new Ipkg;
831 ipkg.setOption( "upgrade" ); 823 ipkg->setOption( "upgrade" );
832
833 InstallDlgImpl dlg( &ipkg, tr( "Upgrading installed packages" ), this, tr( "Upgrade" ), true );
834 dlg.showDlg();
835 824
836 reloadData(); 825 InstallDlgImpl *dlg = new InstallDlgImpl( ipkg, tr( "Upgrading installed packages" ),
826 tr ( "Upgrade" ) );
827 connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
828 dlg->showMaximized();
837 } 829 }
838} 830}
839 void MainWindow :: downloadPackage() 831
832void MainWindow :: downloadPackage()
840{ 833{
@@ -900,3 +893,3 @@ void MainWindow :: upgradePackages()
900 { 893 {
901 reloadData(); 894 reloadData( 0x0 );
902 } 895 }
@@ -972,13 +965,5 @@ void MainWindow :: downloadRemotePackage()
972 965
973 InstallDlgImpl dlg2( workingPackages, mgr, this, "Install", true ); 966 InstallDlgImpl *dlg = new InstallDlgImpl( workingPackages, mgr, tr( "Download" ) );
974 dlg2.showDlg(); 967 connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
975 968 dlg->showMaximized();
976 reloadData();
977
978#ifdef QWS
979 // Finally let the main system update itself
980 QCopEnvelope e("QPE/System", "linkChanged(QString)");
981 QString lf = QString::null;
982 e << lf;
983#endif
984} 969}
@@ -1018,13 +1003,5 @@ void MainWindow :: applyChanges()
1018 // do the stuff 1003 // do the stuff
1019 InstallDlgImpl dlg( workingPackages, mgr, this, "Install", true ); 1004 InstallDlgImpl *dlg = new InstallDlgImpl( workingPackages, mgr, tr( "Apply changes" ) );
1020 dlg.showDlg(); 1005 connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
1021 1006 dlg->showMaximized();
1022 reloadData();
1023
1024#ifdef QWS
1025 // Finally let the main system update itself
1026 QCopEnvelope e("QPE/System", "linkChanged(QString)");
1027 QString lf = QString::null;
1028 e << lf;
1029#endif
1030} 1007}
@@ -1152,7 +1129,24 @@ InstallData MainWindow :: dealWithItem( QCheckListItem *item )
1152 1129
1153void MainWindow :: reloadData() 1130void MainWindow :: reloadData( InstallDlgImpl *dlg )
1154{ 1131{
1155 stack->raiseWidget( progressWindow ); 1132 stack->raiseWidget( progressWindow );
1133
1134 if ( dlg )
1135 {
1136 dlg->close();
1137 delete dlg;
1138 }
1139
1156 mgr->reloadServerData(); 1140 mgr->reloadServerData();
1157 serverSelected( -1, FALSE ); 1141 serverSelected( -1, FALSE );
1142
1143#ifdef QWS
1144 m_status->setText( tr( "Updating Launcher..." ) );
1145
1146 // Finally let the main system update itself
1147 QCopEnvelope e("QPE/System", "linkChanged(QString)");
1148 QString lf = QString::null;
1149 e << lf;
1150#endif
1151
1158 stack->raiseWidget( networkPkgWindow ); 1152 stack->raiseWidget( networkPkgWindow );