summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/installdlgimpl.cpp
Unidiff
Diffstat (limited to 'noncore/settings/aqpkg/installdlgimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/installdlgimpl.cpp55
1 files changed, 26 insertions, 29 deletions
diff --git a/noncore/settings/aqpkg/installdlgimpl.cpp b/noncore/settings/aqpkg/installdlgimpl.cpp
index db9a259..485fe3d 100644
--- a/noncore/settings/aqpkg/installdlgimpl.cpp
+++ b/noncore/settings/aqpkg/installdlgimpl.cpp
@@ -18,4 +18,5 @@
18#ifdef QWS 18#ifdef QWS
19#include <qpe/config.h> 19#include <qpe/config.h>
20#include <qpe/qpeapplication.h>
20#endif 21#endif
21 22
@@ -92,13 +93,13 @@ InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *d
92 else if ( item.option == "U" || item.option == "R" ) 93 else if ( item.option == "U" || item.option == "R" )
93 { 94 {
94 updateList.push_back( item ); 95 updateList.push_back( item );
95 QString type = " (Upgrade)"; 96 QString type = " (Upgrade)";
96 if ( item.option == "R" ) 97 if ( item.option == "R" )
97 type = " (ReInstall)"; 98 type = " (ReInstall)";
98 upgrade += " " + item.packageName + type + "\n"; 99 upgrade += " " + item.packageName + type + "\n";
99 } 100 }
100 } 101 }
101 102
102 output->setText( remove + install + upgrade ); 103 output->setText( remove + install + upgrade );
103} 104}
104 105
@@ -117,25 +118,17 @@ InstallDlgImpl::~InstallDlgImpl()
117bool InstallDlgImpl :: showDlg() 118bool InstallDlgImpl :: showDlg()
118{ 119{
119 showMaximized(); 120 showMaximized();
120 bool ret = exec(); 121 bool ret = exec();
121 122
122 return ret; 123 return ret;
123} 124}
124 125
125void InstallDlgImpl :: optionsSelected() 126void InstallDlgImpl :: optionsSelected()
126{ 127{
127 InstallOptionsDlgImpl opt( flags, this, "Option", true ); 128 InstallOptionsDlgImpl opt( flags, this, "Option", true );
128 opt.exec(); 129 opt.exec();
129 130
130 // set options selected from dialog 131 // set options selected from dialog
131 flags = 0; 132 flags = opt.getFlags();
132 if ( opt.forceDepends->isChecked() )
133 flags |= FORCE_DEPENDS;
134 if ( opt.forceReinstall->isChecked() )
135 flags |= FORCE_REINSTALL;
136 if ( opt.forceRemove->isChecked() )
137 flags |= FORCE_REMOVE;
138 if ( opt.forceOverwrite->isChecked() )
139 flags |= FORCE_OVERWRITE;
140 133
141#ifdef QWS 134#ifdef QWS
@@ -148,11 +141,14 @@ void InstallDlgImpl :: optionsSelected()
148void InstallDlgImpl :: installSelected() 141void InstallDlgImpl :: installSelected()
149{ 142{
150 if ( btnInstall->text() == "Close" ) 143
151 { 144 if ( btnInstall->text() == "Close" )
152 done( 1 ); 145 {
153 return; 146 done( 1 );
154 } 147 return;
148 }
155 149
156 btnInstall->setEnabled( false ); 150 // Disable buttons
151 btnOptions->setEnabled( false );
152 btnInstall->setEnabled( false );
157 153
158 if ( pIpkg ) 154 if ( pIpkg )
@@ -184,5 +180,5 @@ void InstallDlgImpl :: installSelected()
184 180
185 // First run through the remove list, then the install list then the upgrade list 181 // First run through the remove list, then the install list then the upgrade list
186 vector<InstallData>::iterator it; 182 vector<InstallData>::iterator it;
187 pIpkg->setOption( "remove" ); 183 pIpkg->setOption( "remove" );
188 for ( it = removeList.begin() ; it != removeList.end() ; ++it ) 184 for ( it = removeList.begin() ; it != removeList.end() ; ++it )
@@ -231,5 +227,6 @@ void InstallDlgImpl :: installSelected()
231 } 227 }
232 228
233 btnInstall->setEnabled( true ); 229 btnOptions->setEnabled( true );
230 btnInstall->setEnabled( true );
234 btnInstall->setText( tr( "Close" ) ); 231 btnInstall->setText( tr( "Close" ) );
235} 232}