author | zautrix <zautrix> | 2005-06-10 11:53:12 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-10 11:53:12 (UTC) |
commit | d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc (patch) (unidiff) | |
tree | 0764371abfdb5d663ffebf408d47d49f0ca919f3 /pwmanager | |
parent | e5ca8e0d8d6d08b597253f43de401aa1a99a6abe (diff) | |
download | kdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.zip kdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.tar.gz kdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.tar.bz2 |
config dialog changes
-rw-r--r-- | pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h | 1 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwm.cpp | 45 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwm.h | 1 |
3 files changed, 37 insertions, 10 deletions
diff --git a/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h b/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h index b9ea6b8..2d19680 100644 --- a/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h +++ b/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h | |||
@@ -15,33 +15,34 @@ | |||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #ifndef KCMPWMCONFIG_H | 24 | #ifndef KCMPWMCONFIG_H |
25 | #define KCMPWMCONFIG_H | 25 | #define KCMPWMCONFIG_H |
26 | 26 | ||
27 | #include <kcmodule.h> | 27 | #include <kcmodule.h> |
28 | 28 | ||
29 | class PWMConfigWidget; | 29 | class PWMConfigWidget; |
30 | class PWMPrefs; | 30 | class PWMPrefs; |
31 | 31 | ||
32 | class KCMPwmConfig : public KCModule | 32 | class KCMPwmConfig : public KCModule |
33 | { | 33 | { |
34 | Q_OBJECT | 34 | Q_OBJECT |
35 | 35 | ||
36 | public: | 36 | public: |
37 | KCMPwmConfig(QWidget *parent = 0, const char *name = 0 ); | 37 | KCMPwmConfig(QWidget *parent = 0, const char *name = 0 ); |
38 | 38 | ||
39 | public slots: | ||
39 | virtual void load(); | 40 | virtual void load(); |
40 | virtual void save(); | 41 | virtual void save(); |
41 | virtual void defaults(); | 42 | virtual void defaults(); |
42 | 43 | ||
43 | private: | 44 | private: |
44 | PWMConfigWidget *mConfigWidget; | 45 | PWMConfigWidget *mConfigWidget; |
45 | }; | 46 | }; |
46 | 47 | ||
47 | #endif | 48 | #endif |
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp index 9c8d12d..e12dc49 100644 --- a/pwmanager/pwmanager/pwm.cpp +++ b/pwmanager/pwmanager/pwm.cpp | |||
@@ -16,129 +16,130 @@ | |||
16 | * | 16 | * |
17 | * $Id$ | 17 | * $Id$ |
18 | **************************************************************************/ | 18 | **************************************************************************/ |
19 | 19 | ||
20 | #include <klocale.h> | 20 | #include <klocale.h> |
21 | #include <klistview.h> | 21 | #include <klistview.h> |
22 | #include <ktoolbar.h> | 22 | #include <ktoolbar.h> |
23 | #include <kfiledialog.h> | 23 | #include <kfiledialog.h> |
24 | #include <kiconloader.h> | 24 | #include <kiconloader.h> |
25 | #include <kmessagebox.h> | 25 | #include <kmessagebox.h> |
26 | 26 | ||
27 | #include <qstatusbar.h> | 27 | #include <qstatusbar.h> |
28 | 28 | ||
29 | #ifndef PWM_EMBEDDED | 29 | #ifndef PWM_EMBEDDED |
30 | #include <kmenubar.h> | 30 | #include <kmenubar.h> |
31 | #include <kstatusbar.h> | 31 | #include <kstatusbar.h> |
32 | #include <dcopclient.h> | 32 | #include <dcopclient.h> |
33 | #include "configwndimpl.h" | 33 | #include "configwndimpl.h" |
34 | #include "configuration.h" | 34 | #include "configuration.h" |
35 | #else | 35 | #else |
36 | #include <qmenubar.h> | 36 | #include <qmenubar.h> |
37 | #include <qmessagebox.h> | 37 | #include <qmessagebox.h> |
38 | #include <pwmprefs.h> | 38 | #include <pwmprefs.h> |
39 | #include <kpimglobalprefs.h> | 39 | #include <kpimglobalprefs.h> |
40 | #include <kprefsdialog.h> | ||
40 | #include <kcmconfigs/kcmpwmconfig.h> | 41 | #include <kcmconfigs/kcmpwmconfig.h> |
41 | #include <kcmconfigs/kcmkdepimconfig.h> | 42 | #include <kcmconfigs/kcmkdepimconfig.h> |
42 | #include <kcmultidialog.h> | 43 | #include <kcmultidialog.h> |
43 | #include "editcategory.h" | 44 | #include "editcategory.h" |
44 | #endif | 45 | #endif |
45 | 46 | ||
46 | 47 | ||
47 | #ifndef DESKTOP_VERSION | 48 | #ifndef DESKTOP_VERSION |
48 | #include <qpe/global.h> | 49 | #include <qpe/global.h> |
49 | #endif | 50 | #endif |
50 | 51 | ||
51 | #include <qpixmap.h> | 52 | #include <qpixmap.h> |
52 | #include <qcheckbox.h> | 53 | #include <qcheckbox.h> |
53 | #include <qspinbox.h> | 54 | #include <qspinbox.h> |
54 | #include <qlineedit.h> | 55 | #include <qlineedit.h> |
55 | #include <qfileinfo.h> | 56 | #include <qfileinfo.h> |
56 | #include <qclipboard.h> | 57 | #include <qclipboard.h> |
57 | 58 | ||
58 | 59 | ||
59 | #include <stdio.h> | 60 | #include <stdio.h> |
60 | 61 | ||
61 | #include "pwm.h" | 62 | #include "pwm.h" |
62 | #include "pwminit.h" | 63 | #include "pwminit.h" |
63 | #include "pwmprint.h" | 64 | #include "pwmprint.h" |
64 | #include "addentrywndimpl.h" | 65 | #include "addentrywndimpl.h" |
65 | #include "globalstuff.h" | 66 | #include "globalstuff.h" |
66 | #include "findwndimpl.h" | 67 | #include "findwndimpl.h" |
67 | #include "csv.h" | 68 | #include "csv.h" |
68 | 69 | ||
69 | #ifdef CONFIG_KWALLETIF | 70 | #ifdef CONFIG_KWALLETIF |
70 | # include "kwalletif.h" | 71 | # include "kwalletif.h" |
71 | # include "kwalletemu.h" | 72 | # include "kwalletemu.h" |
72 | #endif | 73 | #endif |
73 | #ifdef CONFIG_KEYCARD | 74 | #ifdef CONFIG_KEYCARD |
74 | # include "pwmkeycard.h" | 75 | # include "pwmkeycard.h" |
75 | #endif | 76 | #endif |
76 | 77 | ||
77 | |||
78 | #define DEFAULT_SIZE (QSize(700, 400)) | 78 | #define DEFAULT_SIZE (QSize(700, 400)) |
79 | 79 | ||
80 | // Button IDs for "file" popup menu | 80 | // Button IDs for "file" popup menu |
81 | enum { | 81 | enum { |
82 | BUTTON_POPUP_FILE_NEW = 0, | 82 | BUTTON_POPUP_FILE_NEW = 0, |
83 | BUTTON_POPUP_FILE_OPEN, | 83 | BUTTON_POPUP_FILE_OPEN, |
84 | BUTTON_POPUP_FILE_CLOSE, | 84 | BUTTON_POPUP_FILE_CLOSE, |
85 | BUTTON_POPUP_FILE_SAVE, | 85 | BUTTON_POPUP_FILE_SAVE, |
86 | BUTTON_POPUP_FILE_SAVEAS, | 86 | BUTTON_POPUP_FILE_SAVEAS, |
87 | BUTTON_POPUP_FILE_EXPORT, | 87 | BUTTON_POPUP_FILE_EXPORT, |
88 | BUTTON_POPUP_FILE_IMPORT, | 88 | BUTTON_POPUP_FILE_IMPORT, |
89 | BUTTON_POPUP_FILE_PRINT, | 89 | BUTTON_POPUP_FILE_PRINT, |
90 | BUTTON_POPUP_FILE_QUIT | 90 | BUTTON_POPUP_FILE_QUIT |
91 | }; | 91 | }; |
92 | // Button IDs for "manage" popup menu | 92 | // Button IDs for "manage" popup menu |
93 | enum { | 93 | enum { |
94 | BUTTON_POPUP_MANAGE_ADD = 0, | 94 | BUTTON_POPUP_MANAGE_ADD = 0, |
95 | BUTTON_POPUP_MANAGE_EDIT, | 95 | BUTTON_POPUP_MANAGE_EDIT, |
96 | BUTTON_POPUP_MANAGE_DEL, | 96 | BUTTON_POPUP_MANAGE_DEL, |
97 | BUTTON_POPUP_MANAGE_CHANGEMP | 97 | BUTTON_POPUP_MANAGE_CHANGEMP |
98 | }; | 98 | }; |
99 | // Button IDs for chipcard popup menu | 99 | // Button IDs for chipcard popup menu |
100 | enum { | 100 | enum { |
101 | #ifdef CONFIG_KEYCARD | 101 | #ifdef CONFIG_KEYCARD |
102 | BUTTON_POPUP_CHIPCARD_GENNEW = 0, | 102 | BUTTON_POPUP_CHIPCARD_GENNEW = 0, |
103 | BUTTON_POPUP_CHIPCARD_DEL, | 103 | BUTTON_POPUP_CHIPCARD_DEL, |
104 | BUTTON_POPUP_CHIPCARD_READID, | 104 | BUTTON_POPUP_CHIPCARD_READID, |
105 | BUTTON_POPUP_CHIPCARD_SAVEBACKUP, | 105 | BUTTON_POPUP_CHIPCARD_SAVEBACKUP, |
106 | BUTTON_POPUP_CHIPCARD_REPLAYBACKUP | 106 | BUTTON_POPUP_CHIPCARD_REPLAYBACKUP |
107 | #else // CONFIG_KEYCARD | 107 | #else // CONFIG_KEYCARD |
108 | BUTTON_POPUP_CHIPCARD_NO = 0 | 108 | BUTTON_POPUP_CHIPCARD_NO = 0 |
109 | #endif // CONFIG_KEYCARD | 109 | #endif // CONFIG_KEYCARD |
110 | }; | 110 | }; |
111 | // Button IDs for "view" popup menu | 111 | // Button IDs for "view" popup menu |
112 | enum { | 112 | enum { |
113 | BUTTON_POPUP_VIEW_FIND = 0, | 113 | BUTTON_POPUP_VIEW_FIND = 0, |
114 | BUTTON_POPUP_VIEW_LOCK, | 114 | BUTTON_POPUP_VIEW_LOCK, |
115 | BUTTON_POPUP_VIEW_DEEPLOCK, | 115 | BUTTON_POPUP_VIEW_DEEPLOCK, |
116 | BUTTON_POPUP_VIEW_UNLOCK | 116 | BUTTON_POPUP_VIEW_UNLOCK |
117 | }; | 117 | }; |
118 | // Button IDs for "options" popup menu | 118 | // Button IDs for "options" popup menu |
119 | enum { | 119 | enum { |
120 | BUTTON_POPUP_OPTIONS_CONFIG = 0 | 120 | BUTTON_POPUP_OPTIONS_CONFIG = 0, |
121 | BUTTON_POPUP_OPTIONS_GLOBAL_CONFIG | ||
121 | #ifdef PWM_EMBEDDED | 122 | #ifdef PWM_EMBEDDED |
122 | ,BUTTON_POPUP_OPTIONS_CATEGORY | 123 | ,BUTTON_POPUP_OPTIONS_CATEGORY |
123 | #endif | 124 | #endif |
124 | }; | 125 | }; |
125 | // Button IDs for "export" popup menu (in "file" popup menu) | 126 | // Button IDs for "export" popup menu (in "file" popup menu) |
126 | enum { | 127 | enum { |
127 | BUTTON_POPUP_EXPORT_TEXT = 0, | 128 | BUTTON_POPUP_EXPORT_TEXT = 0, |
128 | BUTTON_POPUP_EXPORT_GPASMAN, | 129 | BUTTON_POPUP_EXPORT_GPASMAN, |
129 | BUTTON_POPUP_EXPORT_CSV | 130 | BUTTON_POPUP_EXPORT_CSV |
130 | #ifdef CONFIG_KWALLETIF | 131 | #ifdef CONFIG_KWALLETIF |
131 | ,BUTTON_POPUP_EXPORT_KWALLET | 132 | ,BUTTON_POPUP_EXPORT_KWALLET |
132 | #endif | 133 | #endif |
133 | }; | 134 | }; |
134 | // Button IDs for "import" popup menu (in "file" popup menu) | 135 | // Button IDs for "import" popup menu (in "file" popup menu) |
135 | enum { | 136 | enum { |
136 | BUTTON_POPUP_IMPORT_TEXT = 0, | 137 | BUTTON_POPUP_IMPORT_TEXT = 0, |
137 | BUTTON_POPUP_IMPORT_GPASMAN, | 138 | BUTTON_POPUP_IMPORT_GPASMAN, |
138 | BUTTON_POPUP_IMPORT_CSV | 139 | BUTTON_POPUP_IMPORT_CSV |
139 | #ifdef CONFIG_KWALLETIF | 140 | #ifdef CONFIG_KWALLETIF |
140 | ,BUTTON_POPUP_IMPORT_KWALLET | 141 | ,BUTTON_POPUP_IMPORT_KWALLET |
141 | #endif | 142 | #endif |
142 | }; | 143 | }; |
143 | 144 | ||
144 | #ifdef PWM_EMBEDDED | 145 | #ifdef PWM_EMBEDDED |
@@ -338,51 +339,55 @@ void PwM::initMenubar() | |||
338 | SLOT(replayCardBackup_slot()), 0, | 339 | SLOT(replayCardBackup_slot()), 0, |
339 | BUTTON_POPUP_CHIPCARD_REPLAYBACKUP); | 340 | BUTTON_POPUP_CHIPCARD_REPLAYBACKUP); |
340 | menuBar()->insertItem(i18n("&Chipcard manager"), chipcardPopup); | 341 | menuBar()->insertItem(i18n("&Chipcard manager"), chipcardPopup); |
341 | #endif // CONFIG_KEYCARD | 342 | #endif // CONFIG_KEYCARD |
342 | // "view" popup menu | 343 | // "view" popup menu |
343 | viewPopup->insertItem(QIconSet(picons->loadIcon("find", KIcon::Small)), | 344 | viewPopup->insertItem(QIconSet(picons->loadIcon("find", KIcon::Small)), |
344 | i18n("&Find"), this, | 345 | i18n("&Find"), this, |
345 | SLOT(find_slot()), 0, BUTTON_POPUP_VIEW_FIND); | 346 | SLOT(find_slot()), 0, BUTTON_POPUP_VIEW_FIND); |
346 | viewPopup->insertSeparator(); | 347 | viewPopup->insertSeparator(); |
347 | viewPopup->insertItem(QIconSet(picons->loadIcon("halfencrypted", KIcon::Small)), | 348 | viewPopup->insertItem(QIconSet(picons->loadIcon("halfencrypted", KIcon::Small)), |
348 | i18n("&Lock all entries"), this, | 349 | i18n("&Lock all entries"), this, |
349 | SLOT(lockWnd_slot()), 0, | 350 | SLOT(lockWnd_slot()), 0, |
350 | BUTTON_POPUP_VIEW_LOCK); | 351 | BUTTON_POPUP_VIEW_LOCK); |
351 | viewPopup->insertItem(QIconSet(picons->loadIcon("encrypted", KIcon::Small)), | 352 | viewPopup->insertItem(QIconSet(picons->loadIcon("encrypted", KIcon::Small)), |
352 | i18n("&Deep-lock all entries"), this, | 353 | i18n("&Deep-lock all entries"), this, |
353 | SLOT(deepLockWnd_slot()), 0, | 354 | SLOT(deepLockWnd_slot()), 0, |
354 | BUTTON_POPUP_VIEW_DEEPLOCK); | 355 | BUTTON_POPUP_VIEW_DEEPLOCK); |
355 | viewPopup->insertItem(QIconSet(picons->loadIcon("decrypted", KIcon::Small)), | 356 | viewPopup->insertItem(QIconSet(picons->loadIcon("decrypted", KIcon::Small)), |
356 | i18n("&Unlock all entries"), this, | 357 | i18n("&Unlock all entries"), this, |
357 | SLOT(unlockWnd_slot()), 0, | 358 | SLOT(unlockWnd_slot()), 0, |
358 | BUTTON_POPUP_VIEW_UNLOCK); | 359 | BUTTON_POPUP_VIEW_UNLOCK); |
359 | menuBar()->insertItem(i18n("&View"), viewPopup); | 360 | menuBar()->insertItem(i18n("&View"), viewPopup); |
360 | // "options" popup menu | 361 | // "options" popup menu |
361 | optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), | 362 | optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), |
362 | i18n("&Configure..."), this, | 363 | i18n("&Configure PwM/Pi..."), this, |
363 | SLOT(config_slot()),0, | 364 | SLOT(config_slot()),0, |
364 | BUTTON_POPUP_OPTIONS_CONFIG); | 365 | BUTTON_POPUP_OPTIONS_CONFIG); |
366 | optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), | ||
367 | i18n("Global Settings..."), this, | ||
368 | SLOT(config_global_slot()),0, | ||
369 | BUTTON_POPUP_OPTIONS_GLOBAL_CONFIG); | ||
365 | if ( QApplication::desktop()->width() <= 240 ) { | 370 | if ( QApplication::desktop()->width() <= 240 ) { |
366 | managePopup->insertSeparator(); | 371 | managePopup->insertSeparator(); |
367 | managePopup->insertItem(i18n("&Options"), optionsPopup); | 372 | managePopup->insertItem(i18n("&Options"), optionsPopup); |
368 | } else | 373 | } else |
369 | menuBar()->insertItem(i18n("&Options"), optionsPopup); | 374 | menuBar()->insertItem(i18n("&Options"), optionsPopup); |
370 | // "help" popup menu | 375 | // "help" popup menu |
371 | #ifndef PWM_EMBEDDED | 376 | #ifndef PWM_EMBEDDED |
372 | helpPopup = helpMenu(QString::null, false); | 377 | helpPopup = helpMenu(QString::null, false); |
373 | #else | 378 | #else |
374 | optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), | 379 | optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), |
375 | i18n("C&ategories..."), this, | 380 | i18n("C&ategories..."), this, |
376 | SLOT(category_slot()),0, | 381 | SLOT(category_slot()),0, |
377 | BUTTON_POPUP_OPTIONS_CATEGORY); | 382 | BUTTON_POPUP_OPTIONS_CATEGORY); |
378 | 383 | ||
379 | 384 | ||
380 | menuBar()->insertItem(i18n("&Sync"), syncPopup); | 385 | menuBar()->insertItem(i18n("&Sync"), syncPopup); |
381 | 386 | ||
382 | 387 | ||
383 | 388 | ||
384 | 389 | ||
385 | 390 | ||
386 | helpPopup = new KPopupMenu(this); | 391 | helpPopup = new KPopupMenu(this); |
387 | 392 | ||
388 | 393 | ||
@@ -830,73 +835,93 @@ void PwM::deletePwd_slot() | |||
830 | 835 | ||
831 | void PwM::changeMasterPwd_slot() | 836 | void PwM::changeMasterPwd_slot() |
832 | { | 837 | { |
833 | PWM_ASSERT(curDoc()); | 838 | PWM_ASSERT(curDoc()); |
834 | curDoc()->changeCurrentPw(); | 839 | curDoc()->changeCurrentPw(); |
835 | } | 840 | } |
836 | 841 | ||
837 | void PwM::lockWnd_slot() | 842 | void PwM::lockWnd_slot() |
838 | { | 843 | { |
839 | PWM_ASSERT(curDoc()); | 844 | PWM_ASSERT(curDoc()); |
840 | curDoc()->lockAll(true); | 845 | curDoc()->lockAll(true); |
841 | } | 846 | } |
842 | 847 | ||
843 | void PwM::deepLockWnd_slot() | 848 | void PwM::deepLockWnd_slot() |
844 | { | 849 | { |
845 | PWM_ASSERT(curDoc()); | 850 | PWM_ASSERT(curDoc()); |
846 | curDoc()->deepLock(); | 851 | curDoc()->deepLock(); |
847 | } | 852 | } |
848 | 853 | ||
849 | void PwM::unlockWnd_slot() | 854 | void PwM::unlockWnd_slot() |
850 | { | 855 | { |
851 | PWM_ASSERT(curDoc()); | 856 | PWM_ASSERT(curDoc()); |
852 | curDoc()->lockAll(false); | 857 | curDoc()->lockAll(false); |
853 | } | 858 | } |
854 | 859 | void PwM::config_global_slot() | |
860 | { | ||
861 | KPimPrefsGlobalDialog gc ( this ); | ||
862 | gc.exec(); | ||
863 | } | ||
855 | void PwM::config_slot() | 864 | void PwM::config_slot() |
856 | { | 865 | { |
857 | int oldStyle = conf()->confWndMainViewStyle(); | 866 | int oldStyle = conf()->confWndMainViewStyle(); |
858 | #ifdef PWM_EMBEDDED | 867 | |
868 | #if 0 | ||
859 | KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"pwmconfigdialog", true ); | 869 | KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"pwmconfigdialog", true ); |
860 | 870 | ||
861 | KCMPwmConfig* pwmcfg = new KCMPwmConfig( ConfigureDialog->getNewVBoxPage(i18n( "PwManager")) , "KCMPwmConfig" ); | 871 | KCMPwmConfig* pwmcfg = new KCMPwmConfig( ConfigureDialog->getNewVBoxPage(i18n( "PwManager")) , "KCMPwmConfig" ); |
862 | ConfigureDialog->addModule(pwmcfg ); | 872 | ConfigureDialog->addModule(pwmcfg ); |
863 | 873 | ||
864 | KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( ConfigureDialog->getNewVBoxPage(i18n( "Global")) , "KCMKdeLibConfig" ); | 874 | KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( ConfigureDialog->getNewVBoxPage(i18n( "Global")) , "KCMKdeLibConfig" ); |
865 | ConfigureDialog->addModule(kdelibcfg ); | 875 | ConfigureDialog->addModule(kdelibcfg ); |
876 | #endif | ||
877 | |||
866 | 878 | ||
879 | |||
880 | KDialogBase * ConfigureDialog = new KDialogBase ( KDialogBase::Plain , i18n("Configure KA/Pi"), KDialogBase::Default |KDialogBase::Cancel | KDialogBase::Apply | KDialogBase::Ok, KDialogBase::Ok,0, "name", true, true); | ||
881 | |||
882 | KCMPwmConfig* kabcfg = new KCMPwmConfig( ConfigureDialog , "KCMpwmConfig" ); | ||
883 | ConfigureDialog->setMainWidget( kabcfg ); | ||
884 | connect( ConfigureDialog, SIGNAL( applyClicked() ), | ||
885 | kabcfg, SLOT( save() ) ); | ||
886 | connect( ConfigureDialog, SIGNAL( acceptClicked() ), | ||
887 | kabcfg, SLOT( save() ) ); | ||
888 | connect( ConfigureDialog, SIGNAL( defaultClicked() ), | ||
889 | kabcfg, SLOT( defaults() ) ); | ||
890 | //saveSettings(); | ||
891 | kabcfg->load(); | ||
867 | #ifndef DESKTOP_VERSION | 892 | #ifndef DESKTOP_VERSION |
893 | if ( QApplication::desktop()->height() <= 480 ) | ||
894 | ;// ConfigureDialog->hideButtons(); | ||
868 | ConfigureDialog->showMaximized(); | 895 | ConfigureDialog->showMaximized(); |
869 | #endif | 896 | #endif |
897 | |||
898 | |||
870 | if ( ConfigureDialog->exec() ) | 899 | if ( ConfigureDialog->exec() ) |
871 | KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") ); | 900 | KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") ); |
872 | delete ConfigureDialog; | 901 | delete ConfigureDialog; |
873 | 902 | ||
874 | #else //PWM_EMBEDDED | 903 | |
875 | // display the configuration window (modal mode) | ||
876 | if (!conf()->showConfWnd(this)) | ||
877 | return; | ||
878 | #endif | ||
879 | 904 | ||
880 | int newStyle = conf()->confWndMainViewStyle(); | 905 | int newStyle = conf()->confWndMainViewStyle(); |
881 | // reinitialize tray | 906 | // reinitialize tray |
882 | init->initTray(); | 907 | init->initTray(); |
883 | // reinitialize KWallet emulation | 908 | // reinitialize KWallet emulation |
884 | init->initKWalletEmu(); | 909 | init->initKWalletEmu(); |
885 | 910 | ||
886 | PwMDocList *_dl = PwMDoc::getOpenDocList(); | 911 | PwMDocList *_dl = PwMDoc::getOpenDocList(); |
887 | const vector<PwMDocList::listItem> *dl = _dl->getList(); | 912 | const vector<PwMDocList::listItem> *dl = _dl->getList(); |
888 | vector<PwMDocList::listItem>::const_iterator i = dl->begin(), | 913 | vector<PwMDocList::listItem>::const_iterator i = dl->begin(), |
889 | end = dl->end(); | 914 | end = dl->end(); |
890 | PwMDoc *doc; | 915 | PwMDoc *doc; |
891 | while (i != end) { | 916 | while (i != end) { |
892 | doc = (*i).doc; | 917 | doc = (*i).doc; |
893 | // unlock-without-mpw timeout | 918 | // unlock-without-mpw timeout |
894 | doc->timer()->start(DocTimer::id_mpwTimer); | 919 | doc->timer()->start(DocTimer::id_mpwTimer); |
895 | // auto-lock timeout | 920 | // auto-lock timeout |
896 | doc->timer()->start(DocTimer::id_autoLockTimer); | 921 | doc->timer()->start(DocTimer::id_autoLockTimer); |
897 | ++i; | 922 | ++i; |
898 | } | 923 | } |
899 | 924 | ||
900 | const QValueList<PwM *> *ml = init->mainWndList(); | 925 | const QValueList<PwM *> *ml = init->mainWndList(); |
901 | #ifndef PWM_EMBEDDED | 926 | #ifndef PWM_EMBEDDED |
902 | QValueList<PwM *>::const_iterator i2 = ml->begin(), | 927 | QValueList<PwM *>::const_iterator i2 = ml->begin(), |
diff --git a/pwmanager/pwmanager/pwm.h b/pwmanager/pwmanager/pwm.h index 9fa9edc..2d1b854 100644 --- a/pwmanager/pwmanager/pwm.h +++ b/pwmanager/pwmanager/pwm.h | |||
@@ -144,48 +144,49 @@ public slots: | |||
144 | /** manage/edit triggered */ | 144 | /** manage/edit triggered */ |
145 | //US ENH : changed code to run with older MOC | 145 | //US ENH : changed code to run with older MOC |
146 | void editPwd_slot(); | 146 | void editPwd_slot(); |
147 | void editPwd_slot1(const QString *category); | 147 | void editPwd_slot1(const QString *category); |
148 | void editPwd_slot3(const QString *category, const int *index ,PwMDoc *_doc ); | 148 | void editPwd_slot3(const QString *category, const int *index ,PwMDoc *_doc ); |
149 | 149 | ||
150 | /** manage/delete triggered */ | 150 | /** manage/delete triggered */ |
151 | void deletePwd_slot(); | 151 | void deletePwd_slot(); |
152 | /** execute the "Launcher" entry */ | 152 | /** execute the "Launcher" entry */ |
153 | void execLauncher_slot(); | 153 | void execLauncher_slot(); |
154 | /** open browser with URL entry */ | 154 | /** open browser with URL entry */ |
155 | void goToURL_slot(); | 155 | void goToURL_slot(); |
156 | /** manage/changeMasterPwd triggered */ | 156 | /** manage/changeMasterPwd triggered */ |
157 | void changeMasterPwd_slot(); | 157 | void changeMasterPwd_slot(); |
158 | /** lock current document */ | 158 | /** lock current document */ |
159 | void lockWnd_slot(); | 159 | void lockWnd_slot(); |
160 | /** deeplock current document */ | 160 | /** deeplock current document */ |
161 | void deepLockWnd_slot(); | 161 | void deepLockWnd_slot(); |
162 | /** window/unlock triggered */ | 162 | /** window/unlock triggered */ |
163 | void unlockWnd_slot(); | 163 | void unlockWnd_slot(); |
164 | /** find item */ | 164 | /** find item */ |
165 | void find_slot(); | 165 | void find_slot(); |
166 | /** configure clicked */ | 166 | /** configure clicked */ |
167 | void config_slot(); | 167 | void config_slot(); |
168 | void config_global_slot(); | ||
168 | /** (de)activate the "change master pw" button in the menu-bar */ | 169 | /** (de)activate the "change master pw" button in the menu-bar */ |
169 | void activateMpButton(bool activate = true); | 170 | void activateMpButton(bool activate = true); |
170 | /** generate a new chipcard */ | 171 | /** generate a new chipcard */ |
171 | void genNewCard_slot(); | 172 | void genNewCard_slot(); |
172 | /** completely erase the current card */ | 173 | /** completely erase the current card */ |
173 | void eraseCard_slot(); | 174 | void eraseCard_slot(); |
174 | /** returns the ID number of the current card */ | 175 | /** returns the ID number of the current card */ |
175 | void readCardId_slot(); | 176 | void readCardId_slot(); |
176 | /** make backup image of the current card */ | 177 | /** make backup image of the current card */ |
177 | void makeCardBackup_slot(); | 178 | void makeCardBackup_slot(); |
178 | /** write backup image to current card */ | 179 | /** write backup image to current card */ |
179 | void replayCardBackup_slot(); | 180 | void replayCardBackup_slot(); |
180 | 181 | ||
181 | #ifdef PWM_EMBEDDED | 182 | #ifdef PWM_EMBEDDED |
182 | void category_slot(); | 183 | void category_slot(); |
183 | void whatsnew_slot(); | 184 | void whatsnew_slot(); |
184 | void showLicense_slot(); | 185 | void showLicense_slot(); |
185 | void faq_slot(); | 186 | void faq_slot(); |
186 | void createAboutData_slot(); | 187 | void createAboutData_slot(); |
187 | void syncHowTo_slot(); | 188 | void syncHowTo_slot(); |
188 | #endif | 189 | #endif |
189 | 190 | ||
190 | protected: | 191 | protected: |
191 | /** is this window virgin? */ | 192 | /** is this window virgin? */ |