summaryrefslogtreecommitdiff
authorar <ar>2005-02-18 20:21:32 (UTC)
committer ar <ar>2005-02-18 20:21:32 (UTC)
commitd8254f2f295b07bdadf6b4b25f0bd125d8121c28 (patch) (unidiff)
treebc3edde3980b5c568e630ef4418e7508e3d5d374
parent03da1c30d7d6c7197a551219e3a36c9a3f469cc8 (diff)
downloadopie-d8254f2f295b07bdadf6b4b25f0bd125d8121c28.zip
opie-d8254f2f295b07bdadf6b4b25f0bd125d8121c28.tar.gz
opie-d8254f2f295b07bdadf6b4b25f0bd125d8121c28.tar.bz2
- #1570 - Confirmation needed before restore backup and overwrite local data
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog1
-rw-r--r--noncore/settings/backup/backuprestore.cpp5
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 8ac976d..218aacf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,83 +1,84 @@
1 2005-??-??Opie 1.2.0 1 2005-??-??Opie 1.2.0
2 2
3 New Features 3 New Features
4 ------------ 4 ------------
5 * Launcher: Support a static background pixmap (mickeyl) 5 * Launcher: Support a static background pixmap (mickeyl)
6 * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) 6 * LauncherSettings: Choose whether to have a static background pixmap (mickeyl)
7 7
8 Fixed Bugs 8 Fixed Bugs
9 ---------- 9 ----------
10 * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) 10 * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers)
11 * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) 11 * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke)
12 * #1482 - Fix double '/' in paths (zecke) 12 * #1482 - Fix double '/' in paths (zecke)
13 * #1536 - Autosave of custom locations in opie backup (ar) 13 * #1536 - Autosave of custom locations in opie backup (ar)
14 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) 14 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke)
15 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) 15 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke)
16 * #1542 - Fix Todo crash when priority < 1 or > 5 (drw) 16 * #1542 - Fix Todo crash when priority < 1 or > 5 (drw)
17 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) 17 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl)
18 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) 18 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke)
19 * #1558 - Fixed opie-login breaking opie startup (mickeyl) 19 * #1558 - Fixed opie-login breaking opie startup (mickeyl)
20 * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar)
20 * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) 21 * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw)
21 22
22 Internal 23 Internal
23 -------- 24 --------
24 * Work around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) 25 * Work around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl)
25 * Killed the need for weak symbols in QtE (zecke) 26 * Killed the need for weak symbols in QtE (zecke)
26 27
27 2005-02-03Opie 1.1.9 28 2005-02-03Opie 1.1.9
28 29
29 New Features 30 New Features
30 ------------ 31 ------------
31 * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) 32 * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl)
32 * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) 33 * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl)
33 * Usability enhancements in OpieIRC (skyhusker) 34 * Usability enhancements in OpieIRC (skyhusker)
34 35
35 Fixed Bugs 36 Fixed Bugs
36 ---------- 37 ----------
37 * #1501 - Fixed bug in todo sql backend (eilers) 38 * #1501 - Fixed bug in todo sql backend (eilers)
38 * #1505 - Added more Swap sizes in memoryapplet (mickeyl) 39 * #1505 - Added more Swap sizes in memoryapplet (mickeyl)
39 * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) 40 * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke)
40 * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) 41 * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke)
41 * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) 42 * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl)
42 * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) 43 * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl)
43 * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) 44 * n.a. - Fixed numerous buglets in OpieIRC (skyhusker)
44 45
45 Internal 46 Internal
46 -------- 47 --------
47 * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) 48 * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl)
48 * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) 49 * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl)
49 * Made Opie compilable with Qt/Embedded 2.3.10 (ar) 50 * Made Opie compilable with Qt/Embedded 2.3.10 (ar)
50 * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) 51 * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl)
51 * Build tree cleanups (mickeyl) 52 * Build tree cleanups (mickeyl)
52 53
53 2004-11-26Opie 1.1.8 54 2004-11-26Opie 1.1.8
54 55
55 New Features 56 New Features
56 ------------ 57 ------------
57 * PackageManager supports installation of local ipkg files (drw) 58 * PackageManager supports installation of local ipkg files (drw)
58 * PackageManager supports linking of applications to root (drw) 59 * PackageManager supports linking of applications to root (drw)
59 * PackageManager supports src/gz feeds (drw,wimpie) 60 * PackageManager supports src/gz feeds (drw,wimpie)
60 * Added a syslog information tab to sysinfo (mickeyl) 61 * Added a syslog information tab to sysinfo (mickeyl)
61 * Added new, more consistent, PIM icons + a GIMP teplate (ar) 62 * Added new, more consistent, PIM icons + a GIMP teplate (ar)
62 63
63 Fixed Bugs 64 Fixed Bugs
64 ---------- 65 ----------
65 * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) 66 * #1017 - Tetrix doesn't display correctly for high resolution screens (drw)
66 * #1269 - VCards were imported into personal area if it was activated (eilers) 67 * #1269 - VCards were imported into personal area if it was activated (eilers)
67 * #1464 - Packagemanager dont set active filter after install a package (drw) 68 * #1464 - Packagemanager dont set active filter after install a package (drw)
68 * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) 69 * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers)
69 * #1493 - Fixed one column layout bug of the launcher (hrw) 70 * #1493 - Fixed one column layout bug of the launcher (hrw)
70 * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) 71 * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw)
71 * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) 72 * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw)
72 * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) 73 * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl)
73 74
74 Internal 75 Internal
75 -------- 76 --------
76 * Moved libopie1 to unsupported (mickeyl) 77 * Moved libopie1 to unsupported (mickeyl)
77 * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) 78 * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers)
78 * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) 79 * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers)
79 80
80 2004-11-14Opie 1.1.7 81 2004-11-14Opie 1.1.7
81 82
82 New Features 83 New Features
83 ------------ 84 ------------
diff --git a/noncore/settings/backup/backuprestore.cpp b/noncore/settings/backup/backuprestore.cpp
index 8928cda..180980a 100644
--- a/noncore/settings/backup/backuprestore.cpp
+++ b/noncore/settings/backup/backuprestore.cpp
@@ -526,128 +526,133 @@ int BackupAndRestore::getBackupFiles(QString &backupFiles, QListViewItem *parent
526 526
527void BackupAndRestore::sourceDirChanged(int selection) 527void BackupAndRestore::sourceDirChanged(int selection)
528{ 528{
529 restoreList->clear(); 529 restoreList->clear();
530 rescanFolder(backupLocations[restoreSource->text(selection)]); 530 rescanFolder(backupLocations[restoreSource->text(selection)]);
531} 531}
532 532
533void BackupAndRestore::fileListUpdate() 533void BackupAndRestore::fileListUpdate()
534{ 534{
535 owarn << "void BackupAndRestore::fileListUpdate()" << oendl; 535 owarn << "void BackupAndRestore::fileListUpdate()" << oendl;
536 restoreList->clear(); 536 restoreList->clear();
537 rescanFolder( backupLocations[restoreSource->currentText()] ); 537 rescanFolder( backupLocations[restoreSource->currentText()] );
538} 538}
539 539
540/** 540/**
541 * Scans directory for any backup files. Will recursivly go down, 541 * Scans directory for any backup files. Will recursivly go down,
542 * but will not follow symlinks. 542 * but will not follow symlinks.
543 * @param directory - the directory to look in. 543 * @param directory - the directory to look in.
544 */ 544 */
545void BackupAndRestore::rescanFolder(QString directory) 545void BackupAndRestore::rescanFolder(QString directory)
546{ 546{
547 //odebug << QString("rescanFolder: ") + directory.latin1() << oendl; 547 //odebug << QString("rescanFolder: ") + directory.latin1() << oendl;
548 QDir d(directory); 548 QDir d(directory);
549 if(!d.exists()) 549 if(!d.exists())
550 return; 550 return;
551 551
552 d.setFilter( QDir::Files | QDir::Hidden | QDir::Dirs); 552 d.setFilter( QDir::Files | QDir::Hidden | QDir::Dirs);
553 const QFileInfoList *list = d.entryInfoList(); 553 const QFileInfoList *list = d.entryInfoList();
554 QFileInfoListIterator it( *list ); 554 QFileInfoListIterator it( *list );
555 QFileInfo *file; 555 QFileInfo *file;
556 while ( (file=it.current()) ) 556 while ( (file=it.current()) )
557 { // for each file... 557 { // for each file...
558 // If it is a dir and not .. or . then add it as a tab and go down. 558 // If it is a dir and not .. or . then add it as a tab and go down.
559 if(file->isDir()) 559 if(file->isDir())
560 { 560 {
561 if(file->fileName() != ".." && file->fileName() != ".") 561 if(file->fileName() != ".." && file->fileName() != ".")
562 { 562 {
563 rescanFolder(directory + "/" + file->fileName()); 563 rescanFolder(directory + "/" + file->fileName());
564 } 564 }
565 } 565 }
566 else 566 else
567 { 567 {
568 // If it is a backup file add to list. 568 // If it is a backup file add to list.
569 if(file->fileName().contains(EXTENSION)) 569 if(file->fileName().contains(EXTENSION))
570 (void)new QListViewItem(restoreList, file->fileName()); 570 (void)new QListViewItem(restoreList, file->fileName());
571 } 571 }
572 ++it; 572 ++it;
573 } 573 }
574} 574}
575 575
576/** 576/**
577 * Restore a backup file. 577 * Restore a backup file.
578 * Report errors or success 578 * Report errors or success
579 */ 579 */
580void BackupAndRestore::restore() 580void BackupAndRestore::restore()
581{ 581{
582 QListViewItem *restoreItem = restoreList->currentItem(); 582 QListViewItem *restoreItem = restoreList->currentItem();
583 if(!restoreItem) 583 if(!restoreItem)
584 { 584 {
585 QMessageBox::critical(this, tr( "Message" ), 585 QMessageBox::critical(this, tr( "Message" ),
586 tr( "Please select something to restore." ),QString( tr( "Ok") ) ); 586 tr( "Please select something to restore." ),QString( tr( "Ok") ) );
587 return; 587 return;
588 } 588 }
589 589
590 if ( QMessageBox::warning( this, tr( "Restore" ),
591 tr( "Would you really overwrite your local data?" ),
592 tr( "Yes" ), tr( "No" ), "", 1 ) == 1 )
593 return;
594
590 OWait *owait = new OWait(); 595 OWait *owait = new OWait();
591 Global::statusMessage( tr( "Restore Backup..." ) ); 596 Global::statusMessage( tr( "Restore Backup..." ) );
592 owait->show(); 597 owait->show();
593 qApp->processEvents(); 598 qApp->processEvents();
594 599
595 QString restoreFile = backupLocations[restoreSource->currentText()]; 600 QString restoreFile = backupLocations[restoreSource->currentText()];
596 601
597 restoreFile += "/" + restoreItem->text(0); 602 restoreFile += "/" + restoreItem->text(0);
598 603
599 odebug << restoreFile << oendl; 604 odebug << restoreFile << oendl;
600 605
601 //check if backup file come from opie 1.0.x 606 //check if backup file come from opie 1.0.x
602 607
603 QString commandLine = QString( "tar -tzf %1 | grep Applications/backup/exclude" ).arg( restoreFile.latin1() ); 608 QString commandLine = QString( "tar -tzf %1 | grep Applications/backup/exclude" ).arg( restoreFile.latin1() );
604 609
605 int r = system( commandLine ); 610 int r = system( commandLine );
606 611
607 QString startDir; 612 QString startDir;
608 613
609 if( r != 0 ) //Applications/backup/exclude not found - old backup file 614 if( r != 0 ) //Applications/backup/exclude not found - old backup file
610 { 615 {
611 startDir = QString( "/" ); 616 startDir = QString( "/" );
612 } else 617 } else
613 { 618 {
614 startDir = QDir::homeDirPath(); 619 startDir = QDir::homeDirPath();
615 } 620 }
616 621
617 //unpack backup file 622 //unpack backup file
618 commandLine = QString( "cd %1 && tar -zxf %2 2> %3" ).arg( startDir ) 623 commandLine = QString( "cd %1 && tar -zxf %2 2> %3" ).arg( startDir )
619 .arg( restoreFile.latin1() ) 624 .arg( restoreFile.latin1() )
620 .arg( tempFileName.latin1() ); 625 .arg( tempFileName.latin1() );
621 626
622 odebug << commandLine << oendl; 627 odebug << commandLine << oendl;
623 628
624 r = system( commandLine ); 629 r = system( commandLine );
625 630
626 owait->hide(); 631 owait->hide();
627 delete owait; 632 delete owait;
628 633
629 //error handling 634 //error handling
630 if(r != 0) 635 if(r != 0)
631 { 636 {
632 QString errorMsg= tr( "Error from System:\n" ) + (QString)strerror( errno ); 637 QString errorMsg= tr( "Error from System:\n" ) + (QString)strerror( errno );
633 switch( QMessageBox::critical(this, tr( "Message" ), tr( "Restore Failed." ) + "\n" 638 switch( QMessageBox::critical(this, tr( "Message" ), tr( "Restore Failed." ) + "\n"
634 + errorMsg, QString( tr( "Ok") ), QString( tr( "Details" ) ) ) ) 639 + errorMsg, QString( tr( "Ok") ), QString( tr( "Details" ) ) ) )
635 { 640 {
636 case 1: 641 case 1:
637 owarn << "Details pressed !" << oendl; 642 owarn << "Details pressed !" << oendl;
638 ErrorDialog* pErrDialog = new ErrorDialog( this, NULL, true ); 643 ErrorDialog* pErrDialog = new ErrorDialog( this, NULL, true );
639 QFile errorFile( tempFileName ); 644 QFile errorFile( tempFileName );
640 if ( errorFile.open(IO_ReadOnly) ) 645 if ( errorFile.open(IO_ReadOnly) )
641 { 646 {
642 QTextStream t( &errorFile ); 647 QTextStream t( &errorFile );
643 QString s; 648 QString s;
644 while ( !t.eof() ) 649 while ( !t.eof() )
645 { // until end of file... 650 { // until end of file...
646 s += t.readLine(); // line of text excluding '\n' 651 s += t.readLine(); // line of text excluding '\n'
647 } 652 }
648 errorFile.close(); 653 errorFile.close();
649 654
650 pErrDialog->m_textarea->setText( s ); 655 pErrDialog->m_textarea->setText( s );
651 } 656 }
652 else 657 else
653 { 658 {