author | zcarsten <zcarsten> | 2003-08-14 07:10:23 (UTC) |
---|---|---|
committer | zcarsten <zcarsten> | 2003-08-14 07:10:23 (UTC) |
commit | 1ff9232b95b7f8ea0d841a3b9219eaa7e82f1d62 (patch) (side-by-side diff) | |
tree | 953026506eca01ba05fbee7a97e6c321750587f0 /noncore/apps/zsafe/zsafe.cpp | |
parent | 7812d22080064f97d964dcbc3b085fde586a97d7 (diff) | |
download | opie-1ff9232b95b7f8ea0d841a3b9219eaa7e82f1d62.zip opie-1ff9232b95b7f8ea0d841a3b9219eaa7e82f1d62.tar.gz opie-1ff9232b95b7f8ea0d841a3b9219eaa7e82f1d62.tar.bz2 |
code clean up against previous version
Diffstat (limited to 'noncore/apps/zsafe/zsafe.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/zsafe/zsafe.cpp | 106 |
1 files changed, 19 insertions, 87 deletions
diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp index d55624b..43565ee 100644 --- a/noncore/apps/zsafe/zsafe.cpp +++ b/noncore/apps/zsafe/zsafe.cpp @@ -103,2 +103,6 @@ extern QPEApplication *appl; +#ifdef JPATCH_HDE +#define tr(arg) arg +#endif + @@ -499,3 +503,7 @@ ZSafe::ZSafe( QWidget* parent, const char* name, bool modal, WFlags fl ) 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); @@ -515,3 +523,7 @@ ZSafe::ZSafe( QWidget* parent, const char* name, bool modal, WFlags fl ) 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 exitZs (1); @@ -777,18 +789,2 @@ void ZSafe::editPwd() { -#ifdef JPATCH_HDE - // edit the selected item - QString name = dialog->NameField->text(); - selectedItem->setText (0, name); - QString user = dialog->UsernameField->text(); - selectedItem->setText (1, user); - QString pwd = dialog->PasswordField->text(); - selectedItem->setText (2, pwd); - QString comment = dialog->CommentField->text(); - comment.replace (QRegExp("\n"), "<br>"); - selectedItem->setText (3, comment); - QString f5 = dialog->Field5->text(); - selectedItem->setText (4, f5); - QString f6 = dialog->Field6->text(); - selectedItem->setText (5, f6); -#else modified = true; @@ -808,3 +804,2 @@ void ZSafe::editPwd() selectedItem->setText (5, tr (f6)); -#endif } @@ -873,16 +868,2 @@ retype: -#ifdef JPATCH_HDE - i->setText (0, name); - QString user = dialog->UsernameField->text(); - i->setText (1, user); - QString pwd = dialog->PasswordField->text(); - i->setText (2, pwd); - QString comment = dialog->CommentField->text(); - comment.replace (QRegExp("\n"), "<br>"); - i->setText (3, comment); - QString f5 = dialog->Field5->text(); - i->setText (4, f5); - QString f6 = dialog->Field6->text(); - i->setText (5, f6); -#else i->setText (0, tr (name)); @@ -899,3 +880,2 @@ retype: i->setText (5, tr (f6)); -#endif } @@ -1547,10 +1527,2 @@ void ZSafe::readAllEntries() QListViewItem * item = new ShadedListItem( 0, catItem ); -#ifdef JPATCH_HDE - item->setText( 0, name ); - item->setText( 1, user ); - item->setText( 2, password ); - item->setText( 3, comment ); - item->setText( 4, field5 ); - item->setText( 5, field6 ); -#else item->setText( 0, tr( name ) ); @@ -1562,3 +1534,2 @@ void ZSafe::readAllEntries() catItem->setOpen( TRUE ); -#endif } @@ -1570,10 +1541,2 @@ void ZSafe::readAllEntries() QListViewItem * item = new ShadedListItem( 0, catI ); -#ifdef JPATCH_HDE - item->setText( 0, name ); - item->setText( 1, user ); - item->setText( 2, password ); - item->setText( 3, comment ); - item->setText( 4, field5 ); - item->setText( 5, field6 ); -#else item->setText( 0, tr( name ) ); @@ -1584,3 +1547,3 @@ void ZSafe::readAllEntries() item->setText( 5, tr( field6 ) ); -#endif + catI->setOpen( TRUE ); @@ -1784,8 +1747,2 @@ void ZSafe::readAllEntries() QListViewItem * item = new ShadedListItem( 0, catItem ); -#ifdef JPATCH_HDE - item->setText( 0, name ); - item->setText( 1, user ); - item->setText( 2, password ); - item->setText( 3, comment ); -#else item->setText( 0, tr( name ) ); @@ -1794,3 +1751,3 @@ void ZSafe::readAllEntries() item->setText( 3, tr( comment ) ); -#endif + catItem->setOpen( TRUE ); @@ -1803,8 +1760,2 @@ void ZSafe::readAllEntries() QListViewItem * item = new ShadedListItem( 0, catI ); -#ifdef JPATCH_HDE - item->setText( 0, name ); - item->setText( 1, user ); - item->setText( 2, password ); - item->setText( 3, comment ); -#else item->setText( 0, tr( name ) ); @@ -1813,3 +1764,3 @@ void ZSafe::readAllEntries() item->setText( 3, tr( comment ) ); -#endif + catI->setOpen( TRUE ); @@ -2011,10 +1962,2 @@ bool ZSafe::openDocument(const char* _filename, const char* ) QListViewItem * item = new ShadedListItem( 0, catItem ); -#ifdef JPATCH_HDE - item->setText( 0, name ); - item->setText( 1, user ); - item->setText( 2, password ); - item->setText( 3, comment ); - item->setText( 4, field5 ); - item->setText( 5, field6 ); -#else item->setText( 0, tr( name ) ); @@ -2025,3 +1968,3 @@ bool ZSafe::openDocument(const char* _filename, const char* ) item->setText( 5, tr( field6 ) ); -#endif + if (expandTree) @@ -2036,10 +1979,3 @@ bool ZSafe::openDocument(const char* _filename, const char* ) QListViewItem * item = new ShadedListItem( 0, catI ); -#ifdef JPATCH_HDE - item->setText( 0, name ); - item->setText( 1, user ); - item->setText( 2, password ); - item->setText( 3, comment ); - item->setText( 4, field5 ); - item->setText( 5, field6 ); -#else + item->setText( 0, tr( name ) ); @@ -2050,3 +1986,3 @@ bool ZSafe::openDocument(const char* _filename, const char* ) item->setText( 5, tr( field6 ) ); -#endif + if (expandTree) @@ -3305,9 +3241,5 @@ void ZSafe::editCategory() qWarning (category); -#ifdef JPATCH_HDE - catItem->setText( 0, category ); - cat->setCategoryName (category); -#else catItem->setText( 0, tr( category ) ); cat->setCategoryName (tr(category)); -#endif + cat->initListItem(); |