author | mickeyl <mickeyl> | 2004-05-26 16:17:16 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-05-26 16:17:16 (UTC) |
commit | 9a79c3bb271234396696dc54ee52f2a0c2a461d6 (patch) (side-by-side diff) | |
tree | feedc8e51e45f24fbfe376dd18523c14a1c30433 | |
parent | 2b7ebd326a7e6456471bb973b14b4ad7affb9a9d (diff) | |
download | opie-9a79c3bb271234396696dc54ee52f2a0c2a461d6.zip opie-9a79c3bb271234396696dc54ee52f2a0c2a461d6.tar.gz opie-9a79c3bb271234396696dc54ee52f2a0c2a461d6.tar.bz2 |
BUGFIX: Fixed ZSafe not starting up (Bug #1324)
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | noncore/apps/zsafe/zsafe.cpp | 49 |
2 files changed, 11 insertions, 39 deletions
@@ -1,47 +1,48 @@ 2004-??-?? The Opie Team <opie@handhelds.org> + * Fixed ZSafe not starting up (Bug #1324) (mickeyl) * Fixed Drawpad initialization (Bug #1314) (mickeyl) * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) * Added Conversion tool for pim-data (eilers) * Modifcation of the PIM API for providing generic use of OPimRecords. (eilers) 2004-25-04 The Opie Team <opie@handhelds.org> * Released as Version 1.1.3 (devel) * Introduced first implementation of SQL-Support using SQLite (eilers) * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) * Added a real system graffiti character set (brad) * Added Generic Keyconfig Widget (zecke) * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) * Added new Bible reader app - opie-dagger (drw) * Added a new Image Viewer. Work is ongoing (zecke,alwin) * Added namespace usage in libopie2 and everywhere (zecke,alwin) * Enabled the possibility to pass command line arguments to applications (mickeyl) * Added an about applet showing some credits and information about Opie (mickeyl) * Added benchmarking functionality to sysinfo (mickeyl) * Added applet and configuration application for switching hardware keyboard layouts (alwin) * Ported applications from libopie1 to libopie2* (drw,ar,alwin) * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) * Clean-up of package information in control files (drw) * Repaired mediummount which was broken since integrating the quicklauncher (alwin) * Improved big-screen support (zecke,ar) * Improved multikeyboard support, added keyboard layout switching applet (mouse) * Added a new mail client based on libetpan (harlekin,alwin,jgf) * Added new package manager - opie-packagemanager (drw) * Improved light-n-power for C7x0 (mickeyl) * Added automatic rotation support for C7x0 (treke) * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) * Added scanning the wireless network neighbourhood to networksettings (mickeyl) 2003-11-29 The Opie Team <opie@handhelds.org> * Released as Version 1.0.3 * Improved i18n (various contributors) * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) * Made the Documents Tab optional (mickeyl) * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) 2003-08-04 The Opie Team <opie@handhelds.org> * Released as Version 1.0.0 * Including a PPP module for easy dial up (tille,harlekin,zecke) diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp index bf8f7f4..6ff05ac 100644 --- a/noncore/apps/zsafe/zsafe.cpp +++ b/noncore/apps/zsafe/zsafe.cpp @@ -442,149 +442,120 @@ ZSafe::ZSafe( QWidget* parent, const char* name, bool modal, WFlags fl ) QPixmap edit_img((const char**) edit_xpm); QPixmap editdelete_img((const char**) editdelete_xpm); QPixmap find_img((const char**) find_xpm); QPixmap folder_open_img((const char**) folder_open_xpm); QPixmap help_icon_img((const char**) help_icon_xpm); QPixmap new_img((const char**) new_xpm); QPixmap paste_img((const char**) paste_xpm); QPixmap quit_icon_img((const char**) quit_icon_xpm); QPixmap save_img((const char**) save_xpm); QPixmap trash_img((const char**) trash_xpm); QPixmap expand_img((const char**) expand_xpm); QPixmap export_img((const char**) export_xpm); QPixmap import_img((const char**) import_xpm); QPixmap bank_cards( ( const char** ) bank_cards_data ); QPixmap passwords( ( const char** ) passwords_data ); QPixmap software( ( const char** ) software_data ); QPixmap general( ( const char** ) general_data ); if ( !name ) setName( "ZSafe" ); #ifdef DESKTOP #ifdef WIN32 setGeometry(100, 150, DeskW, DeskH-30 ); #else resize( DeskW, DeskH-30 ); #endif #else #ifdef JPATCH_HDE int DeskS; if(DeskW > DeskH) { DeskS = DeskW; } else { DeskS = DeskH; } resize( DeskW, DeskH ); setMinimumSize( QSize( DeskS, DeskS ) ); setMaximumSize( QSize( DeskS, DeskS ) ); #else resize( DeskW, DeskH-30 ); #endif #endif - // setCaption( tr( "ZSafe" ) ); - - filename = conf->readEntry(APP_KEY+"document"); + setCaption( tr( "ZSafe" ) ); + QString zsafeAppDirPath = QDir::homeDirPath() + "/Documents/application/zsafe"; + QString filename = conf->readEntry(APP_KEY+"document"); if (filename.isEmpty() || filename.isNull()) { - - // check if the directory application exists, if not - // create it -// #ifndef WIN32 - // QString d1("Documents/application"); -// #else - QString d1(QDir::homeDirPath() + "/Documents/application"); -// #endif - QDir pd1(d1); - if (!pd1.exists()) - { - QDir pd1("Documents"); - if (!pd1.mkdir("application", FALSE)) + if ( !QDir( zsafeAppDirPath ).exists() ) { - QMessageBox::critical( 0, tr("ZSafe"), -#ifdef JPATCH_HDE - tr("Can't create directory\n.../Documents/application\n\nZSafe will now exit.")); -#else - tr("Can't create directory\n%1\n\nZSafe will now exit.").arg(d1)); -#endif - exitZs (1); - } + //FIXME: Pending someone to look into why QDir.mkdir does not work as expected + QString cmdline = QString().sprintf( "mkdir -p %s", (const char*) zsafeAppDirPath ); + ::system( cmdline ); } - QString d2(QDir::homeDirPath() + "/Documents/application/zsafe"); - QDir pd2(d2); - if (!pd2.exists()) - { - QDir pd2(QDir::homeDirPath() + "Documents/application"); - if (!pd2.mkdir("zsafe", FALSE)) + if ( !QDir( zsafeAppDirPath ).exists() ) { - QMessageBox::critical( 0, tr("ZSafe"), -#ifdef JPATCH_HDE - tr("Can't create directory\n...//Documents/application/zsafe\n\nZSafe will now exit.")); -#else - tr("Can't create directory\n%1\n\nZSafe will now exit.").arg(d2)); -#endif + QMessageBox::critical( 0, "ZSafe", tr("Can't create application data directory.\nZSafe will now exit.")); exitZs (1); } } - // set the default filename - filename=d2 + "/passwords.zsf"; + filename = zsafeAppDirPath + "/passwords.zsf"; // save the current filename to the config file conf->writeEntry(APP_KEY+"document", filename); saveConf(); - } //if (filename == "INVALIDPWD") //filename = ""; QString ti = filename.right (filename.length() - filename.findRev ('/') - 1); #ifdef WIN32 this->setCaption("Qt ZSafe: " + ti); #else this->setCaption("ZSafe: " + ti); #endif selectedItem = NULL; lastSearchedCategory = NULL; lastSearchedItem = NULL; lastSearchedName = ""; lastSearchedUsername = ""; lastSearchedComment = ""; infoForm = new InfoForm(); categoryDialog = NULL; // add a menu bar QMenuBar *menu = new QMenuBar( this ); // add file menu // QPopupMenu *file = new QPopupMenu( this ); file = new QPopupMenu( this ); // #ifdef DESKTOP file->insertItem( new_img, tr("&New document"), this, SLOT(newDocument()) ); file->insertItem( folder_open_img, tr("&Open document"), this, SLOT(loadDocument()) ); file->insertItem( save_img, tr("&Save document as .."), this, SLOT(saveDocumentAs()) ); file->insertSeparator(); // #endif file->insertItem( save_img, tr("&Save document"), this, SLOT(saveDocumentWithoutPwd()) ); file->insertItem( save_img, tr("S&ave document with new Password"), this, SLOT(saveDocumentWithPwd()) ); file->insertSeparator(); file->insertItem( export_img, tr("&Export text file"), this, SLOT(writeAllEntries()) ); file->insertItem( import_img, tr("&Import text file"), this, SLOT(readAllEntries()) ); file->insertItem( trash_img, tr("&Remove text file"), this, SLOT(removeAsciiFile()) ); file->insertSeparator(); file->insertItem( expand_img, tr("&Open entries expanded"), this, SLOT(setExpandFlag()), 0, 'o'); file->setItemChecked('o', expandTree); file->insertSeparator(); file->insertItem( quit_icon_img, tr("E&xit"), this, SLOT(quitMe()) ); |