Diffstat (limited to 'noncore/settings/aqpkg/networkpkgmgr.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/networkpkgmgr.cpp | 46 |
1 files changed, 13 insertions, 33 deletions
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp index ee37157..91afe02 100644 --- a/noncore/settings/aqpkg/networkpkgmgr.cpp +++ b/noncore/settings/aqpkg/networkpkgmgr.cpp | |||
@@ -67,5 +67,2 @@ NetworkPackageManager::NetworkPackageManager( QWidget *parent, const char *name | |||
67 | initGui(); | 67 | initGui(); |
68 | setupConnections(); | ||
69 | |||
70 | //updateData(); | ||
71 | } | 68 | } |
@@ -149,7 +146,5 @@ void NetworkPackageManager :: initGui() | |||
149 | serversList = new QComboBox( this ); | 146 | serversList = new QComboBox( this ); |
147 | connect( serversList, SIGNAL(activated( int )), this, SLOT(serverSelected( int ))); | ||
148 | |||
150 | packagesList = new QListView( this ); | 149 | packagesList = new QListView( this ); |
151 | update = new QPushButton( tr( "Refresh Lists" ), this ); | ||
152 | download = new QPushButton( tr( "Download" ), this ); | ||
153 | upgrade = new QPushButton( tr( "Upgrade" ), this ); | ||
154 | apply = new QPushButton( tr( "Apply" ), this ); | ||
155 | 150 | ||
@@ -182,17 +177,4 @@ void NetworkPackageManager :: initGui() | |||
182 | packagesList->addColumn( tr( "Packages" ) ); | 177 | packagesList->addColumn( tr( "Packages" ) ); |
183 | 178 | ||
184 | QHBoxLayout *hbox2 = new QHBoxLayout( vbox, -1 ); | 179 | downloadEnabled = TRUE; |
185 | hbox2->addWidget( update ); | ||
186 | hbox2->addWidget( download ); | ||
187 | hbox2->addWidget( upgrade ); | ||
188 | hbox2->addWidget( apply ); | ||
189 | } | ||
190 | |||
191 | void NetworkPackageManager :: setupConnections() | ||
192 | { | ||
193 | connect( serversList, SIGNAL(activated( int )), this, SLOT(serverSelected( int ))); | ||
194 | connect( apply, SIGNAL(released()), this, SLOT(applyChanges()) ); | ||
195 | connect( download, SIGNAL(released()), this, SLOT(downloadPackage()) ); | ||
196 | connect( upgrade, SIGNAL( released()), this, SLOT(upgradePackages()) ); | ||
197 | connect( update, SIGNAL(released()), this, SLOT(updateServer()) ); | ||
198 | } | 180 | } |
@@ -342,5 +324,4 @@ void NetworkPackageManager :: serverSelected( int, bool raiseProgress ) | |||
342 | { | 324 | { |
343 | upgrade->setEnabled( false ); | 325 | downloadEnabled = TRUE; |
344 | download->setText( tr( "Download" ) ); | 326 | emit appEnableUpgrade( FALSE ); |
345 | download->setEnabled( true ); | ||
346 | } | 327 | } |
@@ -348,5 +329,4 @@ void NetworkPackageManager :: serverSelected( int, bool raiseProgress ) | |||
348 | { | 329 | { |
349 | upgrade->setEnabled( false ); | 330 | downloadEnabled = FALSE; |
350 | download->setEnabled( true ); | 331 | emit appEnableUpgrade( FALSE ); |
351 | download->setText( tr( "Remove" ) ); | ||
352 | } | 332 | } |
@@ -354,6 +334,6 @@ void NetworkPackageManager :: serverSelected( int, bool raiseProgress ) | |||
354 | { | 334 | { |
355 | upgrade->setEnabled( true ); | 335 | downloadEnabled = TRUE; |
356 | download->setEnabled( true ); | 336 | emit appEnableUpgrade( TRUE ); |
357 | download->setText( tr( "Download" ) ); | ||
358 | } | 337 | } |
338 | emit appEnableDownload( downloadEnabled ); | ||
359 | 339 | ||
@@ -423,3 +403,3 @@ void NetworkPackageManager :: downloadPackage() | |||
423 | bool doUpdate = true; | 403 | bool doUpdate = true; |
424 | if ( download->text() == tr( "Download" ) ) | 404 | if ( downloadEnabled ) |
425 | { | 405 | { |
@@ -447,3 +427,3 @@ void NetworkPackageManager :: downloadPackage() | |||
447 | } | 427 | } |
448 | else if ( download->text() == tr( "Remove" ) ) | 428 | else |
449 | { | 429 | { |