summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt5
-rw-r--r--bin/kdepim/pwmanager/germantranslation.txt5
-rw-r--r--korganizer/mainwindow.cpp5
-rw-r--r--microkde/kapplication.cpp13
4 files changed, 18 insertions, 10 deletions
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt
index 85aed43..50056c4 100644
--- a/bin/kdepim/kaddressbook/germantranslation.txt
+++ b/bin/kdepim/kaddressbook/germantranslation.txt
@@ -755,10 +755,15 @@
{ "%1 contacts changed!","%1 Kontakte geändert!" },
{ "Mobile (home)","Handy (Arbeit)" },
{ "Mobile (work)","Handy (Privat)" },
{ "Def.Formatted Name","Def. Format. Name" },
{ "Colors","Farben" },
{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" },
+{ "Backup enabled","Backup angeschaltet" },
+{ "Use standard backup dir","Standard Backupverzeichnis" },
+{ "Number of Backups:","Anzahl der Backups" },
+{ "Make backup every ","Mache ein Backup alle " },
+{ " days"," Tage" },
{ "","" },
{ "","" },
{ "","" },
{ "","" }, \ No newline at end of file
diff --git a/bin/kdepim/pwmanager/germantranslation.txt b/bin/kdepim/pwmanager/germantranslation.txt
index a50dd04..38896fb 100644
--- a/bin/kdepim/pwmanager/germantranslation.txt
+++ b/bin/kdepim/pwmanager/germantranslation.txt
@@ -350,12 +350,17 @@
{ "Add new password","Passwort hinzufügen" },
{ "Successfully saved data.","Datei gespeichert." },
{ "Category:","Kategorie:" },
{ "LOCKED","GESPERRT" },
{ "Colors","Farben" },
{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" },
+{ "Backup enabled","Backup angeschaltet" },
+{ "Use standard backup dir","Standard Backupverzeichnis" },
+{ "Number of Backups:","Anzahl der Backups" },
+{ "Make backup every ","Mache ein Backup alle " },
+{ " days"," Tage" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 9ad0694..eed023c 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1764,16 +1764,15 @@ void MainWindow::saveOnClose()
p->mToolBarUpF = filterToolBar->y() > height()/2;
else
p->mToolBarUpF = filterToolBar->x() > width()/2 ;
}
#endif
-
- mView->writeSettings();
if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName()))
save();
+ mView->writeSettings();
}
void MainWindow::slotModifiedChanged( bool changed )
{
if ( mBlockAtStartup )
return;
@@ -1809,13 +1808,13 @@ void MainWindow::save()
setCaption(i18n("KO/Pi:Creating backup ... please wait ..." ));
qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate);
// we need the file path, the backup dir and the number of bups as param
QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir;
if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir)
bupDir = KGlobalSettings::backupDataDir();
- int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers );//55;//call backup
+ int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers );
if ( retval == 0 ) {
qDebug("KO: Backup cancelled. Will try again tomorrow ");
// retval == 0 : backup skipped for today, try again tomorrow
KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1;
} else if ( retval == 1 ){
qDebug("KO: Backup created.");
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp
index 566bb41..2c9e3b6 100644
--- a/microkde/kapplication.cpp
+++ b/microkde/kapplication.cpp
@@ -167,13 +167,13 @@ private:
QRadioButton* vcal, *ical, *ocal, *tcal;
};
int KApplication::createBackup( QString fn, QString dp, int numBup )
{
if ( numBup < 1) return 3;
int ret = 3;
- qDebug("KApplication::createBackup %s --- %s --- %d", fn.latin1(), dp.latin1(), numBup);
+ //qDebug("KApplication::createBackup %s --- %s --- %d", fn.latin1(), dp.latin1(), numBup);
QDir bupDir ( dp );
bool tryAgain = true;
while ( tryAgain ) {
if ( !bupDir.exists() ) {
KBackupPrefs noDir( i18n("<b>Backup directory does not exist: </b>") + dp.right(30));
if ( !noDir.exec() ) return 3;
@@ -197,13 +197,13 @@ int KApplication::createBackup( QString fn, QString dp, int numBup )
int i;
for ( i = 0; i < allFileList.count(); ++i ) {
QString fi = allFileList[i];
if ( fi. find( fName ) > -1 )
fileList.append( fi );
}
- qDebug("%d backup files exist ", fileList.count());
+ qDebug("KApp: %d backup files exist ", fileList.count());
int count = fileList.count();
fileList.sort();
int remCount = 0;
while ( count >= numBup ) {
QString fnr = dp + "/"+fileList[remCount];
QFile::remove( fnr );
@@ -212,26 +212,25 @@ int KApplication::createBackup( QString fn, QString dp, int numBup )
}
QDateTime mRunStart = QDateTime::currentDateTime();
QString file = "%1%2%3-%4%5%6-";
file = file.arg( mRunStart.date().year(), 4).arg( mRunStart.date().month(),2 ).arg( mRunStart.date().day(), 2 ).arg( mRunStart.time().hour(),2 ).arg( mRunStart.time().minute(),2 ).arg( mRunStart.time().second(),2 );
file.replace ( QRegExp (" "), "0" );
file += fName ;
- file = dp + "/"+file;
+ file = dp + file;
QString command;
int res = 0;
#ifdef _WIN32_
- command = "xcopy "+ fn+ " "+file;
- command = QDir::convertSeparators( command );
+ command = "copy \""+ QDir::convertSeparators( fn)+ "\" \""+QDir::convertSeparators(file)+ "\" ";
#else
command = "cp "+ fn+ " "+file;
#endif
- qDebug("command %s ",command.latin1() );
+ //qDebug("command %s ",command.latin1() );
tryAgain = true;
while ( tryAgain ) {
res = system ( command.latin1() );
- qDebug("copy result %d ", res);
+ qDebug("KApp: Copy result %d ", res);
if ( res != 0 ) {
KBackupPrefs noDir( i18n("<b>The backup copy command failed!</b>"));
if ( !noDir.exec() ) return 3;
if ( noDir.againTomorrow() ) {
return 0;
} else if ( noDir.later() ) {