[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdegraphics/kpdf
From: Albert Astals Cid <tsdgeos () terra ! es>
Date: 2005-03-24 20:10:09
Message-ID: 20050324201009.53A983EC () office ! kde ! org
[Download RAW message or body]
CVS commit by aacid:
When saving a file ask if we are going to overwrite a existing file
BUG: 102332
M +6 -0 part.cpp 1.33
--- kdegraphics/kpdf/part.cpp #1.32:1.33
@@ -557,4 +557,10 @@ void Part::slotSaveFileAs()
if ( saveURL.isValid() && !saveURL.isEmpty() )
{
+ if ( KIO::NetAccess::exists( saveURL, false, widget() ) )
+ {
+ if (KMessageBox::questionYesNo( widget(), i18n("A file named \"%1\" \
already exists. Are you sure you want to overwrite it?").arg(saveURL.filename())) != \
KMessageBox::Yes) + return;
+ }
+
if ( !KIO::NetAccess::file_copy( url(), saveURL, -1, true ) )
KMessageBox::information( 0, i18n("File could not be saved in '%1'. Try \
to save it to another location.").arg( saveURL.prettyURL() ) );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic