summaryrefslogtreecommitdiff
path: root/noncore/settings/packagemanager/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/settings/packagemanager/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/mainwindow.cpp50
1 files changed, 26 insertions, 24 deletions
diff --git a/noncore/settings/packagemanager/mainwindow.cpp b/noncore/settings/packagemanager/mainwindow.cpp
index 4611404..486561d 100644
--- a/noncore/settings/packagemanager/mainwindow.cpp
+++ b/noncore/settings/packagemanager/mainwindow.cpp
@@ -30,2 +30,3 @@
30#include <qaction.h> 30#include <qaction.h>
31#include <qdir.h>
31#include <qlayout.h> 32#include <qlayout.h>
@@ -39,2 +40,3 @@
39 40
41#include <qpe/qcopenvelope_qws.h>
40#include <qpe/qpeapplication.h> 42#include <qpe/qpeapplication.h>
@@ -46,2 +48,3 @@
46#include "promptdlg.h" 48#include "promptdlg.h"
49#include "entrydlg.h"
47 50
@@ -164,3 +167,2 @@ void MainWindow::initUI()
164 167
165/*
166 QPixmap iconDownload = Resource::loadPixmap( "packagemanager/download" ); 168 QPixmap iconDownload = Resource::loadPixmap( "packagemanager/download" );
@@ -172,3 +174,2 @@ void MainWindow::initUI()
172 actionDownload->addTo( &m_toolBar ); 174 actionDownload->addTo( &m_toolBar );
173*/
174 175
@@ -372,3 +373,2 @@ void MainWindow::slotUpgrade()
372 373
373/*
374void MainWindow::slotDownload() 374void MainWindow::slotDownload()
@@ -388,3 +388,4 @@ void MainWindow::slotDownload()
388 { 388 {
389 // No packages were selected, prompt for URL of package to download 389 QMessageBox::information( this, tr( "Nothing to do" ), tr( "No packages selected" ), tr( "OK" ) );
390 return;
390 } 391 }
@@ -396,29 +397,25 @@ void MainWindow::slotDownload()
396 397
397// QString text = InputDialog::getText( tr( "Download to where" ), tr( "Enter path to download to" ), workingDir, &ok, this ); 398 bool ok = false;
398// if ( ok && !text.isEmpty() ) 399 QString text = EntryDlg::getText( tr( "Download" ), tr( "Enter path to download package to:" ), workingDir, &ok, this );
399// workingDir = text; // user entered something and pressed ok 400 if ( ok && !text.isEmpty() )
400// else 401 workingDir = text; // user entered something and pressed ok
401// return; // user entered nothing or pressed cancel 402 else
403 return; // user entered nothing or pressed cancel
402 404
403// // Store download directory in config file 405 // Store download directory in config file
404// m_config.writeEntry( "DownloadDir", workingDir ); 406 m_config.writeEntry( "DownloadDir", workingDir );
405 407
406 // Get starting directory 408 // Get starting directory
407// char initDir[PATH_MAX]; 409 QDir::setCurrent( workingDir );
408// getcwd( initDir, PATH_MAX );
409 410
410 // Download packages 411 // Create package manager output widget
412 InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Download packages" ), false,
413 OPackage::Download, workingPackages );
414 connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseInstallDlg()) );
411 415
416 // Display widget
417 m_widgetStack.addWidget( dlg, 3 );
418 m_widgetStack.raiseWidget( dlg );
412 } 419 }
413
414 // Create package manager output widget
415 InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Download packages" ), false,
416 OPackage::Download, workingPackages );
417 connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseInstallDlg()) );
418
419 // Display widget
420 m_widgetStack.addWidget( dlg, 3 );
421 m_widgetStack.raiseWidget( dlg );
422} 420}
423*/
424 421
@@ -528,2 +525,7 @@ void MainWindow::slotCloseInstallDlg()
528 initPackageInfo(); 525 initPackageInfo();
526
527 // Update Opie launcher links
528 QCopEnvelope e("QPE/System", "linkChanged(QString)");
529 QString lf = QString::null;
530 e << lf;
529} 531}