summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/pwm.cpp
Unidiff
Diffstat (limited to 'pwmanager/pwmanager/pwm.cpp') (more/less context) (show whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwm.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index c511661..66d26d6 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -723,14 +723,14 @@ void PwM::editPwd_slot3(const QString *category, const int *index,
723 currItem.url = w.getUrl().latin1(); 723 currItem.url = w.getUrl().latin1();
724 currItem.launcher = w.getLauncher().latin1(); 724 currItem.launcher = w.getLauncher().latin1();
725 if (!doc->editEntry(curCategory, w.getCategory(), 725 if (!doc->editEntry(curCategory, w.getCategory(),
726 curEntryIndex, &currItem)) { 726 curEntryIndex, &currItem)) {
727 KMessageBox::error(this, 727 KMessageBox::error(this,
728 i18n("Couldn't edit the entry.\n" 728 i18n("Couldn't edit the entry.\n"
729 "Maybe you changed the category and " 729 "Maybe you changed the category and\n"
730 "this entry is already present in the new " 730 "this entry is already present\nin the new "
731 "category?"), 731 "category?"),
732 i18n("couldn't edit entry.")); 732 i18n("couldn't edit entry."));
733 doc->timer()->putLock(DocTimer::id_autoLockTimer); 733 doc->timer()->putLock(DocTimer::id_autoLockTimer);
734 return; 734 return;
735 } 735 }
736 } 736 }
@@ -912,27 +912,27 @@ void PwM::exportToText()
912 } 912 }
913 913
914 PwMerror ret = curDoc()->exportToText(&fn); 914 PwMerror ret = curDoc()->exportToText(&fn);
915 if (ret != e_success) { 915 if (ret != e_success) {
916 KMessageBox::error(this, 916 KMessageBox::error(this,
917 i18n("Error: Couldn't write to file.\n" 917 i18n("Error: Couldn't write to file.\n"
918 "Please check if you have permission to write " 918 "Please check if you have permission to write\n"
919 "to the file in that directory."), 919 "to the file in that directory."),
920 i18n("error while writing")); 920 i18n("error while writing"));
921 } else 921 } else
922 showStatMsg(i18n("Successfully exported data.")); 922 showStatMsg(i18n("Successfully exported data."));
923 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 923 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
924} 924}
925 925
926bool PwM::importFromText() 926bool PwM::importFromText()
927{ 927{
928 if (!isVirgin()) { 928 if (!isVirgin()) {
929 if (KMessageBox::questionYesNo(this, 929 if (KMessageBox::questionYesNo(this,
930 i18n("Do you want to import the data " 930 i18n("Do you want to import the data\n"
931 "into the current document? (If you " 931 "into the current document? (If you\n"
932 "select \"no\", a new document will be " 932 "select \"no\", a new document will be\n"
933 "opened.)"), 933 "opened.)"),
934 i18n("import into this document?")) 934 i18n("import into this document?"))
935 == KMessageBox::No) { 935 == KMessageBox::No) {
936 // import the data to a new window. 936 // import the data to a new window.
937 PwM *newInstance = init->createMainWnd(); 937 PwM *newInstance = init->createMainWnd();
938 bool ok = newInstance->importFromText(); 938 bool ok = newInstance->importFromText();
@@ -953,23 +953,23 @@ bool PwM::importFromText()
953 goto cancelImport; 953 goto cancelImport;
954 954
955 ret = curDoc()->importFromText(&path, 0); 955 ret = curDoc()->importFromText(&path, 0);
956 if (ret == e_fileFormat) { 956 if (ret == e_fileFormat) {
957 KMessageBox::error(this, 957 KMessageBox::error(this,
958 i18n("Could not read file-format.\n" 958 i18n("Could not read file-format.\n"
959 "This seems to be _not_ a valid file " 959 "This seems to be _not_ a valid file\n"
960 "exported by PwM."), 960 "exported by PwM."),
961 i18n("invalid file-format")); 961 i18n("invalid file-format"));
962 goto cancelImport; 962 goto cancelImport;
963 } else if (ret == e_invalidArg) { 963 } else if (ret == e_invalidArg) {
964 BUG(); 964 BUG();
965 goto cancelImport; 965 goto cancelImport;
966 } else if (ret != e_success) { 966 } else if (ret != e_success) {
967 KMessageBox::error(this, 967 KMessageBox::error(this,
968 i18n("Could not import file!\n" 968 i18n("Could not import file!\n"
969 "Do you have permission to read this file? " 969 "Do you have permission to read this file?\n"
970 "Do you have enough free memory?"), 970 "Do you have enough free memory?"),
971 i18n("import failed")); 971 i18n("import failed"));
972 goto cancelImport; 972 goto cancelImport;
973 } 973 }
974 setVirgin(false); 974 setVirgin(false);
975 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 975 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
@@ -1046,15 +1046,15 @@ void PwM::exportToKWallet()
1046} 1046}
1047 1047
1048bool PwM::importFromGpasman() 1048bool PwM::importFromGpasman()
1049{ 1049{
1050 if (!isVirgin()) { 1050 if (!isVirgin()) {
1051 if (KMessageBox::questionYesNo(this, 1051 if (KMessageBox::questionYesNo(this,
1052 i18n("Do you want to import the data " 1052 i18n("Do you want to import the data\n"
1053 "into the current document? (If you " 1053 "into the current document? (If you\n"
1054 "select \"no\", a new document will be " 1054 "select \"no\", a new document will be\n"
1055 "opened.)"), 1055 "opened.)"),
1056 i18n("import into this document?")) 1056 i18n("import into this document?"))
1057 == KMessageBox::No) { 1057 == KMessageBox::No) {
1058 // import the data to a new window. 1058 // import the data to a new window.
1059 PwM *newInstance = init->createMainWnd(); 1059 PwM *newInstance = init->createMainWnd();
1060 bool ok = newInstance->importFromGpasman(); 1060 bool ok = newInstance->importFromGpasman();
@@ -1073,17 +1073,17 @@ bool PwM::importFromGpasman()
1073 if (path == "") 1073 if (path == "")
1074 goto cancelImport; 1074 goto cancelImport;
1075 ret = curDoc()->importFromGpasman(&path); 1075 ret = curDoc()->importFromGpasman(&path);
1076 if (ret == e_wrongPw) { 1076 if (ret == e_wrongPw) {
1077 if (KMessageBox::questionYesNo(this, 1077 if (KMessageBox::questionYesNo(this,
1078 i18n 1078 i18n
1079 ("This is probably the wrong master-password" 1079 ("This is probably the wrong master-password\n"
1080 "you have typed in.\n" 1080 "you have typed in.\n"
1081 "There is no real way to determine the " 1081 "There is no real way to determine the\n"
1082 "correctness of the password in the Gpasman " 1082 "correctness of the password in the Gpasman\n"
1083 "file-format. But I think this " 1083 "file-format. But I think this\n"
1084 "password ist wrong.\n" 1084 "password ist wrong.\n"
1085 "Do you want to continue nevertheless?"), 1085 "Do you want to continue nevertheless?"),
1086 i18n("password error")) 1086 i18n("password error"))
1087 == KMessageBox::No) { 1087 == KMessageBox::No) {
1088 goto cancelImport; 1088 goto cancelImport;
1089 } 1089 }