Diffstat (limited to 'noncore/settings/aqpkg/mainwin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/mainwin.cpp | 86 |
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 | |||
@@ -46,4 +46,5 @@ | |||
46 | #include "helpwindow.h" | 46 | #include "helpwindow.h" |
47 | #include "inputdlg.h" | 47 | #include "inputdlg.h" |
48 | #include "ipkg.h" | ||
48 | #include "installdlgimpl.h" | 49 | #include "installdlgimpl.h" |
49 | #include "letterpushbutton.h" | 50 | #include "letterpushbutton.h" |
@@ -89,7 +90,4 @@ MainWindow :: MainWindow() | |||
89 | 90 | ||
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 | ||
95 | char text[2]; | 93 | char text[2]; |
@@ -101,10 +99,4 @@ MainWindow :: MainWindow() | |||
101 | connect( b, SIGNAL( released( QString ) ), this, SLOT( letterPushed( QString ) ) ); | 99 | connect( b, SIGNAL( released( QString ) ), this, SLOT( letterPushed( QString ) ) ); |
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 | } |
110 | 102 | ||
@@ -799,11 +791,11 @@ void MainWindow :: updateServer() | |||
799 | mgr->writeOutIpkgConf(); | 791 | mgr->writeOutIpkgConf(); |
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 | ||
809 | // delete progDlg; | 801 | // delete progDlg; |
@@ -828,14 +820,15 @@ void MainWindow :: upgradePackages() | |||
828 | 820 | ||
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 | |
832 | void MainWindow :: downloadPackage() | ||
840 | { | 833 | { |
841 | bool doUpdate = true; | 834 | bool doUpdate = true; |
@@ -899,5 +892,5 @@ void MainWindow :: upgradePackages() | |||
899 | if ( doUpdate ) | 892 | if ( doUpdate ) |
900 | { | 893 | { |
901 | reloadData(); | 894 | reloadData( 0x0 ); |
902 | } | 895 | } |
903 | } | 896 | } |
@@ -971,15 +964,7 @@ void MainWindow :: downloadRemotePackage() | |||
971 | workingPackages.push_back( item ); | 964 | workingPackages.push_back( item ); |
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 | } |
985 | 970 | ||
@@ -1017,15 +1002,7 @@ void MainWindow :: applyChanges() | |||
1017 | 1002 | ||
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 | } |
1031 | 1008 | ||
@@ -1151,9 +1128,26 @@ InstallData MainWindow :: dealWithItem( QCheckListItem *item ) | |||
1151 | } | 1128 | } |
1152 | 1129 | ||
1153 | void MainWindow :: reloadData() | 1130 | void 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 ); |
1159 | } | 1153 | } |