summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/pwmdocui.cpp
Unidiff
Diffstat (limited to 'pwmanager/pwmanager/pwmdocui.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwmdocui.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/pwmanager/pwmanager/pwmdocui.cpp b/pwmanager/pwmanager/pwmdocui.cpp
index 71b4a8d..a9916c2 100644
--- a/pwmanager/pwmanager/pwmdocui.cpp
+++ b/pwmanager/pwmanager/pwmdocui.cpp
@@ -195,51 +195,54 @@ void PwMDocUi::cantDeeplock_notSavedMsgBox()
195 i18n("Can't deep-lock, because the document\n" 195 i18n("Can't deep-lock, because the document\n"
196 "hasn't been saved, yet. Please save\n" 196 "hasn't been saved, yet. Please save\n"
197 "to a file and try again."), 197 "to a file and try again."),
198 i18n("not saved, yet")); 198 i18n("not saved, yet"));
199} 199}
200 200
201void PwMDocUi::gpmPwLenErrMsgBox() 201void PwMDocUi::gpmPwLenErrMsgBox()
202{ 202{
203 KMessageBox::error(currentView, 203 KMessageBox::error(currentView,
204 i18n("GPasman does not support passwords\n" 204 i18n("GPasman does not support passwords\n"
205 "shorter than 4 characters! Please try\n" 205 "shorter than 4 characters! Please try\n"
206 "again with a longer password."), 206 "again with a longer password."),
207 i18n("password too short")); 207 i18n("Password too short"));
208} 208}
209 209
210int PwMDocUi::dirtyAskSave(const QString &docTitle) 210int PwMDocUi::dirtyAskSave(const QString &docTitle)
211{ 211{
212 int ret; 212 int ret;
213#ifndef PWM_EMBEDDED 213#ifndef PWM_EMBEDDED
214 ret = KMessageBox::questionYesNoCancel(currentView, 214 ret = KMessageBox::questionYesNoCancel(currentView,
215 i18n("The list \"") + 215 i18n("The list\n\"") +
216 docTitle + 216 docTitle +
217 i18n 217 i18n
218 ("\" has been modified.\n" 218 ("\" has been modified.\n"
219 "Do you want to save it?"), 219 "Do you want to save it?"),
220 i18n("save?")); 220 i18n("Save?"));
221 if (ret == KMessageBox::Yes) { 221 if (ret == KMessageBox::Yes) {
222 return 0; 222 return 0;
223 } else if (ret == KMessageBox::No) { 223 } else if (ret == KMessageBox::No) {
224 return 1; 224 return 1;
225 } 225 }
226#else 226#else
227 QString doc = docTitle;
228 if ( doc.length() > 33 )
229 doc = "..." + doc.right(30);
227 ret = KMessageBox::warningYesNoCancel(currentView, 230 ret = KMessageBox::warningYesNoCancel(currentView,
228 i18n("The list \"") + 231 i18n("The list\n \"") +
229 docTitle + 232 doc +
230 i18n 233 i18n
231 ("\"\nhas been modified.\n" 234 ("\"\nhas been modified.\n"
232 "Do you want to save it?"), 235 "Do you want to save it?"),
233 i18n("save?")); 236 i18n("Save?"));
234 if (ret == KMessageBox::Yes) { 237 if (ret == KMessageBox::Yes) {
235 return 0; 238 return 0;
236 } else if (ret == KMessageBox::No) { 239 } else if (ret == KMessageBox::No) {
237 return 1; 240 return 1;
238 } 241 }
239 242
240#endif 243#endif
241 244
242 // cancel 245 // cancel
243 return -1; 246 return -1;
244} 247}
245 248