Diffstat (limited to 'noncore/settings/packagemanager/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/mainwindow.cpp | 50 |
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 @@ #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,29 +397,25 @@ 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 ); + QDir::setCurrent( workingDir ); - // Download packages + // Create package manager output widget + InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Download packages" ), false, + OPackage::Download, workingPackages ); + connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseInstallDlg()) ); + // Display widget + m_widgetStack.addWidget( dlg, 3 ); + m_widgetStack.raiseWidget( dlg ); } - - // Create package manager output widget - InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Download packages" ), false, - OPackage::Download, workingPackages ); - connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseInstallDlg()) ); - - // Display widget - m_widgetStack.addWidget( dlg, 3 ); - m_widgetStack.raiseWidget( dlg ); } -*/ @@ -528,2 +525,7 @@ void MainWindow::slotCloseInstallDlg() initPackageInfo(); + + // Update Opie launcher links + QCopEnvelope e("QPE/System", "linkChanged(QString)"); + QString lf = QString::null; + e << lf; } |