author | zcarsten <zcarsten> | 2003-08-13 16:54:10 (UTC) |
---|---|---|
committer | zcarsten <zcarsten> | 2003-08-13 16:54:10 (UTC) |
commit | 7bb7c8f7f2af7854e3d50f07a8ff33ee3462c194 (patch) (unidiff) | |
tree | 06c6127d5a89ba75f127c709c3aaa46dcb38853e | |
parent | 1b22b22d6e50b46f3ea04b5a1cfc3dc9bfd8a78a (diff) | |
download | opie-7bb7c8f7f2af7854e3d50f07a8ff33ee3462c194.zip opie-7bb7c8f7f2af7854e3d50f07a8ff33ee3462c194.tar.gz opie-7bb7c8f7f2af7854e3d50f07a8ff33ee3462c194.tar.bz2 |
japanese support added (see defines JPATCH_HDE)
-rw-r--r-- | noncore/apps/zsafe/categorylist.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/zsafe/categorylist.h | 6 | ||||
-rw-r--r-- | noncore/apps/zsafe/zsafe.cpp | 199 |
3 files changed, 170 insertions, 41 deletions
diff --git a/noncore/apps/zsafe/categorylist.cpp b/noncore/apps/zsafe/categorylist.cpp index 2fa59d2..c5e8d66 100644 --- a/noncore/apps/zsafe/categorylist.cpp +++ b/noncore/apps/zsafe/categorylist.cpp | |||
@@ -14,17 +14,17 @@ CategoryList::~CategoryList() | |||
14 | 14 | ||
15 | void CategoryList::insert (QString key, Category *category) | 15 | void CategoryList::insert (QString key, Category *category) |
16 | { | 16 | { |
17 | categoryList.insert ((const char *) key, category); | 17 | categoryList.insert (key, category); |
18 | } | 18 | } |
19 | 19 | ||
20 | Category *CategoryList::find (QString key) | 20 | Category *CategoryList::find (QString key) |
21 | { | 21 | { |
22 | return categoryList.find ((const char *) key); | 22 | return categoryList.find (key); |
23 | } | 23 | } |
24 | 24 | ||
25 | void CategoryList::remove (QString key) | 25 | void CategoryList::remove (QString key) |
26 | { | 26 | { |
27 | categoryList.remove ((const char *) key); | 27 | categoryList.remove (key); |
28 | } | 28 | } |
29 | 29 | ||
30 | void CategoryList::clear() | 30 | void CategoryList::clear() |
diff --git a/noncore/apps/zsafe/categorylist.h b/noncore/apps/zsafe/categorylist.h index 96cf389..fc1c0a2 100644 --- a/noncore/apps/zsafe/categorylist.h +++ b/noncore/apps/zsafe/categorylist.h | |||
@@ -5,7 +5,9 @@ | |||
5 | #define _CATEGORY_LIST_H_ | 5 | #define _CATEGORY_LIST_H_ |
6 | 6 | ||
7 | #include <qstring.h> | 7 | #include <qstring.h> |
8 | #include <qasciidict.h> | 8 | |
9 | #include <qdict.h> | ||
10 | |||
9 | #include "category.h" | 11 | #include "category.h" |
10 | 12 | ||
11 | // list of Category | 13 | // list of Category |
@@ -21,7 +23,7 @@ public: | |||
21 | void remove (QString key); | 23 | void remove (QString key); |
22 | void clear(); | 24 | void clear(); |
23 | 25 | ||
24 | QAsciiDict<Category> categoryList; | 26 | QDict<Category> categoryList; |
25 | 27 | ||
26 | private: | 28 | private: |
27 | 29 | ||
diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp index 9341425..d55624b 100644 --- a/noncore/apps/zsafe/zsafe.cpp +++ b/noncore/apps/zsafe/zsafe.cpp | |||
@@ -14,6 +14,8 @@ | |||
14 | ** Linux Desktop : -DDESKTOP | 14 | ** Linux Desktop : -DDESKTOP |
15 | ** Windows Desktop: -DDESKTOP -DWIN32 | 15 | ** Windows Desktop: -DDESKTOP -DWIN32 |
16 | ** | 16 | ** |
17 | ** for japanese version additional use: -DJPATCH_HDE | ||
18 | ** | ||
17 | ****************************************************************************/ | 19 | ****************************************************************************/ |
18 | #include "zsafe.h" | 20 | #include "zsafe.h" |
19 | #include "newdialog.h" | 21 | #include "newdialog.h" |
@@ -454,13 +456,26 @@ ZSafe::ZSafe( QWidget* parent, const char* name, bool modal, WFlags fl ) | |||
454 | #else | 456 | #else |
455 | resize( DeskW, DeskH-30 ); | 457 | resize( DeskW, DeskH-30 ); |
456 | #endif | 458 | #endif |
457 | // setMinimumSize( QSize( DeskW, DeskH-30 ) ); | 459 | |
458 | // setMaximumSize( QSize( DeskW, DeskH-30 ) ); | 460 | #else |
461 | |||
462 | #ifdef JPATCH_HDE | ||
463 | int DeskS; | ||
464 | if(DeskW > DeskH) | ||
465 | { | ||
466 | DeskS = DeskW; | ||
467 | } | ||
468 | else | ||
469 | { | ||
470 | DeskS = DeskH; | ||
471 | } | ||
472 | resize( DeskW, DeskH ); | ||
473 | setMinimumSize( QSize( DeskS, DeskS ) ); | ||
474 | setMaximumSize( QSize( DeskS, DeskS ) ); | ||
459 | #else | 475 | #else |
460 | resize( DeskW, DeskH-30 ); | 476 | resize( DeskW, DeskH-30 ); |
461 | // setMinimumSize( QSize( DeskW, DeskH-30 ) ); | 477 | #endif |
462 | // setMaximumSize( QSize( 440, 290 ) ); | 478 | |
463 | // setMaximumSize( QSize( DeskW+400, DeskH+200 ) ); | ||
464 | #endif | 479 | #endif |
465 | // setCaption( tr( "ZSafe" ) ); | 480 | // setCaption( tr( "ZSafe" ) ); |
466 | 481 | ||
@@ -760,6 +775,22 @@ void ZSafe::editPwd() | |||
760 | #endif | 775 | #endif |
761 | if (result == Accepted) | 776 | if (result == Accepted) |
762 | { | 777 | { |
778 | #ifdef JPATCH_HDE | ||
779 | // edit the selected item | ||
780 | QString name = dialog->NameField->text(); | ||
781 | selectedItem->setText (0, name); | ||
782 | QString user = dialog->UsernameField->text(); | ||
783 | selectedItem->setText (1, user); | ||
784 | QString pwd = dialog->PasswordField->text(); | ||
785 | selectedItem->setText (2, pwd); | ||
786 | QString comment = dialog->CommentField->text(); | ||
787 | comment.replace (QRegExp("\n"), "<br>"); | ||
788 | selectedItem->setText (3, comment); | ||
789 | QString f5 = dialog->Field5->text(); | ||
790 | selectedItem->setText (4, f5); | ||
791 | QString f6 = dialog->Field6->text(); | ||
792 | selectedItem->setText (5, f6); | ||
793 | #else | ||
763 | modified = true; | 794 | modified = true; |
764 | // edit the selected item | 795 | // edit the selected item |
765 | QString name = dialog->NameField->text(); | 796 | QString name = dialog->NameField->text(); |
@@ -775,6 +806,7 @@ void ZSafe::editPwd() | |||
775 | selectedItem->setText (4, tr (f5)); | 806 | selectedItem->setText (4, tr (f5)); |
776 | QString f6 = dialog->Field6->text(); | 807 | QString f6 = dialog->Field6->text(); |
777 | selectedItem->setText (5, tr (f6)); | 808 | selectedItem->setText (5, tr (f6)); |
809 | #endif | ||
778 | } | 810 | } |
779 | 811 | ||
780 | delete dialog; | 812 | delete dialog; |
@@ -839,6 +871,20 @@ retype: | |||
839 | QListViewItem *i = new ShadedListItem (0, selectedItem); | 871 | QListViewItem *i = new ShadedListItem (0, selectedItem); |
840 | i->setOpen (TRUE); | 872 | i->setOpen (TRUE); |
841 | 873 | ||
874 | #ifdef JPATCH_HDE | ||
875 | i->setText (0, name); | ||
876 | QString user = dialog->UsernameField->text(); | ||
877 | i->setText (1, user); | ||
878 | QString pwd = dialog->PasswordField->text(); | ||
879 | i->setText (2, pwd); | ||
880 | QString comment = dialog->CommentField->text(); | ||
881 | comment.replace (QRegExp("\n"), "<br>"); | ||
882 | i->setText (3, comment); | ||
883 | QString f5 = dialog->Field5->text(); | ||
884 | i->setText (4, f5); | ||
885 | QString f6 = dialog->Field6->text(); | ||
886 | i->setText (5, f6); | ||
887 | #else | ||
842 | i->setText (0, tr (name)); | 888 | i->setText (0, tr (name)); |
843 | QString user = dialog->UsernameField->text(); | 889 | QString user = dialog->UsernameField->text(); |
844 | i->setText (1, tr (user)); | 890 | i->setText (1, tr (user)); |
@@ -851,6 +897,7 @@ retype: | |||
851 | i->setText (4, tr (f5)); | 897 | i->setText (4, tr (f5)); |
852 | QString f6 = dialog->Field6->text(); | 898 | QString f6 = dialog->Field6->text(); |
853 | i->setText (5, tr (f6)); | 899 | i->setText (5, tr (f6)); |
900 | #endif | ||
854 | } | 901 | } |
855 | 902 | ||
856 | delete dialog; | 903 | delete dialog; |
@@ -1204,7 +1251,7 @@ bool ZSafe::isCategory(QListViewItem *_item) | |||
1204 | return FALSE; | 1251 | return FALSE; |
1205 | 1252 | ||
1206 | QString categoryName = _item->text (0); | 1253 | QString categoryName = _item->text (0); |
1207 | if (categories.find ((const char *)categoryName)) | 1254 | if (categories.find (categoryName)) |
1208 | return TRUE; | 1255 | return TRUE; |
1209 | else | 1256 | else |
1210 | return FALSE; | 1257 | return FALSE; |
@@ -1433,7 +1480,11 @@ void ZSafe::readAllEntries() | |||
1433 | #else | 1480 | #else |
1434 | char buffer[4048]; | 1481 | char buffer[4048]; |
1435 | #endif | 1482 | #endif |
1436 | strcpy (buffer, s); | 1483 | |
1484 | |||
1485 | /* modify QString -> QCString::utf8 */ | ||
1486 | |||
1487 | strcpy (buffer, s.utf8()); | ||
1437 | 1488 | ||
1438 | QString name; | 1489 | QString name; |
1439 | QString user; | 1490 | QString user; |
@@ -1444,7 +1495,7 @@ void ZSafe::readAllEntries() | |||
1444 | 1495 | ||
1445 | // separete the entries | 1496 | // separete the entries |
1446 | char *i = strtok (buffer, "|"); | 1497 | char *i = strtok (buffer, "|"); |
1447 | QString category(&i[1]); | 1498 | QString category(QString::fromUtf8(&i[1])); |
1448 | category.truncate(category.length() -1); | 1499 | category.truncate(category.length() -1); |
1449 | 1500 | ||
1450 | int idx=0; | 1501 | int idx=0; |
@@ -1453,33 +1504,33 @@ void ZSafe::readAllEntries() | |||
1453 | switch (idx) | 1504 | switch (idx) |
1454 | { | 1505 | { |
1455 | case 0: | 1506 | case 0: |
1456 | name = &i[1]; | 1507 | name = QString::fromUtf8(&i[1]); |
1457 | name.truncate(name.length() -1); | 1508 | name.truncate(name.length() -1); |
1458 | // name | 1509 | // name |
1459 | break; | 1510 | break; |
1460 | case 1: | 1511 | case 1: |
1461 | // user | 1512 | // user |
1462 | user = &i[1]; | 1513 | user = QString::fromUtf8(&i[1]); |
1463 | user.truncate(user.length() -1); | 1514 | user.truncate(user.length() -1); |
1464 | break; | 1515 | break; |
1465 | case 2: | 1516 | case 2: |
1466 | // password | 1517 | // password |
1467 | password = &i[1]; | 1518 | password = QString::fromUtf8(&i[1]); |
1468 | password.truncate(password.length() -1); | 1519 | password.truncate(password.length() -1); |
1469 | break; | 1520 | break; |
1470 | case 3: | 1521 | case 3: |
1471 | // comment | 1522 | // comment |
1472 | comment = &i[1]; | 1523 | comment = QString::fromUtf8(&i[1]); |
1473 | comment.truncate(comment.length() -1); | 1524 | comment.truncate(comment.length() -1); |
1474 | break; | 1525 | break; |
1475 | case 4: | 1526 | case 4: |
1476 | // field5 | 1527 | // field5 |
1477 | field5 = &i[1]; | 1528 | field5 = QString::fromUtf8(&i[1]); |
1478 | field5.truncate(field5.length() -1); | 1529 | field5.truncate(field5.length() -1); |
1479 | break; | 1530 | break; |
1480 | case 5: | 1531 | case 5: |
1481 | // field6 | 1532 | // field6 |
1482 | field6 = &i[1]; | 1533 | field6 = QString::fromUtf8(&i[1]); |
1483 | field6.truncate(field6.length() -1); | 1534 | field6.truncate(field6.length() -1); |
1484 | break; | 1535 | break; |
1485 | } | 1536 | } |
@@ -1494,6 +1545,14 @@ void ZSafe::readAllEntries() | |||
1494 | if (catItem) | 1545 | if (catItem) |
1495 | { | 1546 | { |
1496 | QListViewItem * item = new ShadedListItem( 0, catItem ); | 1547 | QListViewItem * item = new ShadedListItem( 0, catItem ); |
1548 | #ifdef JPATCH_HDE | ||
1549 | item->setText( 0, name ); | ||
1550 | item->setText( 1, user ); | ||
1551 | item->setText( 2, password ); | ||
1552 | item->setText( 3, comment ); | ||
1553 | item->setText( 4, field5 ); | ||
1554 | item->setText( 5, field6 ); | ||
1555 | #else | ||
1497 | item->setText( 0, tr( name ) ); | 1556 | item->setText( 0, tr( name ) ); |
1498 | item->setText( 1, tr( user ) ); | 1557 | item->setText( 1, tr( user ) ); |
1499 | item->setText( 2, tr( password ) ); | 1558 | item->setText( 2, tr( password ) ); |
@@ -1501,6 +1560,7 @@ void ZSafe::readAllEntries() | |||
1501 | item->setText( 4, tr( field5 ) ); | 1560 | item->setText( 4, tr( field5 ) ); |
1502 | item->setText( 5, tr( field6 ) ); | 1561 | item->setText( 5, tr( field6 ) ); |
1503 | catItem->setOpen( TRUE ); | 1562 | catItem->setOpen( TRUE ); |
1563 | #endif | ||
1504 | } | 1564 | } |
1505 | } | 1565 | } |
1506 | else | 1566 | else |
@@ -1508,12 +1568,21 @@ void ZSafe::readAllEntries() | |||
1508 | QListViewItem *catI = new ShadedListItem( 1, ListView ); | 1568 | QListViewItem *catI = new ShadedListItem( 1, ListView ); |
1509 | // create and insert a new item | 1569 | // create and insert a new item |
1510 | QListViewItem * item = new ShadedListItem( 0, catI ); | 1570 | QListViewItem * item = new ShadedListItem( 0, catI ); |
1571 | #ifdef JPATCH_HDE | ||
1572 | item->setText( 0, name ); | ||
1573 | item->setText( 1, user ); | ||
1574 | item->setText( 2, password ); | ||
1575 | item->setText( 3, comment ); | ||
1576 | item->setText( 4, field5 ); | ||
1577 | item->setText( 5, field6 ); | ||
1578 | #else | ||
1511 | item->setText( 0, tr( name ) ); | 1579 | item->setText( 0, tr( name ) ); |
1512 | item->setText( 1, tr( user ) ); | 1580 | item->setText( 1, tr( user ) ); |
1513 | item->setText( 2, tr( password ) ); | 1581 | item->setText( 2, tr( password ) ); |
1514 | item->setText( 3, tr( comment ) ); | 1582 | item->setText( 3, tr( comment ) ); |
1515 | item->setText( 4, tr( field5 ) ); | 1583 | item->setText( 4, tr( field5 ) ); |
1516 | item->setText( 5, tr( field6 ) ); | 1584 | item->setText( 5, tr( field6 ) ); |
1585 | #endif | ||
1517 | catI->setOpen( TRUE ); | 1586 | catI->setOpen( TRUE ); |
1518 | 1587 | ||
1519 | Category *c1 = new Category(); | 1588 | Category *c1 = new Category(); |
@@ -1713,10 +1782,17 @@ void ZSafe::readAllEntries() | |||
1713 | if (catItem) | 1782 | if (catItem) |
1714 | { | 1783 | { |
1715 | QListViewItem * item = new ShadedListItem( 0, catItem ); | 1784 | QListViewItem * item = new ShadedListItem( 0, catItem ); |
1785 | #ifdef JPATCH_HDE | ||
1786 | item->setText( 0, name ); | ||
1787 | item->setText( 1, user ); | ||
1788 | item->setText( 2, password ); | ||
1789 | item->setText( 3, comment ); | ||
1790 | #else | ||
1716 | item->setText( 0, tr( name ) ); | 1791 | item->setText( 0, tr( name ) ); |
1717 | item->setText( 1, tr( user ) ); | 1792 | item->setText( 1, tr( user ) ); |
1718 | item->setText( 2, tr( password ) ); | 1793 | item->setText( 2, tr( password ) ); |
1719 | item->setText( 3, tr( comment ) ); | 1794 | item->setText( 3, tr( comment ) ); |
1795 | #endif | ||
1720 | catItem->setOpen( TRUE ); | 1796 | catItem->setOpen( TRUE ); |
1721 | } | 1797 | } |
1722 | } | 1798 | } |
@@ -1725,10 +1801,17 @@ void ZSafe::readAllEntries() | |||
1725 | QListViewItem *catI = new ShadedListItem( 1, ListView ); | 1801 | QListViewItem *catI = new ShadedListItem( 1, ListView ); |
1726 | // create and insert a new item | 1802 | // create and insert a new item |
1727 | QListViewItem * item = new ShadedListItem( 0, catI ); | 1803 | QListViewItem * item = new ShadedListItem( 0, catI ); |
1804 | #ifdef JPATCH_HDE | ||
1805 | item->setText( 0, name ); | ||
1806 | item->setText( 1, user ); | ||
1807 | item->setText( 2, password ); | ||
1808 | item->setText( 3, comment ); | ||
1809 | #else | ||
1728 | item->setText( 0, tr( name ) ); | 1810 | item->setText( 0, tr( name ) ); |
1729 | item->setText( 1, tr( user ) ); | 1811 | item->setText( 1, tr( user ) ); |
1730 | item->setText( 2, tr( password ) ); | 1812 | item->setText( 2, tr( password ) ); |
1731 | item->setText( 3, tr( comment ) ); | 1813 | item->setText( 3, tr( comment ) ); |
1814 | #endif | ||
1732 | catI->setOpen( TRUE ); | 1815 | catI->setOpen( TRUE ); |
1733 | 1816 | ||
1734 | Category *c1 = new Category(); | 1817 | Category *c1 = new Category(); |
@@ -1909,13 +1992,13 @@ bool ZSafe::openDocument(const char* _filename, const char* ) | |||
1909 | int numberOfEntries=0; | 1992 | int numberOfEntries=0; |
1910 | while (retval == 1) { | 1993 | while (retval == 1) { |
1911 | 1994 | ||
1912 | QString category(entry[0]); | 1995 | QString category( QString::fromUtf8(entry[0]) ); |
1913 | QString name(entry[1]); | 1996 | QString name( QString::fromUtf8(entry[1]) ); |
1914 | QString user(entry[2]); | 1997 | QString user( QString::fromUtf8(entry[2]) ); |
1915 | QString password(entry[3]); | 1998 | QString password( QString::fromUtf8(entry[3]) ); |
1916 | QString comment(entry[4]); | 1999 | QString comment( QString::fromUtf8(entry[4]) ); |
1917 | QString field5(entry[5]); | 2000 | QString field5( QString::fromUtf8(entry[5]) ); |
1918 | QString field6(entry[6]); | 2001 | QString field6( QString::fromUtf8(entry[6]) ); |
1919 | // add the subitems to the categories | 2002 | // add the subitems to the categories |
1920 | 2003 | ||
1921 | Category *cat= categories.find (category); | 2004 | Category *cat= categories.find (category); |
@@ -1926,12 +2009,21 @@ bool ZSafe::openDocument(const char* _filename, const char* ) | |||
1926 | if (catItem) | 2009 | if (catItem) |
1927 | { | 2010 | { |
1928 | QListViewItem * item = new ShadedListItem( 0, catItem ); | 2011 | QListViewItem * item = new ShadedListItem( 0, catItem ); |
2012 | #ifdef JPATCH_HDE | ||
2013 | item->setText( 0, name ); | ||
2014 | item->setText( 1, user ); | ||
2015 | item->setText( 2, password ); | ||
2016 | item->setText( 3, comment ); | ||
2017 | item->setText( 4, field5 ); | ||
2018 | item->setText( 5, field6 ); | ||
2019 | #else | ||
1929 | item->setText( 0, tr( name ) ); | 2020 | item->setText( 0, tr( name ) ); |
1930 | item->setText( 1, tr( user ) ); | 2021 | item->setText( 1, tr( user ) ); |
1931 | item->setText( 2, tr( password ) ); | 2022 | item->setText( 2, tr( password ) ); |
1932 | item->setText( 3, tr( comment ) ); | 2023 | item->setText( 3, tr( comment ) ); |
1933 | item->setText( 4, tr( field5 ) ); | 2024 | item->setText( 4, tr( field5 ) ); |
1934 | item->setText( 5, tr( field6 ) ); | 2025 | item->setText( 5, tr( field6 ) ); |
2026 | #endif | ||
1935 | if (expandTree) | 2027 | if (expandTree) |
1936 | catItem->setOpen( TRUE ); | 2028 | catItem->setOpen( TRUE ); |
1937 | numberOfEntries++; | 2029 | numberOfEntries++; |
@@ -1942,12 +2034,21 @@ bool ZSafe::openDocument(const char* _filename, const char* ) | |||
1942 | QListViewItem *catI = new ShadedListItem( 1, ListView ); | 2034 | QListViewItem *catI = new ShadedListItem( 1, ListView ); |
1943 | // create and insert a new item | 2035 | // create and insert a new item |
1944 | QListViewItem * item = new ShadedListItem( 0, catI ); | 2036 | QListViewItem * item = new ShadedListItem( 0, catI ); |
2037 | #ifdef JPATCH_HDE | ||
2038 | item->setText( 0, name ); | ||
2039 | item->setText( 1, user ); | ||
2040 | item->setText( 2, password ); | ||
2041 | item->setText( 3, comment ); | ||
2042 | item->setText( 4, field5 ); | ||
2043 | item->setText( 5, field6 ); | ||
2044 | #else | ||
1945 | item->setText( 0, tr( name ) ); | 2045 | item->setText( 0, tr( name ) ); |
1946 | item->setText( 1, tr( user ) ); | 2046 | item->setText( 1, tr( user ) ); |
1947 | item->setText( 2, tr( password ) ); | 2047 | item->setText( 2, tr( password ) ); |
1948 | item->setText( 3, tr( comment ) ); | 2048 | item->setText( 3, tr( comment ) ); |
1949 | item->setText( 4, tr( field5 ) ); | 2049 | item->setText( 4, tr( field5 ) ); |
1950 | item->setText( 5, tr( field6 ) ); | 2050 | item->setText( 5, tr( field6 ) ); |
2051 | #endif | ||
1951 | if (expandTree) | 2052 | if (expandTree) |
1952 | catI->setOpen( TRUE ); | 2053 | catI->setOpen( TRUE ); |
1953 | 2054 | ||
@@ -2259,21 +2360,20 @@ bool ZSafe::saveDocument(const char* _filename, | |||
2259 | si = si->nextSibling()) | 2360 | si = si->nextSibling()) |
2260 | { | 2361 | { |
2261 | int j=0; | 2362 | int j=0; |
2262 | entry[j] = (char*)malloc(strlen(i->text(0))+1); | 2363 | entry[j] = (char*)malloc(strlen(i->text(0).utf8())+1); |
2263 | strcpy(entry[j++], i->text(0)); | 2364 | strcpy(entry[j++], i->text(0).utf8()); |
2264 | entry[j] = (char*)malloc(strlen(si->text(0))+1); | 2365 | entry[j] = (char*)malloc(strlen(si->text(0).utf8())+1); |
2265 | strcpy(entry[j++], si->text(0)); | 2366 | strcpy(entry[j++], si->text(0).utf8()); |
2266 | entry[j] = (char*)malloc(strlen(si->text(1))+1); | 2367 | entry[j] = (char*)malloc(strlen(si->text(1).utf8())+1); |
2267 | strcpy(entry[j++], si->text(1)); | 2368 | strcpy(entry[j++], si->text(1).utf8()); |
2268 | entry[j] = (char*)malloc(strlen(si->text(2))+1); | 2369 | entry[j] = (char*)malloc(strlen(si->text(2).utf8())+1); |
2269 | strcpy(entry[j++], si->text(2)); | 2370 | strcpy(entry[j++], si->text(2).utf8()); |
2270 | entry[j] = (char*)malloc(strlen(si->text(3))+1); | 2371 | entry[j] = (char*)malloc(strlen(si->text(3).utf8())+1); |
2271 | strcpy(entry[j++], si->text(3)); | 2372 | strcpy(entry[j++], si->text(3).utf8()); |
2272 | 2373 | entry[j] = (char*)malloc(strlen(si->text(4).utf8())+1); | |
2273 | entry[j] = (char*)malloc(strlen(si->text(4))+1); | 2374 | strcpy(entry[j++], si->text(4).utf8()); |
2274 | strcpy(entry[j++], si->text(4)); | 2375 | entry[j] = (char*)malloc(strlen(si->text(5).utf8())+1); |
2275 | entry[j] = (char*)malloc(strlen(si->text(5))+1); | 2376 | strcpy(entry[j++], si->text(5).utf8()); |
2276 | strcpy(entry[j++], si->text(5)); | ||
2277 | 2377 | ||
2278 | retval = saveEntry(entry); | 2378 | retval = saveEntry(entry); |
2279 | for (int z=0; z<j; z++) | 2379 | for (int z=0; z<j; z++) |
@@ -3203,8 +3303,13 @@ void ZSafe::editCategory() | |||
3203 | if (catItem) | 3303 | if (catItem) |
3204 | { | 3304 | { |
3205 | qWarning (category); | 3305 | qWarning (category); |
3306 | #ifdef JPATCH_HDE | ||
3307 | catItem->setText( 0, category ); | ||
3308 | cat->setCategoryName (category); | ||
3309 | #else | ||
3206 | catItem->setText( 0, tr( category ) ); | 3310 | catItem->setText( 0, tr( category ) ); |
3207 | cat->setCategoryName (tr(category)); | 3311 | cat->setCategoryName (tr(category)); |
3312 | #endif | ||
3208 | cat->initListItem(); | 3313 | cat->initListItem(); |
3209 | categories.insert (category, cat); | 3314 | categories.insert (category, cat); |
3210 | } | 3315 | } |
@@ -3529,6 +3634,27 @@ void ZSafe::saveDocumentWithPwd() | |||
3529 | void ZSafe::about() | 3634 | void ZSafe::about() |
3530 | { | 3635 | { |
3531 | QString info; | 3636 | QString info; |
3637 | #ifdef JPATCH_HDE | ||
3638 | info = "<html><body><div align=""center"">"; | ||
3639 | info += "<b>"; | ||
3640 | info += tr("Zaurus Password Manager<br>"); | ||
3641 | info += tr("ZSafe version 2.1.2-jv01b<br>"); | ||
3642 | info += "</b>"; | ||
3643 | info += tr("by Carsten Schneider<br>"); | ||
3644 | info += "zcarsten@gmx.net<br>"; | ||
3645 | info += "http://z-soft.z-portal.info/zsafe"; | ||
3646 | info += "<br>"; | ||
3647 | info += tr("Translations by Robert Ernst<br>"); | ||
3648 | info += "robert.ernst@linux-solutions.at<br>"; | ||
3649 | |||
3650 | info += "<br><br>"; | ||
3651 | info += QString::fromUtf8("æ~W¥æ~\\¬èª~^/VGA Zaurus対å¿~\\ã~C~Qã~C~Cã~C~Aä½~\\æ ~H~P<br>"); | ||
3652 | info += "HADECO R&D<br>"; | ||
3653 | info += "r&d@hadeco.co.jp<br>"; | ||
3654 | info += "http://www.hadeco.co.jp/r&d/<br>"; | ||
3655 | info += "<br></div>"; | ||
3656 | info += "</body></html>"; | ||
3657 | #else | ||
3532 | info = "<html><body><div align=""center"">"; | 3658 | info = "<html><body><div align=""center"">"; |
3533 | info += "<b>"; | 3659 | info += "<b>"; |
3534 | info += tr("Zaurus Password Manager<br>"); | 3660 | info += tr("Zaurus Password Manager<br>"); |
@@ -3542,6 +3668,7 @@ void ZSafe::about() | |||
3542 | info += "robert.ernst@linux-solutions.at<br>"; | 3668 | info += "robert.ernst@linux-solutions.at<br>"; |
3543 | info += "<br></div>"; | 3669 | info += "<br></div>"; |
3544 | info += "</body></html>"; | 3670 | info += "</body></html>"; |
3671 | #endif | ||
3545 | 3672 | ||
3546 | // QMessageBox::information( this, tr("ZSafe"), info, tr("&OK"), 0); | 3673 | // QMessageBox::information( this, tr("ZSafe"), info, tr("&OK"), 0); |
3547 | 3674 | ||