summaryrefslogtreecommitdiffabout
authorulf69 <ulf69>2004-09-15 22:39:25 (UTC)
committer ulf69 <ulf69>2004-09-15 22:39:25 (UTC)
commit610cf2a6c7aaf9855b54cd0453f347edf9c1a855 (patch) (unidiff)
tree5ef182e00afa3fbc6cb9a2d6f59654c599c6118a
parent7fae8b87a05c3572bf0c9218d300d99fdc02adc4 (diff)
downloadkdepimpi-610cf2a6c7aaf9855b54cd0453f347edf9c1a855.zip
kdepimpi-610cf2a6c7aaf9855b54cd0453f347edf9c1a855.tar.gz
kdepimpi-610cf2a6c7aaf9855b54cd0453f347edf9c1a855.tar.bz2
enhanced code
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwm.cpp167
-rw-r--r--pwmanager/pwmanager/pwm.h6
-rw-r--r--pwmanager/pwmanager/pwmdocui.cpp17
3 files changed, 152 insertions, 38 deletions
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index 0e57650..e5579f8 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -31,4 +31,5 @@
31#else 31#else
32#include <qmenubar.h> 32#include <qmenubar.h>
33#include <qmessagebox.h>
33#endif 34#endif
34 35
@@ -121,4 +122,14 @@ enum {
121#endif 122#endif
122}; 123};
124
125#ifdef PWM_EMBEDDED
126// Button IDs for "help" popup menu
127enum {
128 BUTTON_POPUP_HELP_LICENSE = 0,
129 BUTTON_POPUP_HELP_FAQ,
130 BUTTON_POPUP_HELP_ABOUT
131};
132#endif
133
123// Button IDs for toolbar 134// Button IDs for toolbar
124enum { 135enum {
@@ -173,6 +184,11 @@ PwM::~PwM()
173void PwM::initMenubar() 184void PwM::initMenubar()
174{ 185{
186 KIconLoader* picons;
187#ifndef PWM_EMBEDDED
175 KIconLoader icons; 188 KIconLoader icons;
176 189 picons = &icons;
190#else
191 picons = KGlobal::iconLoader();
192#endif
177 filePopup = new KPopupMenu(this); 193 filePopup = new KPopupMenu(this);
178 importPopup = new KPopupMenu(filePopup); 194 importPopup = new KPopupMenu(filePopup);
@@ -186,18 +202,18 @@ void PwM::initMenubar()
186 202
187// "file" popup menu 203// "file" popup menu
188 filePopup->insertItem(QIconSet(icons.loadIcon("filenew", KIcon::Small)), 204 filePopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)),
189 i18n("&New"), this, 205 i18n("&New"), this,
190 SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW); 206 SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW);
191 filePopup->insertItem(QIconSet(icons.loadIcon("fileopen", KIcon::Small)), 207 filePopup->insertItem(QIconSet(picons->loadIcon("fileopen", KIcon::Small)),
192 i18n("&Open"), this, 208 i18n("&Open"), this,
193 SLOT(open_slot()), 0, BUTTON_POPUP_FILE_OPEN); 209 SLOT(open_slot()), 0, BUTTON_POPUP_FILE_OPEN);
194 filePopup->insertItem(QIconSet(icons.loadIcon("fileclose", KIcon::Small)), 210 filePopup->insertItem(QIconSet(picons->loadIcon("fileclose", KIcon::Small)),
195 i18n("&Close"), this, 211 i18n("&Close"), this,
196 SLOT(close_slot()), 0, BUTTON_POPUP_FILE_CLOSE); 212 SLOT(close_slot()), 0, BUTTON_POPUP_FILE_CLOSE);
197 filePopup->insertSeparator(); 213 filePopup->insertSeparator();
198 filePopup->insertItem(QIconSet(icons.loadIcon("filesave", KIcon::Small)), 214 filePopup->insertItem(QIconSet(picons->loadIcon("filesave", KIcon::Small)),
199 i18n("&Save"), this, 215 i18n("&Save"), this,
200 SLOT(save_slot()), 0, BUTTON_POPUP_FILE_SAVE); 216 SLOT(save_slot()), 0, BUTTON_POPUP_FILE_SAVE);
201 filePopup->insertItem(QIconSet(icons.loadIcon("filesaveas", KIcon::Small)), 217 filePopup->insertItem(QIconSet(picons->loadIcon("filesaveas", KIcon::Small)),
202 i18n("Save &as..."), 218 i18n("Save &as..."),
203 this, SLOT(saveAs_slot()), 0, 219 this, SLOT(saveAs_slot()), 0,
@@ -213,5 +229,5 @@ void PwM::initMenubar()
213 SLOT(exportToKWallet()), 0, BUTTON_POPUP_EXPORT_KWALLET); 229 SLOT(exportToKWallet()), 0, BUTTON_POPUP_EXPORT_KWALLET);
214#endif 230#endif
215 filePopup->insertItem(QIconSet(icons.loadIcon("fileexport", KIcon::Small)), 231 filePopup->insertItem(QIconSet(picons->loadIcon("fileexport", KIcon::Small)),
216 i18n("E&xport"), exportPopup, 232 i18n("E&xport"), exportPopup,
217 BUTTON_POPUP_FILE_EXPORT); 233 BUTTON_POPUP_FILE_EXPORT);
@@ -225,29 +241,29 @@ void PwM::initMenubar()
225 SLOT(importKWallet()), 0, BUTTON_POPUP_IMPORT_KWALLET); 241 SLOT(importKWallet()), 0, BUTTON_POPUP_IMPORT_KWALLET);
226#endif 242#endif
227 filePopup->insertItem(QIconSet(icons.loadIcon("fileimport", KIcon::Small)), 243 filePopup->insertItem(QIconSet(picons->loadIcon("fileimport", KIcon::Small)),
228 i18n("I&mport"), importPopup, 244 i18n("I&mport"), importPopup,
229 BUTTON_POPUP_FILE_IMPORT); 245 BUTTON_POPUP_FILE_IMPORT);
230 filePopup->insertSeparator(); 246 filePopup->insertSeparator();
231 filePopup->insertItem(QIconSet(icons.loadIcon("fileprint", KIcon::Small)), 247 filePopup->insertItem(QIconSet(picons->loadIcon("fileprint", KIcon::Small)),
232 i18n("&Print..."), this, 248 i18n("&Print..."), this,
233 SLOT(print_slot()), 0, BUTTON_POPUP_FILE_PRINT); 249 SLOT(print_slot()), 0, BUTTON_POPUP_FILE_PRINT);
234 filePopup->insertSeparator(); 250 filePopup->insertSeparator();
235 filePopup->insertItem(QIconSet(icons.loadIcon("exit", KIcon::Small)), 251 filePopup->insertItem(QIconSet(picons->loadIcon("exit", KIcon::Small)),
236 i18n("&Quit"), this, 252 i18n("&Quit"), this,
237 SLOT(quitButton_slot()), 0, BUTTON_POPUP_FILE_QUIT); 253 SLOT(quitButton_slot()), 0, BUTTON_POPUP_FILE_QUIT);
238 menuBar()->insertItem(i18n("&File"), filePopup); 254 menuBar()->insertItem(i18n("&File"), filePopup);
239// "manage" popup menu 255// "manage" popup menu
240 managePopup->insertItem(QIconSet(icons.loadIcon("pencil", KIcon::Small)), 256 managePopup->insertItem(QIconSet(picons->loadIcon("pencil", KIcon::Small)),
241 i18n("&Add password"), this, 257 i18n("&Add password"), this,
242 SLOT(addPwd_slot()), 0, 258 SLOT(addPwd_slot()), 0,
243 BUTTON_POPUP_MANAGE_ADD); 259 BUTTON_POPUP_MANAGE_ADD);
244 managePopup->insertItem(QIconSet(icons.loadIcon("edit", KIcon::Small)), 260 managePopup->insertItem(QIconSet(picons->loadIcon("edit", KIcon::Small)),
245 i18n("&Edit"), this, SLOT(editPwd_slot()), 0, 261 i18n("&Edit"), this, SLOT(editPwd_slot()), 0,
246 BUTTON_POPUP_MANAGE_EDIT); 262 BUTTON_POPUP_MANAGE_EDIT);
247 managePopup->insertItem(QIconSet(icons.loadIcon("editdelete", KIcon::Small)), 263 managePopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)),
248 i18n("&Delete"), this, SLOT(deletePwd_slot()), 264 i18n("&Delete"), this, SLOT(deletePwd_slot()),
249 0, BUTTON_POPUP_MANAGE_DEL); 265 0, BUTTON_POPUP_MANAGE_DEL);
250 managePopup->insertSeparator(); 266 managePopup->insertSeparator();
251 managePopup->insertItem(QIconSet(icons.loadIcon("rotate", KIcon::Small)), 267 managePopup->insertItem(QIconSet(picons->loadIcon("rotate", KIcon::Small)),
252 i18n("Change &Master Password"), this, 268 i18n("Change &Master Password"), this,
253 SLOT(changeMasterPwd_slot()), 0, 269 SLOT(changeMasterPwd_slot()), 0,
@@ -256,22 +272,22 @@ void PwM::initMenubar()
256// "chipcard" popup menu 272// "chipcard" popup menu
257#ifdef CONFIG_KEYCARD 273#ifdef CONFIG_KEYCARD
258 chipcardPopup->insertItem(QIconSet(icons.loadIcon("filenew", KIcon::Small)), 274 chipcardPopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)),
259 i18n("&Generate new key-card"), this, 275 i18n("&Generate new key-card"), this,
260 SLOT(genNewCard_slot()), 0, 276 SLOT(genNewCard_slot()), 0,
261 BUTTON_POPUP_CHIPCARD_GENNEW); 277 BUTTON_POPUP_CHIPCARD_GENNEW);
262 chipcardPopup->insertItem(QIconSet(icons.loadIcon("editdelete", KIcon::Small)), 278 chipcardPopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)),
263 i18n("&Erase key-card"), this, 279 i18n("&Erase key-card"), this,
264 SLOT(eraseCard_slot()), 0, 280 SLOT(eraseCard_slot()), 0,
265 BUTTON_POPUP_CHIPCARD_DEL); 281 BUTTON_POPUP_CHIPCARD_DEL);
266 chipcardPopup->insertItem(QIconSet(icons.loadIcon("", KIcon::Small)), 282 chipcardPopup->insertItem(QIconSet(picons->loadIcon("", KIcon::Small)),
267 i18n("Read card-&ID"), this, 283 i18n("Read card-&ID"), this,
268 SLOT(readCardId_slot()), 0, 284 SLOT(readCardId_slot()), 0,
269 BUTTON_POPUP_CHIPCARD_READID); 285 BUTTON_POPUP_CHIPCARD_READID);
270 chipcardPopup->insertSeparator(); 286 chipcardPopup->insertSeparator();
271 chipcardPopup->insertItem(QIconSet(icons.loadIcon("2rightarrow", KIcon::Small)), 287 chipcardPopup->insertItem(QIconSet(picons->loadIcon("2rightarrow", KIcon::Small)),
272 i18n("&Make card backup-image"), this, 288 i18n("&Make card backup-image"), this,
273 SLOT(makeCardBackup_slot()), 0, 289 SLOT(makeCardBackup_slot()), 0,
274 BUTTON_POPUP_CHIPCARD_SAVEBACKUP); 290 BUTTON_POPUP_CHIPCARD_SAVEBACKUP);
275 chipcardPopup->insertItem(QIconSet(icons.loadIcon("2leftarrow", KIcon::Small)), 291 chipcardPopup->insertItem(QIconSet(picons->loadIcon("2leftarrow", KIcon::Small)),
276 i18n("&Replay card backup-image"), this, 292 i18n("&Replay card backup-image"), this,
277 SLOT(replayCardBackup_slot()), 0, 293 SLOT(replayCardBackup_slot()), 0,
@@ -280,17 +296,17 @@ void PwM::initMenubar()
280#endif // CONFIG_KEYCARD 296#endif // CONFIG_KEYCARD
281// "view" popup menu 297// "view" popup menu
282 viewPopup->insertItem(QIconSet(icons.loadIcon("find", KIcon::Small)), 298 viewPopup->insertItem(QIconSet(picons->loadIcon("find", KIcon::Small)),
283 i18n("&Find"), this, 299 i18n("&Find"), this,
284 SLOT(find_slot()), 0, BUTTON_POPUP_VIEW_FIND); 300 SLOT(find_slot()), 0, BUTTON_POPUP_VIEW_FIND);
285 viewPopup->insertSeparator(); 301 viewPopup->insertSeparator();
286 viewPopup->insertItem(QIconSet(icons.loadIcon("halfencrypted", KIcon::Small)), 302 viewPopup->insertItem(QIconSet(picons->loadIcon("halfencrypted", KIcon::Small)),
287 i18n("&Lock all entries"), this, 303 i18n("&Lock all entries"), this,
288 SLOT(lockWnd_slot()), 0, 304 SLOT(lockWnd_slot()), 0,
289 BUTTON_POPUP_VIEW_LOCK); 305 BUTTON_POPUP_VIEW_LOCK);
290 viewPopup->insertItem(QIconSet(icons.loadIcon("encrypted", KIcon::Small)), 306 viewPopup->insertItem(QIconSet(picons->loadIcon("encrypted", KIcon::Small)),
291 i18n("&Deep-lock all entries"), this, 307 i18n("&Deep-lock all entries"), this,
292 SLOT(deepLockWnd_slot()), 0, 308 SLOT(deepLockWnd_slot()), 0,
293 BUTTON_POPUP_VIEW_DEEPLOCK); 309 BUTTON_POPUP_VIEW_DEEPLOCK);
294 viewPopup->insertItem(QIconSet(icons.loadIcon("decrypted", KIcon::Small)), 310 viewPopup->insertItem(QIconSet(picons->loadIcon("decrypted", KIcon::Small)),
295 i18n("&Unlock all entries"), this, 311 i18n("&Unlock all entries"), this,
296 SLOT(unlockWnd_slot()), 0, 312 SLOT(unlockWnd_slot()), 0,
@@ -298,5 +314,5 @@ void PwM::initMenubar()
298 menuBar()->insertItem(i18n("&View"), viewPopup); 314 menuBar()->insertItem(i18n("&View"), viewPopup);
299// "options" popup menu 315// "options" popup menu
300 optionsPopup->insertItem(QIconSet(icons.loadIcon("configure", KIcon::Small)), 316 optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)),
301 i18n("&Configure..."), this, 317 i18n("&Configure..."), this,
302 SLOT(config_slot()), 318 SLOT(config_slot()),
@@ -306,55 +322,78 @@ void PwM::initMenubar()
306#ifndef PWM_EMBEDDED 322#ifndef PWM_EMBEDDED
307 helpPopup = helpMenu(QString::null, false); 323 helpPopup = helpMenu(QString::null, false);
308 menuBar()->insertItem(i18n("&Help"), helpPopup); 324#else
325 helpPopup = new KPopupMenu(this);
326
327
328 helpPopup->insertItem(i18n("&License"), this,
329 SLOT(showLicense_slot()), 0,
330 BUTTON_POPUP_HELP_LICENSE);
331
332 helpPopup->insertItem(i18n("&Faq"), this,
333 SLOT(faq_slot()), 0,
334 BUTTON_POPUP_HELP_FAQ);
335
336 helpPopup->insertItem(i18n("&About PwManager"), this,
337 SLOT(createAboutData_slot()), 0,
338 BUTTON_POPUP_HELP_ABOUT);
339
309#endif 340#endif
341 menuBar()->insertItem(i18n("&Help"), helpPopup);
342
310} 343}
311 344
312void PwM::initToolbar() 345void PwM::initToolbar()
313{ 346{
347 KIconLoader* picons;
348#ifndef PWM_EMBEDDED
314 KIconLoader icons; 349 KIconLoader icons;
350 picons = &icons;
351#else
352 picons = KGlobal::iconLoader();
353#endif
315 354
316 toolBar()->insertButton(icons.loadIcon("filenew", KIcon::Toolbar), 355 toolBar()->insertButton(picons->loadIcon("filenew", KIcon::Toolbar),
317 BUTTON_TOOL_NEW, SIGNAL(clicked(int)), this, 356 BUTTON_TOOL_NEW, SIGNAL(clicked(int)), this,
318 SLOT(new_slot()), true, i18n("New")); 357 SLOT(new_slot()), true, i18n("New"));
319 toolBar()->insertButton(icons.loadIcon("fileopen", KIcon::Toolbar), 358 toolBar()->insertButton(picons->loadIcon("fileopen", KIcon::Toolbar),
320 BUTTON_TOOL_OPEN, SIGNAL(clicked(int)), this, 359 BUTTON_TOOL_OPEN, SIGNAL(clicked(int)), this,
321 SLOT(open_slot()), true, i18n("Open")); 360 SLOT(open_slot()), true, i18n("Open"));
322 toolBar()->insertSeparator(); 361 toolBar()->insertSeparator();
323 toolBar()->insertButton(icons.loadIcon("filesave", KIcon::Toolbar), 362 toolBar()->insertButton(picons->loadIcon("filesave", KIcon::Toolbar),
324 BUTTON_TOOL_SAVE, SIGNAL(clicked(int)), this, 363 BUTTON_TOOL_SAVE, SIGNAL(clicked(int)), this,
325 SLOT(save_slot()), true, i18n("Save")); 364 SLOT(save_slot()), true, i18n("Save"));
326 toolBar()->insertButton(icons.loadIcon("filesaveas", KIcon::Toolbar), 365 toolBar()->insertButton(picons->loadIcon("filesaveas", KIcon::Toolbar),
327 BUTTON_TOOL_SAVEAS, SIGNAL(clicked(int)), this, 366 BUTTON_TOOL_SAVEAS, SIGNAL(clicked(int)), this,
328 SLOT(saveAs_slot()), true, i18n("Save as")); 367 SLOT(saveAs_slot()), true, i18n("Save as"));
329 toolBar()->insertButton(icons.loadIcon("fileprint", KIcon::Toolbar), 368 toolBar()->insertButton(picons->loadIcon("fileprint", KIcon::Toolbar),
330 BUTTON_TOOL_PRINT, SIGNAL(clicked(int)), this, 369 BUTTON_TOOL_PRINT, SIGNAL(clicked(int)), this,
331 SLOT(print_slot()), true, i18n("Print...")); 370 SLOT(print_slot()), true, i18n("Print..."));
332 toolBar()->insertSeparator(); 371 toolBar()->insertSeparator();
333 toolBar()->insertButton(icons.loadIcon("pencil", KIcon::Toolbar), 372 toolBar()->insertButton(picons->loadIcon("pencil", KIcon::Toolbar),
334 BUTTON_TOOL_ADD, SIGNAL(clicked(int)), this, 373 BUTTON_TOOL_ADD, SIGNAL(clicked(int)), this,
335 SLOT(addPwd_slot()), true, 374 SLOT(addPwd_slot()), true,
336 i18n("Add password")); 375 i18n("Add password"));
337 toolBar()->insertButton(icons.loadIcon("edit", KIcon::Toolbar), 376 toolBar()->insertButton(picons->loadIcon("edit", KIcon::Toolbar),
338 BUTTON_TOOL_EDIT, SIGNAL(clicked(int)), this, 377 BUTTON_TOOL_EDIT, SIGNAL(clicked(int)), this,
339 SLOT(editPwd_slot()), true, 378 SLOT(editPwd_slot()), true,
340 i18n("Edit password")); 379 i18n("Edit password"));
341 toolBar()->insertButton(icons.loadIcon("editdelete", KIcon::Toolbar), 380 toolBar()->insertButton(picons->loadIcon("editdelete", KIcon::Toolbar),
342 BUTTON_TOOL_DEL, SIGNAL(clicked(int)), this, 381 BUTTON_TOOL_DEL, SIGNAL(clicked(int)), this,
343 SLOT(deletePwd_slot()), true, 382 SLOT(deletePwd_slot()), true,
344 i18n("Delete password")); 383 i18n("Delete password"));
345 toolBar()->insertSeparator(); 384 toolBar()->insertSeparator();
346 toolBar()->insertButton(icons.loadIcon("find", KIcon::Toolbar), 385 toolBar()->insertButton(picons->loadIcon("find", KIcon::Toolbar),
347 BUTTON_TOOL_FIND, SIGNAL(clicked(int)), this, 386 BUTTON_TOOL_FIND, SIGNAL(clicked(int)), this,
348 SLOT(find_slot()), true, i18n("Find entry")); 387 SLOT(find_slot()), true, i18n("Find entry"));
349 toolBar()->insertSeparator(); 388 toolBar()->insertSeparator();
350 toolBar()->insertButton(icons.loadIcon("halfencrypted", KIcon::Toolbar), 389 toolBar()->insertButton(picons->loadIcon("halfencrypted", KIcon::Toolbar),
351 BUTTON_TOOL_LOCK, SIGNAL(clicked(int)), this, 390 BUTTON_TOOL_LOCK, SIGNAL(clicked(int)), this,
352 SLOT(lockWnd_slot()), true, 391 SLOT(lockWnd_slot()), true,
353 i18n("Lock all entries")); 392 i18n("Lock all entries"));
354 toolBar()->insertButton(icons.loadIcon("encrypted", KIcon::Toolbar), 393 toolBar()->insertButton(picons->loadIcon("encrypted", KIcon::Toolbar),
355 BUTTON_TOOL_DEEPLOCK, SIGNAL(clicked(int)), this, 394 BUTTON_TOOL_DEEPLOCK, SIGNAL(clicked(int)), this,
356 SLOT(deepLockWnd_slot()), true, 395 SLOT(deepLockWnd_slot()), true,
357 i18n("Deep-Lock all entries")); 396 i18n("Deep-Lock all entries"));
358 toolBar()->insertButton(icons.loadIcon("decrypted", KIcon::Toolbar), 397 toolBar()->insertButton(picons->loadIcon("decrypted", KIcon::Toolbar),
359 BUTTON_TOOL_UNLOCK, SIGNAL(clicked(int)), this, 398 BUTTON_TOOL_UNLOCK, SIGNAL(clicked(int)), this,
360 SLOT(unlockWnd_slot()), true, 399 SLOT(unlockWnd_slot()), true,
@@ -537,5 +576,6 @@ void PwM::addPwd_slot(QString *pw, PwMDoc *_doc)
537 576
538 tryAgain: 577 tryAgain:
539 if (w.exec() == 1) { 578 if (w.exec() == 1)
579 {
540 PwMDataItem d; 580 PwMDataItem d;
541 d.desc = w.getDescription().latin1(); 581 d.desc = w.getDescription().latin1();
@@ -1188,4 +1228,55 @@ void PwM::focusInEvent(QFocusEvent *e)
1188} 1228}
1189 1229
1230
1231#ifdef PWM_EMBEDDED
1232
1233void PwM::showLicense_slot()
1234{
1235 KApplication::showLicence();
1236}
1237
1238void PwM::faq_slot()
1239{
1240 KApplication::showFile( "PWM/Pi FAQ", "kdepim/pwmanager/pwmanagerFAQ.txt" );
1241}
1242
1243void PwM::createAboutData_slot()
1244{
1245 QString version;
1246#include <../version>
1247 QMessageBox::about( this, "About PwManager/Pi",
1248 "PwManager/Platform-independent\n"
1249 "(PWM/Pi) " +version + " - " +
1250#ifdef DESKTOP_VERSION
1251 "Desktop Edition\n"
1252#else
1253 "PDA-Edition\n"
1254 "for: Zaurus 5500 / 7x0 / 8x0\n"
1255#endif
1256
1257 "(c) 2004 Ulf Schenk\n"
1258 "(c) 2004 Lutz Rogowski\n"
1259 "(c) 1997-2003, The KDE PIM Team\n"
1260
1261 "Michael Buesch - main programming and current maintainer\nmbuesch@freenet.de\n"
1262 "Matt Scifo - original implementaion of \n"
1263 "\"categories\" and the password-tree \n"
1264 "in the system-tray. Original implementations of \n"
1265 "numerous view-improvements.\n"
1266 "mscifo@o1.com\n"
1267 "Elias Probst - Gentoo ebuild maintainer.\nelias.probst@gmx.de\n"
1268 "George Staikos - KWallet\nstaikos@kde.org\n"
1269 "Matthew Palmer - rc2 code\nmjp16@uow.edu.au\n"
1270 "Olivier Sessink - gpasman\ngpasman@nl.linux.org\n"
1271 "The libgcrypt developers - Blowfish and SHA1 algorithms\nftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/\n"
1272 "Troy Engel - kpasman\n tengel@sonic.net\n"
1273 "Wickey - graphics-design in older versions\nwickey@gmx.at\n"
1274 "Ian MacGregor - original documentation author.\n"
1275 );
1276}
1277
1278#endif
1279
1280
1190#ifndef PWM_EMBEDDED 1281#ifndef PWM_EMBEDDED
1191#include "pwm.moc" 1282#include "pwm.moc"
diff --git a/pwmanager/pwmanager/pwm.h b/pwmanager/pwmanager/pwm.h
index 3a79e67..36a8b5b 100644
--- a/pwmanager/pwmanager/pwm.h
+++ b/pwmanager/pwmanager/pwm.h
@@ -167,4 +167,10 @@ public slots:
167 void replayCardBackup_slot(); 167 void replayCardBackup_slot();
168 168
169#ifdef PWM_EMBEDDED
170 void showLicense_slot();
171 void faq_slot();
172 void createAboutData_slot();
173#endif
174
169protected: 175protected:
170 /** is this window virgin? */ 176 /** is this window virgin? */
diff --git a/pwmanager/pwmanager/pwmdocui.cpp b/pwmanager/pwmanager/pwmdocui.cpp
index 66a1b59..b308b40 100644
--- a/pwmanager/pwmanager/pwmdocui.cpp
+++ b/pwmanager/pwmanager/pwmdocui.cpp
@@ -36,4 +36,5 @@
36#include <kwin.h> 36#include <kwin.h>
37#else 37#else
38#include <qdir.h>
38#endif 39#endif
39 40
@@ -296,7 +297,15 @@ bool PwMDocUi::saveAsDocUi(PwMDoc *doc)
296 return true; 297 return true;
297 } 298 }
299#ifndef PWM_EMBEDDED
298 QString fn(KFileDialog::getSaveFileName(QString::null, 300 QString fn(KFileDialog::getSaveFileName(QString::null,
299 i18n("*.pwm|PwManager Password file"), 301 i18n("*.pwm|PwManager Password file"),
300 currentView)); 302 currentView));
303#else
304 QString fn = locateLocal( "data", KGlobal::getAppName() + "/*.pwm" );
305 fn = KFileDialog::getSaveFileName(fn,
306 i18n("password filename(*.pwm)"),
307 currentView);
308
309#endif
301 if (fn == "") { 310 if (fn == "") {
302 doc->timer()->putLock(DocTimer::id_autoLockTimer); 311 doc->timer()->putLock(DocTimer::id_autoLockTimer);
@@ -325,7 +334,15 @@ bool PwMDocUi::openDocUi(PwMDoc *doc,
325{ 334{
326 if (filename.isEmpty()) 335 if (filename.isEmpty())
336 {
337#ifndef PWM_EMBEDDED
327 filename = KFileDialog::getOpenFileName(QString::null, 338 filename = KFileDialog::getOpenFileName(QString::null,
328 i18n("*.pwm|PwManager Password file\n" 339 i18n("*.pwm|PwManager Password file\n"
329 "*|All files"), getCurrentView()); 340 "*|All files"), getCurrentView());
341#else
342 filename = locateLocal( "data", KGlobal::getAppName() + "/*.pwm");
343 filename = KFileDialog::getOpenFileName(filename,
344 i18n("password filename(*.pwm)"), getCurrentView());
345#endif
346 }
330 if (filename.isEmpty()) 347 if (filename.isEmpty())
331 goto cancelOpen; 348 goto cancelOpen;