[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/make_kget_cool/kget
From: Urs Wolfer <uwolfer () fwo ! ch>
Date: 2006-08-31 21:42:32
Message-ID: 1157060552.811004.2863.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 579352 by uwolfer:
* Enable again FileDialog::getExistingDirectory. It is now fixed.
* YesNo messageboxes are bad for usability. Replace with YesNoCancel.
* Fix the messagebox order in the add download process (do not show the same box twice).
M +6 -0 Changelog
M +9 -14 core/kget.cpp
--- branches/work/make_kget_cool/kget/Changelog #579351:579352
@@ -1,3 +1,9 @@
+2006-08-31 Urs Wolfer <uwolfer @ fwo.ch>
+ * Enable again FileDialog::getExistingDirectory. It is now fixed.
+ * YesNo messageboxes are bad for usability. Replace with YesNoCancel.
+ * Fix the messagebox order in the add download process (do not show the
+ same box twice).
+
2006-08-31 Dario Massarin <nekkar@libero.it>
* Add the TransfersViewDelegate and TransferTreeSelectionModel classes.
* The former will be used to redesign the TransfersView look & feel,
--- branches/work/make_kget_cool/kget/core/kget.cpp #579351:579352
@@ -14,8 +14,6 @@
#include <QApplication>
#include <QClipboard>
#include <QItemSelectionModel>
-#include <QFileDialog> // temporarily replace the bugged kfiledialog
-
#include <QAbstractItemView>
#include <kio/netaccess.h>
@@ -317,11 +315,11 @@
{
if ( !filename.isEmpty()
&& QFile::exists( filename )
- && (KMessageBox::questionYesNo(0,
- i18n("The file %1 Already exists\nOverwrite?", filename),
+ && (KMessageBox::questionYesNoCancel(0,
+ i18n("The file %1 already exists.\nOverwrite?", filename),
i18n("Overwrite existing file?"), KStdGuiItem::yes(),
KStdGuiItem::no(), "QuestionFilenameExists" )
- == KMessageBox::No) )
+ != KMessageBox::Yes) )
return;
if(filename.isEmpty())
@@ -488,7 +486,7 @@
}
KUrl src = KUrl(newtransfer);
- if( isValidSource(src) )
+ if(src.isValid())
return src;
else
ok = false;
@@ -498,12 +496,7 @@
QString KGet::destInputDialog()
{
- //TODO Somehow, using KFIleDialog::getExistingDirectory() makes kget crash
- //when we close the application. Why?
-// QString destDir = KFileDialog::getExistingDirectory( Settings::lastDirectory() );
- QString destDir = QFileDialog::getExistingDirectory(m_mainWindow,
- i18n("Choose a directory"),
- Settings::lastDirectory());
+ QString destDir = KFileDialog::getExistingDirectory(Settings::lastDirectory());
Settings::setLastDirectory( destDir );
return destDir;
@@ -525,7 +518,7 @@
if ( transfer->status() == Job::Finished )
{
// transfer is finished, ask if we want to download again
- if (KMessageBox::questionYesNo(0,
+ if (KMessageBox::questionYesNoCancel(0,
i18n("URL already saved:\n%1\nDownload again?", source.prettyUrl()),
i18n("Download URL again?"), KStdGuiItem::yes(),
KStdGuiItem::no(), "QuestionUrlAlreadySaved" )
@@ -559,7 +552,7 @@
{
if(KIO::NetAccess::exists(destUrl, false, 0))
{
- if (KMessageBox::warningYesNo(0,
+ if (KMessageBox::warningYesNoCancel(0,
i18n("Destination file \n%1\nalready exists.\n"
"Do you want to overwrite it?", destUrl.prettyUrl()))
== KMessageBox::Yes)
@@ -567,6 +560,8 @@
safeDeleteFile( destUrl );
return true;
}
+ else
+ return false;
}
return true;
/*
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic