Diffstat (limited to 'noncore/settings/packagemanager/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/mainwindow.cpp | 38 |
1 files changed, 20 insertions, 18 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 @@ #include <qaction.h> +#include <qdir.h> #include <qlayout.h> @@ -39,2 +40,3 @@ +#include <qpe/qcopenvelope_qws.h> #include <qpe/qpeapplication.h> @@ -46,2 +48,3 @@ #include "promptdlg.h" +#include "entrydlg.h" @@ -164,3 +167,2 @@ void MainWindow::initUI() -/* QPixmap iconDownload = Resource::loadPixmap( "packagemanager/download" ); @@ -172,3 +174,2 @@ void MainWindow::initUI() actionDownload->addTo( &m_toolBar ); -*/ @@ -372,3 +373,2 @@ void MainWindow::slotUpgrade() -/* void MainWindow::slotDownload() @@ -388,3 +388,4 @@ void MainWindow::slotDownload() { - // No packages were selected, prompt for URL of package to download + QMessageBox::information( this, tr( "Nothing to do" ), tr( "No packages selected" ), tr( "OK" ) ); + return; } @@ -396,18 +397,14 @@ void MainWindow::slotDownload() -// QString text = InputDialog::getText( tr( "Download to where" ), tr( "Enter path to download to" ), workingDir, &ok, this ); -// if ( ok && !text.isEmpty() ) -// workingDir = text; // user entered something and pressed ok -// else -// return; // user entered nothing or pressed cancel + bool ok = false; + QString text = EntryDlg::getText( tr( "Download" ), tr( "Enter path to download package to:" ), workingDir, &ok, this ); + if ( ok && !text.isEmpty() ) + workingDir = text; // user entered something and pressed ok + else + return; // user entered nothing or pressed cancel -// // Store download directory in config file -// m_config.writeEntry( "DownloadDir", workingDir ); + // Store download directory in config file + m_config.writeEntry( "DownloadDir", workingDir ); // Get starting directory -// char initDir[PATH_MAX]; -// getcwd( initDir, PATH_MAX ); - - // Download packages - - } + QDir::setCurrent( workingDir ); @@ -422,3 +419,3 @@ void MainWindow::slotDownload() } -*/ +} @@ -528,2 +525,7 @@ void MainWindow::slotCloseInstallDlg() initPackageInfo(); + + // Update Opie launcher links + QCopEnvelope e("QPE/System", "linkChanged(QString)"); + QString lf = QString::null; + e << lf; } |