author | ulf69 <ulf69> | 2004-09-21 19:44:23 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-09-21 19:44:23 (UTC) |
commit | a6a6544fc57542752fecc3763e0d35e6a38040ac (patch) (unidiff) | |
tree | 3324285a4aaee1db873e0c83d0c8e911cbe1aefb | |
parent | 6a40d65ddd6657e34c69d839da458810a8d8ff98 (diff) | |
download | kdepimpi-a6a6544fc57542752fecc3763e0d35e6a38040ac.zip kdepimpi-a6a6544fc57542752fecc3763e0d35e6a38040ac.tar.gz kdepimpi-a6a6544fc57542752fecc3763e0d35e6a38040ac.tar.bz2 |
*** empty log message ***
-rw-r--r-- | pwmanager/pwmanager/configwnd.cpp | 11 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwm.cpp | 35 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmanagerE.pro | 27 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmdoc.cpp | 2 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmdoc.h | 2 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmdocui.cpp | 1 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwminit.cpp | 19 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmtray.cpp | 4 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmview.cpp | 4 | ||||
-rw-r--r-- | pwmanager/pwmanager/serializer.cpp | 1 |
10 files changed, 83 insertions, 23 deletions
diff --git a/pwmanager/pwmanager/configwnd.cpp b/pwmanager/pwmanager/configwnd.cpp index 230ca1b..108c40f 100644 --- a/pwmanager/pwmanager/configwnd.cpp +++ b/pwmanager/pwmanager/configwnd.cpp | |||
@@ -23,140 +23,141 @@ | |||
23 | #include <qwhatsthis.h> | 23 | #include <qwhatsthis.h> |
24 | 24 | ||
25 | /* | 25 | /* |
26 | * Constructs a configWnd as a child of 'parent', with the | 26 | * Constructs a configWnd as a child of 'parent', with the |
27 | * name 'name' and widget flags set to 'f'. | 27 | * name 'name' and widget flags set to 'f'. |
28 | * | 28 | * |
29 | * The dialog will by default be modeless, unless you set 'modal' to | 29 | * The dialog will by default be modeless, unless you set 'modal' to |
30 | * TRUE to construct a modal dialog. | 30 | * TRUE to construct a modal dialog. |
31 | */ | 31 | */ |
32 | configWnd::configWnd( QWidget* parent, const char* name, bool modal, WFlags fl ) | 32 | configWnd::configWnd( QWidget* parent, const char* name, bool modal, WFlags fl ) |
33 | : QDialog( parent, name, modal, fl ) | 33 | : QDialog( parent, name, modal, fl ) |
34 | { | 34 | { |
35 | if ( !name ) | 35 | if ( !name ) |
36 | setName( "configWnd" ); | 36 | setName( "configWnd" ); |
37 | 37 | ||
38 | okButton = new QPushButton( this, "okButton" ); | 38 | okButton = new QPushButton( this, "okButton" ); |
39 | okButton->setGeometry( QRect( 10, 280, 107, 27 ) ); | 39 | okButton->setGeometry( QRect( 10, 280, 107, 27 ) ); |
40 | 40 | ||
41 | cancelButton = new QPushButton( this, "cancelButton" ); | 41 | cancelButton = new QPushButton( this, "cancelButton" ); |
42 | cancelButton->setGeometry( QRect( 370, 280, 107, 27 ) ); | 42 | cancelButton->setGeometry( QRect( 370, 280, 107, 27 ) ); |
43 | 43 | ||
44 | tabWidget2 = new QTabWidget( this, "tabWidget2" ); | 44 | tabWidget2 = new QTabWidget( this, "tabWidget2" ); |
45 | tabWidget2->setGeometry( QRect( 10, 10, 470, 260 ) ); | 45 | tabWidget2->setGeometry( QRect( 10, 10, 470, 260 ) ); |
46 | 46 | ||
47 | ////////////////////////////// | ||
47 | tab = new QWidget( tabWidget2, "tab" ); | 48 | tab = new QWidget( tabWidget2, "tab" ); |
48 | 49 | ||
49 | windowStyleComboBox = new QComboBox( FALSE, tab, "windowStyleComboBox" ); | 50 | windowStyleComboBox = new QComboBox( FALSE, tab, "windowStyleComboBox" ); |
50 | windowStyleComboBox->setGeometry( QRect( 220, 180, 210, 28 ) ); | 51 | windowStyleComboBox->setGeometry( QRect( 220, 180, 210, 28 ) ); |
51 | 52 | ||
52 | textLabel1_5 = new QLabel( tab, "textLabel1_5" ); | 53 | textLabel1_5 = new QLabel( tab, "textLabel1_5" ); |
53 | textLabel1_5->setGeometry( QRect( 30, 180, 180, 20 ) ); | 54 | textLabel1_5->setGeometry( QRect( 30, 180, 180, 20 ) ); |
54 | textLabel1_5->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); | 55 | textLabel1_5->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); |
55 | 56 | ||
56 | textLabel1_4 = new QLabel( tab, "textLabel1_4" ); | 57 | textLabel1_4 = new QLabel( tab, "textLabel1_4" ); |
57 | textLabel1_4->setGeometry( QRect( 30, 40, 400, 20 ) ); | 58 | textLabel1_4->setGeometry( QRect( 30, 40, 400, 20 ) ); |
58 | 59 | ||
59 | selEntrFontButton = new QPushButton( tab, "selEntrFontButton" ); | 60 | selEntrFontButton = new QPushButton( tab, "selEntrFontButton" ); |
60 | selEntrFontButton->setGeometry( QRect( 30, 90, 160, 27 ) ); | 61 | selEntrFontButton->setGeometry( QRect( 30, 90, 160, 27 ) ); |
61 | 62 | ||
62 | currEntrFont = new QLabel( tab, "currEntrFont" ); | 63 | currEntrFont = new QLabel( tab, "currEntrFont" ); |
63 | currEntrFont->setGeometry( QRect( 30, 70, 230, 20 ) ); | 64 | currEntrFont->setGeometry( QRect( 30, 70, 230, 20 ) ); |
64 | tabWidget2->insertTab( tab, QString("") ); | 65 | tabWidget2->insertTab( tab, QString("") ); |
65 | 66 | ////////////////////////////////////// | |
66 | TabPage = new QWidget( tabWidget2, "TabPage" ); | 67 | TabPage = new QWidget( tabWidget2, "TabPage" ); |
67 | 68 | ||
68 | compressionComboBox = new QComboBox( FALSE, TabPage, "compressionComboBox" ); | 69 | compressionComboBox = new QComboBox( FALSE, TabPage, "compressionComboBox" ); |
69 | compressionComboBox->setGeometry( QRect( 290, 50, 150, 28 ) ); | 70 | compressionComboBox->setGeometry( QRect( 290, 50, 150, 28 ) ); |
70 | 71 | ||
71 | textLabel1_6 = new QLabel( TabPage, "textLabel1_6" ); | 72 | textLabel1_6 = new QLabel( TabPage, "textLabel1_6" ); |
72 | textLabel1_6->setGeometry( QRect( 10, 50, 270, 20 ) ); | 73 | textLabel1_6->setGeometry( QRect( 10, 50, 270, 20 ) ); |
73 | textLabel1_6->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); | 74 | textLabel1_6->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); |
74 | 75 | ||
75 | textLabel1_8 = new QLabel( TabPage, "textLabel1_8" ); | 76 | textLabel1_8 = new QLabel( TabPage, "textLabel1_8" ); |
76 | textLabel1_8->setGeometry( QRect( 10, 90, 270, 20 ) ); | 77 | textLabel1_8->setGeometry( QRect( 10, 90, 270, 20 ) ); |
77 | textLabel1_8->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); | 78 | textLabel1_8->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); |
78 | 79 | ||
79 | permissionLineEdit = new QLineEdit( TabPage, "permissionLineEdit" ); | 80 | permissionLineEdit = new QLineEdit( TabPage, "permissionLineEdit" ); |
80 | permissionLineEdit->setGeometry( QRect( 290, 90, 142, 27 ) ); | 81 | permissionLineEdit->setGeometry( QRect( 290, 90, 142, 27 ) ); |
81 | permissionLineEdit->setMaxLength( 3 ); | 82 | permissionLineEdit->setMaxLength( 3 ); |
82 | 83 | ||
83 | fileBackupCheckBox = new QCheckBox( TabPage, "fileBackupCheckBox" ); | 84 | fileBackupCheckBox = new QCheckBox( TabPage, "fileBackupCheckBox" ); |
84 | fileBackupCheckBox->setGeometry( QRect( 80, 140, 360, 23 ) ); | 85 | fileBackupCheckBox->setGeometry( QRect( 80, 140, 360, 23 ) ); |
85 | tabWidget2->insertTab( TabPage, QString("") ); | 86 | tabWidget2->insertTab( TabPage, QString("") ); |
86 | 87 | ////////////////////////////////////// | |
87 | tab_2 = new QWidget( tabWidget2, "tab_2" ); | 88 | tab_2 = new QWidget( tabWidget2, "tab_2" ); |
88 | 89 | ||
89 | pwTimeoutSpinBox = new QSpinBox( tab_2, "pwTimeoutSpinBox" ); | 90 | pwTimeoutSpinBox = new QSpinBox( tab_2, "pwTimeoutSpinBox" ); |
90 | pwTimeoutSpinBox->setGeometry( QRect( 390, 50, 55, 23 ) ); | 91 | pwTimeoutSpinBox->setGeometry( QRect( 390, 50, 55, 23 ) ); |
91 | 92 | ||
92 | textLabel1 = new QLabel( tab_2, "textLabel1" ); | 93 | textLabel1 = new QLabel( tab_2, "textLabel1" ); |
93 | textLabel1->setGeometry( QRect( 10, 20, 370, 80 ) ); | 94 | textLabel1->setGeometry( QRect( 10, 20, 370, 80 ) ); |
94 | textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); | 95 | textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); |
95 | 96 | ||
96 | textLabel1_7 = new QLabel( tab_2, "textLabel1_7" ); | 97 | textLabel1_7 = new QLabel( tab_2, "textLabel1_7" ); |
97 | textLabel1_7->setGeometry( QRect( 10, 110, 370, 80 ) ); | 98 | textLabel1_7->setGeometry( QRect( 10, 110, 370, 80 ) ); |
98 | textLabel1_7->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); | 99 | textLabel1_7->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); |
99 | 100 | ||
100 | lockTimeoutSpinBox = new QSpinBox( tab_2, "lockTimeoutSpinBox" ); | 101 | lockTimeoutSpinBox = new QSpinBox( tab_2, "lockTimeoutSpinBox" ); |
101 | lockTimeoutSpinBox->setGeometry( QRect( 390, 140, 55, 23 ) ); | 102 | lockTimeoutSpinBox->setGeometry( QRect( 390, 140, 55, 23 ) ); |
102 | 103 | ||
103 | autoDeepLockCheckBox = new QCheckBox( tab_2, "autoDeepLockCheckBox" ); | 104 | autoDeepLockCheckBox = new QCheckBox( tab_2, "autoDeepLockCheckBox" ); |
104 | autoDeepLockCheckBox->setGeometry( QRect( 60, 180, 380, 25 ) ); | 105 | autoDeepLockCheckBox->setGeometry( QRect( 60, 180, 380, 25 ) ); |
105 | tabWidget2->insertTab( tab_2, QString("") ); | 106 | tabWidget2->insertTab( tab_2, QString("") ); |
106 | 107 | /////////////////////////////////////////// | |
107 | tab_3 = new QWidget( tabWidget2, "tab_3" ); | 108 | tab_3 = new QWidget( tabWidget2, "tab_3" ); |
108 | 109 | ||
109 | textLabel1_3 = new QLabel( tab_3, "textLabel1_3" ); | 110 | textLabel1_3 = new QLabel( tab_3, "textLabel1_3" ); |
110 | textLabel1_3->setGeometry( QRect( 30, 30, 400, 20 ) ); | 111 | textLabel1_3->setGeometry( QRect( 30, 30, 400, 20 ) ); |
111 | 112 | ||
112 | autoStartLineEdit = new QLineEdit( tab_3, "autoStartLineEdit" ); | 113 | autoStartLineEdit = new QLineEdit( tab_3, "autoStartLineEdit" ); |
113 | autoStartLineEdit->setGeometry( QRect( 30, 50, 360, 20 ) ); | 114 | autoStartLineEdit->setGeometry( QRect( 30, 50, 360, 20 ) ); |
114 | 115 | ||
115 | browseAutoStButton = new QPushButton( tab_3, "browseAutoStButton" ); | 116 | browseAutoStButton = new QPushButton( tab_3, "browseAutoStButton" ); |
116 | browseAutoStButton->setGeometry( QRect( 400, 50, 30, 20 ) ); | 117 | browseAutoStButton->setGeometry( QRect( 400, 50, 30, 20 ) ); |
117 | 118 | ||
118 | autostartDeeplockedCheckBox = new QCheckBox( tab_3, "autostartDeeplockedCheckBox" ); | 119 | autostartDeeplockedCheckBox = new QCheckBox( tab_3, "autostartDeeplockedCheckBox" ); |
119 | autostartDeeplockedCheckBox->setGeometry( QRect( 40, 80, 390, 25 ) ); | 120 | autostartDeeplockedCheckBox->setGeometry( QRect( 40, 80, 390, 25 ) ); |
120 | tabWidget2->insertTab( tab_3, QString("") ); | 121 | tabWidget2->insertTab( tab_3, QString("") ); |
121 | 122 | //////////////////////////////////////////// | |
122 | tab_4 = new QWidget( tabWidget2, "tab_4" ); | 123 | tab_4 = new QWidget( tabWidget2, "tab_4" ); |
123 | 124 | ||
124 | textLabel2 = new QLabel( tab_4, "textLabel2" ); | 125 | textLabel2 = new QLabel( tab_4, "textLabel2" ); |
125 | textLabel2->setGeometry( QRect( 20, 40, 280, 20 ) ); | 126 | textLabel2->setGeometry( QRect( 20, 40, 280, 20 ) ); |
126 | textLabel2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); | 127 | textLabel2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); |
127 | 128 | ||
128 | browserLineEdit = new QLineEdit( tab_4, "browserLineEdit" ); | 129 | browserLineEdit = new QLineEdit( tab_4, "browserLineEdit" ); |
129 | browserLineEdit->setGeometry( QRect( 310, 40, 130, 27 ) ); | 130 | browserLineEdit->setGeometry( QRect( 310, 40, 130, 27 ) ); |
130 | 131 | ||
131 | xtermLineEdit = new QLineEdit( tab_4, "xtermLineEdit" ); | 132 | xtermLineEdit = new QLineEdit( tab_4, "xtermLineEdit" ); |
132 | xtermLineEdit->setGeometry( QRect( 310, 100, 130, 27 ) ); | 133 | xtermLineEdit->setGeometry( QRect( 310, 100, 130, 27 ) ); |
133 | 134 | ||
134 | textLabel3 = new QLabel( tab_4, "textLabel3" ); | 135 | textLabel3 = new QLabel( tab_4, "textLabel3" ); |
135 | textLabel3->setGeometry( QRect( 20, 100, 280, 20 ) ); | 136 | textLabel3->setGeometry( QRect( 20, 100, 280, 20 ) ); |
136 | textLabel3->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); | 137 | textLabel3->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); |
137 | tabWidget2->insertTab( tab_4, QString("") ); | 138 | tabWidget2->insertTab( tab_4, QString("") ); |
138 | 139 | /////////////////////////////////////////////// | |
139 | tab_5 = new QWidget( tabWidget2, "tab_5" ); | 140 | tab_5 = new QWidget( tabWidget2, "tab_5" ); |
140 | 141 | ||
141 | trayCheckBox = new QCheckBox( tab_5, "trayCheckBox" ); | 142 | trayCheckBox = new QCheckBox( tab_5, "trayCheckBox" ); |
142 | trayCheckBox->setGeometry( QRect( 30, 30, 400, 20 ) ); | 143 | trayCheckBox->setGeometry( QRect( 30, 30, 400, 20 ) ); |
143 | 144 | ||
144 | openUnlockedCheckBox = new QCheckBox( tab_5, "openUnlockedCheckBox" ); | 145 | openUnlockedCheckBox = new QCheckBox( tab_5, "openUnlockedCheckBox" ); |
145 | openUnlockedCheckBox->setGeometry( QRect( 30, 80, 400, 20 ) ); | 146 | openUnlockedCheckBox->setGeometry( QRect( 30, 80, 400, 20 ) ); |
146 | 147 | ||
147 | autoMinimizeCheckBox = new QCheckBox( tab_5, "autoMinimizeCheckBox" ); | 148 | autoMinimizeCheckBox = new QCheckBox( tab_5, "autoMinimizeCheckBox" ); |
148 | autoMinimizeCheckBox->setEnabled( FALSE ); | 149 | autoMinimizeCheckBox->setEnabled( FALSE ); |
149 | autoMinimizeCheckBox->setGeometry( QRect( 50, 50, 380, 25 ) ); | 150 | autoMinimizeCheckBox->setGeometry( QRect( 50, 50, 380, 25 ) ); |
150 | 151 | ||
151 | minimizeLockComboBox = new QComboBox( FALSE, tab_5, "minimizeLockComboBox" ); | 152 | minimizeLockComboBox = new QComboBox( FALSE, tab_5, "minimizeLockComboBox" ); |
152 | minimizeLockComboBox->setGeometry( QRect( 310, 170, 120, 27 ) ); | 153 | minimizeLockComboBox->setGeometry( QRect( 310, 170, 120, 27 ) ); |
153 | 154 | ||
154 | textLabel1_9 = new QLabel( tab_5, "textLabel1_9" ); | 155 | textLabel1_9 = new QLabel( tab_5, "textLabel1_9" ); |
155 | textLabel1_9->setGeometry( QRect( 30, 180, 270, 20 ) ); | 156 | textLabel1_9->setGeometry( QRect( 30, 180, 270, 20 ) ); |
156 | textLabel1_9->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); | 157 | textLabel1_9->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); |
157 | 158 | ||
158 | kwalletEmuCheckBox = new QCheckBox( tab_5, "kwalletEmuCheckBox" ); | 159 | kwalletEmuCheckBox = new QCheckBox( tab_5, "kwalletEmuCheckBox" ); |
159 | kwalletEmuCheckBox->setGeometry( QRect( 30, 110, 400, 25 ) ); | 160 | kwalletEmuCheckBox->setGeometry( QRect( 30, 110, 400, 25 ) ); |
160 | 161 | ||
161 | wndCloseCheckBox = new QCheckBox( tab_5, "wndCloseCheckBox" ); | 162 | wndCloseCheckBox = new QCheckBox( tab_5, "wndCloseCheckBox" ); |
162 | wndCloseCheckBox->setGeometry( QRect( 30, 140, 430, 24 ) ); | 163 | wndCloseCheckBox->setGeometry( QRect( 30, 140, 430, 24 ) ); |
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp index e5579f8..08fcb25 100644 --- a/pwmanager/pwmanager/pwm.cpp +++ b/pwmanager/pwmanager/pwm.cpp | |||
@@ -7,71 +7,76 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 * | 7 | * it under the terms of the GNU General Public License version 2 * |
8 | * as published by the Free Software Foundation. * | 8 | * as published by the Free Software Foundation. * |
9 | * * | 9 | * * |
10 | ***************************************************************************/ | 10 | ***************************************************************************/ |
11 | 11 | ||
12 | /*************************************************************************** | 12 | /*************************************************************************** |
13 | * copyright (C) 2004 by Ulf Schenk | 13 | * copyright (C) 2004 by Ulf Schenk |
14 | * This file is originaly based on version 1.0.1 of pwmanager | 14 | * This file is originaly based on version 1.0.1 of pwmanager |
15 | * and was modified to run on embedded devices that run microkde | 15 | * and was modified to run on embedded devices that run microkde |
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 | #ifndef PWM_EMBEDDED | 27 | #ifndef PWM_EMBEDDED |
28 | #include <kmenubar.h> | 28 | #include <kmenubar.h> |
29 | #include <kstatusbar.h> | 29 | #include <kstatusbar.h> |
30 | #include <dcopclient.h> | 30 | #include <dcopclient.h> |
31 | #include "configwndimpl.h" | ||
32 | #include "configuration.h" | ||
31 | #else | 33 | #else |
32 | #include <qmenubar.h> | 34 | #include <qmenubar.h> |
33 | #include <qmessagebox.h> | 35 | #include <qmessagebox.h> |
36 | #include <pwmprefs.h> | ||
37 | #include <kpimglobalprefs.h> | ||
38 | #include <kcmconfigs/kcmpwmconfig.h> | ||
39 | #include <kcmconfigs/kcmkdepimconfig.h> | ||
40 | #include <kcmultidialog.h> | ||
34 | #endif | 41 | #endif |
35 | 42 | ||
36 | #include <qpixmap.h> | 43 | #include <qpixmap.h> |
37 | #include <qcheckbox.h> | 44 | #include <qcheckbox.h> |
38 | #include <qspinbox.h> | 45 | #include <qspinbox.h> |
39 | #include <qlineedit.h> | 46 | #include <qlineedit.h> |
40 | #include <qfileinfo.h> | 47 | #include <qfileinfo.h> |
41 | #include <qclipboard.h> | 48 | #include <qclipboard.h> |
42 | 49 | ||
43 | 50 | ||
44 | #include <stdio.h> | 51 | #include <stdio.h> |
45 | 52 | ||
46 | #include "pwm.h" | 53 | #include "pwm.h" |
47 | #include "pwminit.h" | 54 | #include "pwminit.h" |
48 | #include "configwndimpl.h" | ||
49 | #include "pwmprint.h" | 55 | #include "pwmprint.h" |
50 | #include "addentrywndimpl.h" | 56 | #include "addentrywndimpl.h" |
51 | #include "globalstuff.h" | 57 | #include "globalstuff.h" |
52 | #include "findwndimpl.h" | 58 | #include "findwndimpl.h" |
53 | #include "configuration.h" | ||
54 | 59 | ||
55 | #ifdef CONFIG_KWALLETIF | 60 | #ifdef CONFIG_KWALLETIF |
56 | # include "kwalletif.h" | 61 | # include "kwalletif.h" |
57 | # include "kwalletemu.h" | 62 | # include "kwalletemu.h" |
58 | #endif | 63 | #endif |
59 | #ifdef CONFIG_KEYCARD | 64 | #ifdef CONFIG_KEYCARD |
60 | # include "pwmkeycard.h" | 65 | # include "pwmkeycard.h" |
61 | #endif | 66 | #endif |
62 | 67 | ||
63 | 68 | ||
64 | #define DEFAULT_SIZE (QSize(700, 400)) | 69 | #define DEFAULT_SIZE (QSize(700, 400)) |
65 | 70 | ||
66 | // Button IDs for "file" popup menu | 71 | // Button IDs for "file" popup menu |
67 | enum { | 72 | enum { |
68 | BUTTON_POPUP_FILE_NEW = 0, | 73 | BUTTON_POPUP_FILE_NEW = 0, |
69 | BUTTON_POPUP_FILE_OPEN, | 74 | BUTTON_POPUP_FILE_OPEN, |
70 | BUTTON_POPUP_FILE_CLOSE, | 75 | BUTTON_POPUP_FILE_CLOSE, |
71 | BUTTON_POPUP_FILE_SAVE, | 76 | BUTTON_POPUP_FILE_SAVE, |
72 | BUTTON_POPUP_FILE_SAVEAS, | 77 | BUTTON_POPUP_FILE_SAVEAS, |
73 | BUTTON_POPUP_FILE_EXPORT, | 78 | BUTTON_POPUP_FILE_EXPORT, |
74 | BUTTON_POPUP_FILE_IMPORT, | 79 | BUTTON_POPUP_FILE_IMPORT, |
75 | BUTTON_POPUP_FILE_PRINT, | 80 | BUTTON_POPUP_FILE_PRINT, |
76 | BUTTON_POPUP_FILE_QUIT | 81 | BUTTON_POPUP_FILE_QUIT |
77 | }; | 82 | }; |
@@ -730,91 +735,107 @@ void PwM::changeMasterPwd_slot() | |||
730 | PWM_ASSERT(curDoc()); | 735 | PWM_ASSERT(curDoc()); |
731 | curDoc()->changeCurrentPw(); | 736 | curDoc()->changeCurrentPw(); |
732 | } | 737 | } |
733 | 738 | ||
734 | void PwM::lockWnd_slot() | 739 | void PwM::lockWnd_slot() |
735 | { | 740 | { |
736 | PWM_ASSERT(curDoc()); | 741 | PWM_ASSERT(curDoc()); |
737 | curDoc()->lockAll(true); | 742 | curDoc()->lockAll(true); |
738 | } | 743 | } |
739 | 744 | ||
740 | void PwM::deepLockWnd_slot() | 745 | void PwM::deepLockWnd_slot() |
741 | { | 746 | { |
742 | PWM_ASSERT(curDoc()); | 747 | PWM_ASSERT(curDoc()); |
743 | curDoc()->deepLock(); | 748 | curDoc()->deepLock(); |
744 | } | 749 | } |
745 | 750 | ||
746 | void PwM::unlockWnd_slot() | 751 | void PwM::unlockWnd_slot() |
747 | { | 752 | { |
748 | PWM_ASSERT(curDoc()); | 753 | PWM_ASSERT(curDoc()); |
749 | curDoc()->lockAll(false); | 754 | curDoc()->lockAll(false); |
750 | } | 755 | } |
751 | 756 | ||
752 | void PwM::config_slot() | 757 | void PwM::config_slot() |
753 | { | 758 | { |
754 | Configuration *conf = Configuration::obj(); | 759 | int oldStyle = conf()->confWndMainViewStyle(); |
755 | int oldStyle = conf->confWndMainViewStyle(); | 760 | #ifdef PWM_EMBEDDED |
761 | KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"pwmconfigdialog", true ); | ||
762 | |||
763 | KCMPwmConfig* pwmcfg = new KCMPwmConfig( ConfigureDialog->getNewVBoxPage(i18n( "PwManager")) , "KCMPwmConfig" ); | ||
764 | ConfigureDialog->addModule(pwmcfg ); | ||
756 | 765 | ||
766 | KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( ConfigureDialog->getNewVBoxPage(i18n( "Global")) , "KCMKdeLibConfig" ); | ||
767 | ConfigureDialog->addModule(kdelibcfg ); | ||
768 | |||
769 | #ifndef DESKTOP_VERSION | ||
770 | ConfigureDialog->showMaximized(); | ||
771 | #endif | ||
772 | if ( ConfigureDialog->exec() ) | ||
773 | KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") ); | ||
774 | delete ConfigureDialog; | ||
775 | |||
776 | #else //PWM_EMBEDDED | ||
757 | // display the configuration window (modal mode) | 777 | // display the configuration window (modal mode) |
758 | if (!conf->showConfWnd(this)) | 778 | if (!conf()->showConfWnd(this)) |
759 | return; | 779 | return; |
780 | #endif | ||
760 | 781 | ||
761 | int newStyle = conf->confWndMainViewStyle(); | 782 | int newStyle = conf()->confWndMainViewStyle(); |
762 | // reinitialize tray | 783 | // reinitialize tray |
763 | init->initTray(); | 784 | init->initTray(); |
764 | // reinitialize KWallet emulation | 785 | // reinitialize KWallet emulation |
765 | init->initKWalletEmu(); | 786 | init->initKWalletEmu(); |
766 | 787 | ||
767 | PwMDocList *_dl = PwMDoc::getOpenDocList(); | 788 | PwMDocList *_dl = PwMDoc::getOpenDocList(); |
768 | const vector<PwMDocList::listItem> *dl = _dl->getList(); | 789 | const vector<PwMDocList::listItem> *dl = _dl->getList(); |
769 | vector<PwMDocList::listItem>::const_iterator i = dl->begin(), | 790 | vector<PwMDocList::listItem>::const_iterator i = dl->begin(), |
770 | end = dl->end(); | 791 | end = dl->end(); |
771 | PwMDoc *doc; | 792 | PwMDoc *doc; |
772 | while (i != end) { | 793 | while (i != end) { |
773 | doc = (*i).doc; | 794 | doc = (*i).doc; |
774 | // unlock-without-mpw timeout | 795 | // unlock-without-mpw timeout |
775 | doc->timer()->start(DocTimer::id_mpwTimer); | 796 | doc->timer()->start(DocTimer::id_mpwTimer); |
776 | // auto-lock timeout | 797 | // auto-lock timeout |
777 | doc->timer()->start(DocTimer::id_autoLockTimer); | 798 | doc->timer()->start(DocTimer::id_autoLockTimer); |
778 | ++i; | 799 | ++i; |
779 | } | 800 | } |
780 | 801 | ||
781 | const QValueList<PwM *> *ml = init->mainWndList(); | 802 | const QValueList<PwM *> *ml = init->mainWndList(); |
782 | #ifndef PWM_EMBEDDED | 803 | #ifndef PWM_EMBEDDED |
783 | QValueList<PwM *>::const_iterator i2 = ml->begin(), | 804 | QValueList<PwM *>::const_iterator i2 = ml->begin(), |
784 | end2 = ml->end(); | 805 | end2 = ml->end(); |
785 | #else | 806 | #else |
786 | QValueList<PwM *>::ConstIterator i2 = ml->begin(), | 807 | QValueList<PwM *>::ConstIterator i2 = ml->begin(), |
787 | end2 = ml->end(); | 808 | end2 = ml->end(); |
788 | #endif | 809 | #endif |
789 | PwM *pwm; | 810 | PwM *pwm; |
790 | while (i2 != end2) { | 811 | while (i2 != end2) { |
791 | pwm = *i2; | 812 | pwm = *i2; |
792 | // reinitialize the window style. | 813 | // reinitialize the window style. |
793 | if (oldStyle != newStyle) | 814 | if (oldStyle != newStyle) |
794 | pwm->curView()->initStyle(newStyle); | 815 | pwm->curView()->initStyle(newStyle); |
795 | // set the new font | 816 | // set the new font |
796 | pwm->curView()->setFont(conf->confGlobEntryFont()); | 817 | pwm->curView()->setFont(conf()->confGlobEntryFont()); |
797 | ++i2; | 818 | ++i2; |
798 | } | 819 | } |
799 | } | 820 | } |
800 | 821 | ||
801 | void PwM::activateMpButton(bool activate) | 822 | void PwM::activateMpButton(bool activate) |
802 | { | 823 | { |
803 | managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_CHANGEMP, activate); | 824 | managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_CHANGEMP, activate); |
804 | } | 825 | } |
805 | 826 | ||
806 | void PwM::closeEvent(QCloseEvent *e) | 827 | void PwM::closeEvent(QCloseEvent *e) |
807 | { | 828 | { |
808 | e->accept(); | 829 | e->accept(); |
809 | } | 830 | } |
810 | 831 | ||
811 | void PwM::docClosed(PwMDoc *doc) | 832 | void PwM::docClosed(PwMDoc *doc) |
812 | { | 833 | { |
813 | PARAM_UNUSED(doc); | 834 | PARAM_UNUSED(doc); |
814 | PWM_ASSERT(doc == curDoc()); | 835 | PWM_ASSERT(doc == curDoc()); |
815 | close(); | 836 | close(); |
816 | } | 837 | } |
817 | 838 | ||
818 | void PwM::find_slot() | 839 | void PwM::find_slot() |
819 | { | 840 | { |
820 | PWM_ASSERT(curDoc()); | 841 | PWM_ASSERT(curDoc()); |
diff --git a/pwmanager/pwmanager/pwmanagerE.pro b/pwmanager/pwmanager/pwmanagerE.pro index 2cd69a5..5c29ea4 100644 --- a/pwmanager/pwmanager/pwmanagerE.pro +++ b/pwmanager/pwmanager/pwmanagerE.pro | |||
@@ -1,144 +1,153 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | CONFIG += qt warn_on | 2 | CONFIG += qt warn_on |
3 | 3 | ||
4 | 4 | ||
5 | TARGET = pwmpi | 5 | TARGET = pwmpi |
6 | OBJECTS_DIR = obj/$(PLATFORM) | 6 | OBJECTS_DIR = obj/$(PLATFORM) |
7 | MOC_DIR = moc/$(PLATFORM) | 7 | MOC_DIR = moc/$(PLATFORM) |
8 | DESTDIR=$(QPEDIR)/bin | 8 | DESTDIR=$(QPEDIR)/bin |
9 | 9 | ||
10 | INCLUDEPATH += . ../../qtcompat ../../qtcompat/xml ../../microkde ../../microkde/kdecore ../../microkde/kdeui $(QPEDIR)/include | 10 | INCLUDEPATH += . ../../qtcompat ../../qtcompat/xml ../../libkdepim ../../microkde ../../microkde/kdecore ../../microkde/kdeui ../../microkde/kutils $(QPEDIR)/include |
11 | DEFINES += PWM_EMBEDDED PWM_DEBUG | 11 | DEFINES += PWM_EMBEDDED PWM_DEBUG |
12 | LIBS += -lmicrokde | 12 | LIBS += -lmicrokde |
13 | LIBS += -lmicroqtcompat | 13 | LIBS += -lmicroqtcompat |
14 | LIBS += -lmicrokdepim | ||
14 | LIBS += -L$(QPEDIR)/lib | 15 | LIBS += -L$(QPEDIR)/lib |
15 | LIBS += -lqpe | 16 | LIBS += -lqpe |
16 | LIBS += -lbz2 | 17 | LIBS += -lbz2 |
17 | LIBS += $(QTOPIALIB) | 18 | LIBS += $(QTOPIALIB) |
18 | 19 | ||
19 | #INTERFACES = \ | 20 | #INTERFACES = \ |
20 | #addentrywnd.ui \ | 21 | #addentrywnd.ui \ |
21 | #configwnd.ui \ | 22 | #configwnd.ui \ |
22 | #findwnd.ui \ | 23 | #findwnd.ui \ |
23 | #getmasterpwwnd.ui \ | 24 | #getmasterpwwnd.ui \ |
24 | #pwgenwnd.ui \ | 25 | #pwgenwnd.ui \ |
25 | #setmasterpwwnd.ui \ | 26 | #setmasterpwwnd.ui \ |
26 | #subtbledit.ui | 27 | #subtbledit.ui |
27 | 28 | ||
28 | #INTERFACES = \ | 29 | #INTERFACES = \ |
29 | #subtbledit.ui \ | 30 | #subtbledit.ui \ |
30 | 31 | ||
31 | 32 | ||
32 | 33 | ||
33 | #HEADERS = \ | 34 | #HEADERS = \ |
35 | #configuration_31compat.h \ | ||
36 | #configuration.h \ | ||
37 | #configwnd.h \ | ||
38 | #configwndimpl.h \ | ||
34 | #selftest.h | 39 | #selftest.h |
35 | 40 | ||
36 | HEADERS = \ | 41 | HEADERS = \ |
37 | addentrywnd.h \ | 42 | addentrywnd.h \ |
38 | addentrywndimpl.h \ | 43 | addentrywndimpl.h \ |
39 | base64.h \ | 44 | base64.h \ |
40 | binentrygen.h \ | 45 | binentrygen.h \ |
41 | blowfish.h \ | 46 | blowfish.h \ |
42 | commentbox.h \ | 47 | commentbox.h \ |
43 | compiler.h \ | 48 | compiler.h \ |
44 | compressbzip2.h \ | 49 | compressbzip2.h \ |
45 | compressgzip.h \ | 50 | compressgzip.h \ |
46 | configuration_31compat.h \ | ||
47 | configuration.h \ | ||
48 | configwnd.h \ | ||
49 | configwndimpl.h \ | ||
50 | findwnd.h \ | 51 | findwnd.h \ |
51 | findwndimpl.h \ | 52 | findwndimpl.h \ |
52 | genpasswd.h \ | 53 | genpasswd.h \ |
53 | getkeycardwnd.h \ | 54 | getkeycardwnd.h \ |
54 | getmasterpwwnd.h \ | 55 | getmasterpwwnd.h \ |
55 | getmasterpwwndimpl.h \ | 56 | getmasterpwwndimpl.h \ |
56 | globalstuff.h \ | 57 | globalstuff.h \ |
57 | gpasmanfile.h \ | 58 | gpasmanfile.h \ |
58 | htmlgen.h \ | 59 | htmlgen.h \ |
59 | htmlparse.h \ | 60 | htmlparse.h \ |
60 | ipc.h \ | 61 | ipc.h \ |
61 | listobjselectwnd.h \ | 62 | listobjselectwnd.h \ |
62 | listviewpwm.h \ | 63 | listviewpwm.h \ |
63 | printtext.h \ | 64 | printtext.h \ |
64 | pwgenwnd.h \ | 65 | pwgenwnd.h \ |
65 | pwgenwndimpl.h \ | 66 | pwgenwndimpl.h \ |
66 | pwmdoc.h \ | 67 | pwmdoc.h \ |
67 | pwmdocui.h \ | 68 | pwmdocui.h \ |
68 | pwmexception.h \ | 69 | pwmexception.h \ |
69 | pwm.h \ | 70 | pwm.h \ |
70 | pwminit.h \ | 71 | pwminit.h \ |
72 | pwmprefs.h \ | ||
71 | pwmprint.h \ | 73 | pwmprint.h \ |
72 | pwmtray.h \ | 74 | pwmtray.h \ |
73 | pwmview.h \ | 75 | pwmview.h \ |
74 | pwmviewstyle_0.h \ | 76 | pwmviewstyle_0.h \ |
75 | pwmviewstyle_1.h \ | 77 | pwmviewstyle_1.h \ |
76 | pwmviewstyle.h \ | 78 | pwmviewstyle.h \ |
77 | randomizer.h \ | 79 | randomizer.h \ |
78 | rc2.h \ | 80 | rc2.h \ |
79 | rencatwnd.h \ | 81 | rencatwnd.h \ |
80 | serializer.h \ | 82 | serializer.h \ |
81 | setmasterpwwnd.h \ | 83 | setmasterpwwnd.h \ |
82 | setmasterpwwndimpl.h \ | 84 | setmasterpwwndimpl.h \ |
83 | sha1.h \ | 85 | sha1.h \ |
84 | subtbledit.h \ | 86 | subtbledit.h \ |
85 | subtbleditimpl.h \ | 87 | subtbleditimpl.h \ |
86 | waitwnd.h | 88 | waitwnd.h \ |
89 | kcmconfigs/kcmpwmconfig.h \ | ||
90 | kcmconfigs/pwmconfigwidget.h \ | ||
87 | 91 | ||
92 | #sources that need not be build | ||
88 | #SOURCES = \ | 93 | #SOURCES = \ |
89 | #advcommeditimpl.cpp \ | 94 | #advcommeditimpl.cpp \ |
95 | #configuration.cpp \ | ||
96 | #configwnd.cpp \ | ||
97 | #configwndimpl.cpp \ | ||
90 | #configuration_31compat.cpp \ | 98 | #configuration_31compat.cpp \ |
91 | #htmlparse.cpp \ | 99 | #htmlparse.cpp \ |
92 | #printtext.cpp \ | 100 | #printtext.cpp \ |
93 | #selftest.cpp \ | 101 | #selftest.cpp \ |
94 | #pwmprint.cpp \ | 102 | #pwmprint.cpp \ |
95 | #spinforsignal.cpp | 103 | #spinforsignal.cpp |
96 | 104 | ||
97 | SOURCES = \ | 105 | SOURCES = \ |
98 | addentrywnd.cpp \ | 106 | addentrywnd.cpp \ |
99 | addentrywndimpl.cpp \ | 107 | addentrywndimpl.cpp \ |
100 | base64.cpp \ | 108 | base64.cpp \ |
101 | binentrygen.cpp \ | 109 | binentrygen.cpp \ |
102 | blowfish.cpp \ | 110 | blowfish.cpp \ |
103 | commentbox.cpp \ | 111 | commentbox.cpp \ |
104 | compressbzip2.cpp \ | 112 | compressbzip2.cpp \ |
105 | compressgzip.cpp \ | 113 | compressgzip.cpp \ |
106 | configuration.cpp \ | ||
107 | configwnd.cpp \ | ||
108 | configwndimpl.cpp \ | ||
109 | findwnd.cpp \ | 114 | findwnd.cpp \ |
110 | findwndimpl.cpp \ | 115 | findwndimpl.cpp \ |
111 | genpasswd.cpp \ | 116 | genpasswd.cpp \ |
112 | getkeycardwnd.cpp \ | 117 | getkeycardwnd.cpp \ |
113 | getmasterpwwnd.cpp \ | 118 | getmasterpwwnd.cpp \ |
114 | getmasterpwwndimpl.cpp \ | 119 | getmasterpwwndimpl.cpp \ |
115 | globalstuff.cpp \ | 120 | globalstuff.cpp \ |
116 | gpasmanfile.cpp \ | 121 | gpasmanfile.cpp \ |
117 | htmlgen.cpp \ | 122 | htmlgen.cpp \ |
118 | ipc.cpp \ | 123 | ipc.cpp \ |
119 | listobjselectwnd.cpp \ | 124 | listobjselectwnd.cpp \ |
120 | listviewpwm.cpp \ | 125 | listviewpwm.cpp \ |
121 | main.cpp \ | 126 | main.cpp \ |
122 | pwgenwnd.cpp \ | 127 | pwgenwnd.cpp \ |
123 | pwgenwndimpl.cpp \ | 128 | pwgenwndimpl.cpp \ |
124 | pwm.cpp \ | 129 | pwm.cpp \ |
125 | pwmdoc.cpp \ | 130 | pwmdoc.cpp \ |
126 | pwmdocui.cpp \ | 131 | pwmdocui.cpp \ |
127 | pwmexception.cpp \ | 132 | pwmexception.cpp \ |
128 | pwminit.cpp \ | 133 | pwminit.cpp \ |
134 | pwmprefs.cpp \ | ||
129 | pwmtray.cpp \ | 135 | pwmtray.cpp \ |
130 | pwmview.cpp \ | 136 | pwmview.cpp \ |
131 | pwmviewstyle_0.cpp \ | 137 | pwmviewstyle_0.cpp \ |
132 | pwmviewstyle_1.cpp \ | 138 | pwmviewstyle_1.cpp \ |
133 | pwmviewstyle.cpp \ | 139 | pwmviewstyle.cpp \ |
134 | randomizer.cpp \ | 140 | randomizer.cpp \ |
135 | rc2.cpp \ | 141 | rc2.cpp \ |
136 | rencatwnd.cpp \ | 142 | rencatwnd.cpp \ |
137 | serializer.cpp \ | 143 | serializer.cpp \ |
138 | setmasterpwwnd.cpp \ | 144 | setmasterpwwnd.cpp \ |
139 | setmasterpwwndimpl.cpp \ | 145 | setmasterpwwndimpl.cpp \ |
140 | sha1.cpp \ | 146 | sha1.cpp \ |
141 | subtbledit.cpp \ | 147 | subtbledit.cpp \ |
142 | subtbleditimpl.cpp \ | 148 | subtbleditimpl.cpp \ |
143 | waitwnd.cpp \ | 149 | waitwnd.cpp \ |
150 | kcmconfigs/kcmpwmconfig.cpp \ | ||
151 | kcmconfigs/pwmconfigwidget.cpp \ | ||
152 | |||
144 | 153 | ||
diff --git a/pwmanager/pwmanager/pwmdoc.cpp b/pwmanager/pwmanager/pwmdoc.cpp index 04af360..9fe4809 100644 --- a/pwmanager/pwmanager/pwmdoc.cpp +++ b/pwmanager/pwmanager/pwmdoc.cpp | |||
@@ -10,48 +10,50 @@ | |||
10 | ***************************************************************************/ | 10 | ***************************************************************************/ |
11 | 11 | ||
12 | /*************************************************************************** | 12 | /*************************************************************************** |
13 | * copyright (C) 2004 by Ulf Schenk | 13 | * copyright (C) 2004 by Ulf Schenk |
14 | * This file is originaly based on version 2.0 of pwmanager | 14 | * This file is originaly based on version 2.0 of pwmanager |
15 | * and was modified to run on embedded devices that run microkde | 15 | * and was modified to run on embedded devices that run microkde |
16 | * | 16 | * |
17 | * $Id$ | 17 | * $Id$ |
18 | **************************************************************************/ | 18 | **************************************************************************/ |
19 | 19 | ||
20 | #include "pwmdoc.h" | 20 | #include "pwmdoc.h" |
21 | #include "pwmview.h" | 21 | #include "pwmview.h" |
22 | #include "blowfish.h" | 22 | #include "blowfish.h" |
23 | #include "sha1.h" | 23 | #include "sha1.h" |
24 | #include "globalstuff.h" | 24 | #include "globalstuff.h" |
25 | #include "gpasmanfile.h" | 25 | #include "gpasmanfile.h" |
26 | #include "serializer.h" | 26 | #include "serializer.h" |
27 | #include "compressgzip.h" | 27 | #include "compressgzip.h" |
28 | #include "compressbzip2.h" | 28 | #include "compressbzip2.h" |
29 | #include "randomizer.h" | 29 | #include "randomizer.h" |
30 | #include "pwminit.h" | 30 | #include "pwminit.h" |
31 | #ifndef PWM_EMBEDDED | 31 | #ifndef PWM_EMBEDDED |
32 | //US #include "libgryptif.h" | 32 | //US #include "libgryptif.h" |
33 | #else | 33 | #else |
34 | #include "pwmprefs.h" | ||
35 | #include "kglobal.h" | ||
34 | #endif | 36 | #endif |
35 | 37 | ||
36 | #ifdef CONFIG_KWALLETIF | 38 | #ifdef CONFIG_KWALLETIF |
37 | # include "kwalletemu.h" | 39 | # include "kwalletemu.h" |
38 | #endif // CONFIG_KWALLETIF | 40 | #endif // CONFIG_KWALLETIF |
39 | 41 | ||
40 | #include <qdatetime.h> | 42 | #include <qdatetime.h> |
41 | #include <qsize.h> | 43 | #include <qsize.h> |
42 | #include <qfileinfo.h> | 44 | #include <qfileinfo.h> |
43 | #include <qfile.h> | 45 | #include <qfile.h> |
44 | 46 | ||
45 | #include <stdio.h> | 47 | #include <stdio.h> |
46 | #include <stdlib.h> | 48 | #include <stdlib.h> |
47 | #include <errno.h> | 49 | #include <errno.h> |
48 | #include <string.h> | 50 | #include <string.h> |
49 | #include <iostream> | 51 | #include <iostream> |
50 | #include <algorithm> | 52 | #include <algorithm> |
51 | #include <sys/types.h> | 53 | #include <sys/types.h> |
52 | #include <sys/stat.h> | 54 | #include <sys/stat.h> |
53 | #include <unistd.h> | 55 | #include <unistd.h> |
54 | #include <stdint.h> | 56 | #include <stdint.h> |
55 | 57 | ||
56 | //TODO: reset to its normal value. | 58 | //TODO: reset to its normal value. |
57 | #define META_CHECK_TIMER_INTERVAL10/*300*/ /* sek */ | 59 | #define META_CHECK_TIMER_INTERVAL10/*300*/ /* sek */ |
diff --git a/pwmanager/pwmanager/pwmdoc.h b/pwmanager/pwmanager/pwmdoc.h index 9650d55..193247e 100644 --- a/pwmanager/pwmanager/pwmdoc.h +++ b/pwmanager/pwmanager/pwmdoc.h | |||
@@ -27,57 +27,57 @@ | |||
27 | #define PWM_HASH_SHA384 (static_cast<char>(0x03)) | 27 | #define PWM_HASH_SHA384 (static_cast<char>(0x03)) |
28 | #define PWM_HASH_SHA512 (static_cast<char>(0x04)) | 28 | #define PWM_HASH_SHA512 (static_cast<char>(0x04)) |
29 | #define PWM_HASH_MD5 (static_cast<char>(0x05)) | 29 | #define PWM_HASH_MD5 (static_cast<char>(0x05)) |
30 | #define PWM_HASH_RMD160 (static_cast<char>(0x06)) | 30 | #define PWM_HASH_RMD160 (static_cast<char>(0x06)) |
31 | #define PWM_HASH_TIGER (static_cast<char>(0x07)) | 31 | #define PWM_HASH_TIGER (static_cast<char>(0x07)) |
32 | 32 | ||
33 | #define PWM_CRYPT_BLOWFISH(static_cast<char>(0x01)) | 33 | #define PWM_CRYPT_BLOWFISH(static_cast<char>(0x01)) |
34 | #define PWM_CRYPT_AES128(static_cast<char>(0x02)) | 34 | #define PWM_CRYPT_AES128(static_cast<char>(0x02)) |
35 | #define PWM_CRYPT_AES192(static_cast<char>(0x03)) | 35 | #define PWM_CRYPT_AES192(static_cast<char>(0x03)) |
36 | #define PWM_CRYPT_AES256(static_cast<char>(0x04)) | 36 | #define PWM_CRYPT_AES256(static_cast<char>(0x04)) |
37 | #define PWM_CRYPT_3DES (static_cast<char>(0x05)) | 37 | #define PWM_CRYPT_3DES (static_cast<char>(0x05)) |
38 | #define PWM_CRYPT_TWOFISH(static_cast<char>(0x06)) | 38 | #define PWM_CRYPT_TWOFISH(static_cast<char>(0x06)) |
39 | #define PWM_CRYPT_TWOFISH128(static_cast<char>(0x07)) | 39 | #define PWM_CRYPT_TWOFISH128(static_cast<char>(0x07)) |
40 | 40 | ||
41 | #define PWM_COMPRESS_NONE(static_cast<char>(0x00)) | 41 | #define PWM_COMPRESS_NONE(static_cast<char>(0x00)) |
42 | #define PWM_COMPRESS_GZIP(static_cast<char>(0x01)) | 42 | #define PWM_COMPRESS_GZIP(static_cast<char>(0x01)) |
43 | #define PWM_COMPRESS_BZIP2(static_cast<char>(0x02)) | 43 | #define PWM_COMPRESS_BZIP2(static_cast<char>(0x02)) |
44 | 44 | ||
45 | #define DEFAULT_MAX_ENTRIES(~(static_cast<unsigned int>(0))) | 45 | #define DEFAULT_MAX_ENTRIES(~(static_cast<unsigned int>(0))) |
46 | #define FILE_ID_HEADER "PWM_PASSWORD_FILE" | 46 | #define FILE_ID_HEADER "PWM_PASSWORD_FILE" |
47 | 47 | ||
48 | 48 | ||
49 | #include "pwmexception.h" | 49 | #include "pwmexception.h" |
50 | #include "pwmdocui.h" | 50 | #include "pwmdocui.h" |
51 | #include "configuration.h" | ||
52 | 51 | ||
53 | #include <qobject.h> | 52 | #include <qobject.h> |
54 | #include <qtimer.h> | 53 | #include <qtimer.h> |
55 | #include <qdatetime.h> | 54 | #include <qdatetime.h> |
56 | 55 | ||
57 | #include <kprocess.h> | 56 | #include <kprocess.h> |
58 | 57 | ||
59 | #ifndef PWM_EMBEDDED | 58 | #ifndef PWM_EMBEDDED |
59 | #include "configuration.h" | ||
60 | #else | 60 | #else |
61 | #include <kapplication.h> | 61 | #include <kapplication.h> |
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | #include <string> | 64 | #include <string> |
65 | #include <vector> | 65 | #include <vector> |
66 | #include <utility> | 66 | #include <utility> |
67 | 67 | ||
68 | using std::vector; | 68 | using std::vector; |
69 | using std::string; | 69 | using std::string; |
70 | using std::pair; | 70 | using std::pair; |
71 | 71 | ||
72 | /* used in findEntry() function */ | 72 | /* used in findEntry() function */ |
73 | #define SEARCH_IN_DESC (1) | 73 | #define SEARCH_IN_DESC (1) |
74 | #define SEARCH_IN_NAME (1 << 1) | 74 | #define SEARCH_IN_NAME (1 << 1) |
75 | #define SEARCH_IN_PW (1 << 2) | 75 | #define SEARCH_IN_PW (1 << 2) |
76 | #define SEARCH_IN_COMMENT(1 << 3) | 76 | #define SEARCH_IN_COMMENT(1 << 3) |
77 | #define SEARCH_IN_URL (1 << 4) | 77 | #define SEARCH_IN_URL (1 << 4) |
78 | #define SEARCH_IN_LAUNCHER(1 << 5) | 78 | #define SEARCH_IN_LAUNCHER(1 << 5) |
79 | #define SEARCH_IN_ALL (SEARCH_IN_DESC | SEARCH_IN_NAME| \ | 79 | #define SEARCH_IN_ALL (SEARCH_IN_DESC | SEARCH_IN_NAME| \ |
80 | SEARCH_IN_PW | SEARCH_IN_COMMENT| \ | 80 | SEARCH_IN_PW | SEARCH_IN_COMMENT| \ |
81 | SEARCH_IN_URL| SEARCH_IN_LAUNCHER) | 81 | SEARCH_IN_URL| SEARCH_IN_LAUNCHER) |
82 | 82 | ||
83 | /** document deeplocked. Data is out for lunch to disk */ | 83 | /** document deeplocked. Data is out for lunch to disk */ |
diff --git a/pwmanager/pwmanager/pwmdocui.cpp b/pwmanager/pwmanager/pwmdocui.cpp index b308b40..3993fa8 100644 --- a/pwmanager/pwmanager/pwmdocui.cpp +++ b/pwmanager/pwmanager/pwmdocui.cpp | |||
@@ -15,48 +15,49 @@ | |||
15 | * and was modified to run on embedded devices that run microkde | 15 | * and was modified to run on embedded devices that run microkde |
16 | * | 16 | * |
17 | * $Id$ | 17 | * $Id$ |
18 | **************************************************************************/ | 18 | **************************************************************************/ |
19 | 19 | ||
20 | #include "pwmdocui.h" | 20 | #include "pwmdocui.h" |
21 | #include "setmasterpwwndimpl.h" | 21 | #include "setmasterpwwndimpl.h" |
22 | #include "getmasterpwwndimpl.h" | 22 | #include "getmasterpwwndimpl.h" |
23 | #include "pwmexception.h" | 23 | #include "pwmexception.h" |
24 | #include "getkeycardwnd.h" | 24 | #include "getkeycardwnd.h" |
25 | #include "pwm.h" | 25 | #include "pwm.h" |
26 | #include "globalstuff.h" | 26 | #include "globalstuff.h" |
27 | #include "spinforsignal.h" | 27 | #include "spinforsignal.h" |
28 | 28 | ||
29 | #include <qlineedit.h> | 29 | #include <qlineedit.h> |
30 | #include <qtabwidget.h> | 30 | #include <qtabwidget.h> |
31 | 31 | ||
32 | #include <kmessagebox.h> | 32 | #include <kmessagebox.h> |
33 | #include <kfiledialog.h> | 33 | #include <kfiledialog.h> |
34 | 34 | ||
35 | #ifndef PWM_EMBEDDED | 35 | #ifndef PWM_EMBEDDED |
36 | #include <kwin.h> | 36 | #include <kwin.h> |
37 | #else | 37 | #else |
38 | #include <qdir.h> | 38 | #include <qdir.h> |
39 | #include "pwmprefs.h" | ||
39 | #endif | 40 | #endif |
40 | 41 | ||
41 | 42 | ||
42 | #ifdef CONFIG_KEYCARD | 43 | #ifdef CONFIG_KEYCARD |
43 | # include "pwmkeycard.h" | 44 | # include "pwmkeycard.h" |
44 | #endif | 45 | #endif |
45 | 46 | ||
46 | 47 | ||
47 | PwMDocUi::PwMDocUi(QObject *parent, const char *name) | 48 | PwMDocUi::PwMDocUi(QObject *parent, const char *name) |
48 | : QObject(parent, name) | 49 | : QObject(parent, name) |
49 | { | 50 | { |
50 | currentView = 0; | 51 | currentView = 0; |
51 | keyCard = 0; | 52 | keyCard = 0; |
52 | } | 53 | } |
53 | 54 | ||
54 | PwMDocUi::~PwMDocUi() | 55 | PwMDocUi::~PwMDocUi() |
55 | { | 56 | { |
56 | } | 57 | } |
57 | 58 | ||
58 | QString PwMDocUi::requestMpw(bool chipcard) | 59 | QString PwMDocUi::requestMpw(bool chipcard) |
59 | { | 60 | { |
60 | QString pw; | 61 | QString pw; |
61 | 62 | ||
62 | if (chipcard) { | 63 | if (chipcard) { |
diff --git a/pwmanager/pwmanager/pwminit.cpp b/pwmanager/pwmanager/pwminit.cpp index 2f1aa4e..8946443 100644 --- a/pwmanager/pwmanager/pwminit.cpp +++ b/pwmanager/pwmanager/pwminit.cpp | |||
@@ -1,49 +1,51 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * * | 2 | * * |
3 | * copyright (C) 2004 by Michael Buesch * | 3 | * copyright (C) 2004 by Michael Buesch * |
4 | * email: mbuesch@freenet.de * | 4 | * email: mbuesch@freenet.de * |
5 | * * | 5 | * * |
6 | * This program is free software; you can redistribute it and/or modify * | 6 | * This program is free software; you can redistribute it and/or modify * |
7 | * it under the terms of the GNU General Public License version 2 * | 7 | * it under the terms of the GNU General Public License version 2 * |
8 | * as published by the Free Software Foundation. * | 8 | * as published by the Free Software Foundation. * |
9 | * * | 9 | * * |
10 | ***************************************************************************/ | 10 | ***************************************************************************/ |
11 | 11 | ||
12 | /*************************************************************************** | 12 | /*************************************************************************** |
13 | * copyright (C) 2004 by Ulf Schenk | 13 | * copyright (C) 2004 by Ulf Schenk |
14 | * This file is originaly based on version 1.0.1 of pwmanager | 14 | * This file is originaly based on version 1.0.1 of pwmanager |
15 | * and was modified to run on embedded devices that run microkde | 15 | * and was modified to run on embedded devices that run microkde |
16 | * | 16 | * |
17 | * $Id$ | 17 | * $Id$ |
18 | **************************************************************************/ | 18 | **************************************************************************/ |
19 | 19 | ||
20 | #include "pwminit.h" | 20 | #include "pwminit.h" |
21 | #include "configuration.h" | ||
22 | #include "randomizer.h" | 21 | #include "randomizer.h" |
23 | 22 | ||
24 | #ifndef PWM_EMBEDDED | 23 | #ifndef PWM_EMBEDDED |
25 | #include "selftest.h" | 24 | #include "selftest.h" |
25 | #include "configuration.h" | ||
26 | #else | ||
27 | #include "pwmprefs.h" | ||
26 | #endif | 28 | #endif |
27 | 29 | ||
28 | #include "pwm.h" | 30 | #include "pwm.h" |
29 | #include "pwmexception.h" | 31 | #include "pwmexception.h" |
30 | #include "pwmtray.h" | 32 | #include "pwmtray.h" |
31 | #include "pwmdoc.h" | 33 | #include "pwmdoc.h" |
32 | 34 | ||
33 | #ifdef CONFIG_KWALLETIF | 35 | #ifdef CONFIG_KWALLETIF |
34 | # include "kwalletemu.h" | 36 | # include "kwalletemu.h" |
35 | #endif // CONFIG_KWALLETIF | 37 | #endif // CONFIG_KWALLETIF |
36 | #ifdef CONFIG_KEYCARD | 38 | #ifdef CONFIG_KEYCARD |
37 | # include "pwmkeycard.h" | 39 | # include "pwmkeycard.h" |
38 | #endif // CONFIG_KEYCARD | 40 | #endif // CONFIG_KEYCARD |
39 | 41 | ||
40 | #include <qmessagebox.h> | 42 | #include <qmessagebox.h> |
41 | 43 | ||
42 | #include <kmessagebox.h> | 44 | #include <kmessagebox.h> |
43 | #ifndef PWM_EMBEDDED | 45 | #ifndef PWM_EMBEDDED |
44 | #include <kcmdlineargs.h> | 46 | #include <kcmdlineargs.h> |
45 | #include <kwin.h> | 47 | #include <kwin.h> |
46 | #include <dcopclient.h> | 48 | #include <dcopclient.h> |
47 | #endif | 49 | #endif |
48 | 50 | ||
49 | #include <kapplication.h> | 51 | #include <kapplication.h> |
@@ -98,75 +100,90 @@ PwMInit::~PwMInit() | |||
98 | this, SLOT(mainWndClosed(PwM *))); | 100 | this, SLOT(mainWndClosed(PwM *))); |
99 | delete *i; | 101 | delete *i; |
100 | ++i; | 102 | ++i; |
101 | } | 103 | } |
102 | _mainWndList.clear(); | 104 | _mainWndList.clear(); |
103 | // close all remaining open documents | 105 | // close all remaining open documents |
104 | PwMDocList *_dl = PwMDoc::getOpenDocList(); | 106 | PwMDocList *_dl = PwMDoc::getOpenDocList(); |
105 | vector<PwMDocList::listItem> dl = *(_dl->getList()); | 107 | vector<PwMDocList::listItem> dl = *(_dl->getList()); |
106 | vector<PwMDocList::listItem>::iterator i2 = dl.begin(), | 108 | vector<PwMDocList::listItem>::iterator i2 = dl.begin(), |
107 | end2 = dl.end(); | 109 | end2 = dl.end(); |
108 | while (i2 != end2) { | 110 | while (i2 != end2) { |
109 | delete (*i2).doc; | 111 | delete (*i2).doc; |
110 | ++i2; | 112 | ++i2; |
111 | } | 113 | } |
112 | 114 | ||
113 | #ifdef CONFIG_KWALLETIF | 115 | #ifdef CONFIG_KWALLETIF |
114 | delete_ifnot_null(_kwalletEmu); | 116 | delete_ifnot_null(_kwalletEmu); |
115 | #endif // CONFIG_KWALLETIF | 117 | #endif // CONFIG_KWALLETIF |
116 | #ifdef CONFIG_KEYCARD | 118 | #ifdef CONFIG_KEYCARD |
117 | delete_ifnot_null(_keycard); | 119 | delete_ifnot_null(_keycard); |
118 | #endif // CONFIG_KEYCARD | 120 | #endif // CONFIG_KEYCARD |
119 | delete_ifnot_null(_tray); | 121 | delete_ifnot_null(_tray); |
120 | 122 | ||
121 | Randomizer::cleanup(); | 123 | Randomizer::cleanup(); |
124 | #ifndef PWM_EMBEDDED | ||
122 | Configuration::cleanup(); | 125 | Configuration::cleanup(); |
126 | #endif | ||
123 | } | 127 | } |
124 | 128 | ||
125 | void PwMInit::initializeApp() | 129 | void PwMInit::initializeApp() |
126 | { | 130 | { |
127 | PWM_ASSERT(runStatus == unknown); | 131 | PWM_ASSERT(runStatus == unknown); |
128 | runStatus = init; | 132 | runStatus = init; |
129 | initPosixSignalHandler(); | 133 | initPosixSignalHandler(); |
130 | Randomizer::init(); | 134 | Randomizer::init(); |
135 | #ifndef PWM_EMBEDDED | ||
131 | Configuration::init(); | 136 | Configuration::init(); |
137 | #endif | ||
132 | initDCOP(); | 138 | initDCOP(); |
133 | initKWalletEmu(); | 139 | initKWalletEmu(); |
134 | initKeycard(); | 140 | initKeycard(); |
135 | initTray(); | 141 | initTray(); |
136 | handleCmdLineArgs(); | 142 | handleCmdLineArgs(); |
137 | 143 | ||
138 | bool openDeeplocked = false; | 144 | bool openDeeplocked = false; |
139 | if (conf()->confGlobAutostartDeepLocked() || | 145 | if (conf()->confGlobAutostartDeepLocked() || |
140 | savedCmd.open_deeplocked) | 146 | savedCmd.open_deeplocked) |
141 | openDeeplocked = true; | 147 | openDeeplocked = true; |
142 | if (conf()->confWndAutoMinimizeOnStart() || | 148 | if (conf()->confWndAutoMinimizeOnStart() || |
143 | savedCmd.minToTray) { | 149 | savedCmd.minToTray) { |
144 | PwMDoc *newDoc = createDoc(); | 150 | PwMDoc *newDoc = createDoc(); |
145 | if (!newDoc->openDocUi(newDoc, | 151 | if (!newDoc->openDocUi(newDoc, |
146 | conf()->confGlobAutoStart(), | 152 | conf()->confGlobAutoStart(), |
147 | openDeeplocked)) { | 153 | openDeeplocked)) { |
148 | delete newDoc; | 154 | delete newDoc; |
155 | |||
156 | //US ENH for embedded devices: in the case of failure, open a document the default way | ||
157 | createMainWnd(conf()->confGlobAutoStart(), | ||
158 | openDeeplocked, | ||
159 | true, | ||
160 | 0, | ||
161 | savedCmd.minimized); | ||
162 | |||
163 | |||
164 | |||
165 | |||
149 | } | 166 | } |
150 | } else { | 167 | } else { |
151 | createMainWnd(conf()->confGlobAutoStart(), | 168 | createMainWnd(conf()->confGlobAutoStart(), |
152 | openDeeplocked, | 169 | openDeeplocked, |
153 | true, | 170 | true, |
154 | 0, | 171 | 0, |
155 | savedCmd.minimized); | 172 | savedCmd.minimized); |
156 | } | 173 | } |
157 | 174 | ||
158 | runStatus = running; | 175 | runStatus = running; |
159 | } | 176 | } |
160 | 177 | ||
161 | void PwMInit::shutdownApp(int exitStatus) | 178 | void PwMInit::shutdownApp(int exitStatus) |
162 | { | 179 | { |
163 | printDebug(string("PwMInit::shutdownApp(") | 180 | printDebug(string("PwMInit::shutdownApp(") |
164 | + tostr(exitStatus) + ") called."); | 181 | + tostr(exitStatus) + ") called."); |
165 | PWM_ASSERT((runStatus == running) || (runStatus == init)); | 182 | PWM_ASSERT((runStatus == running) || (runStatus == init)); |
166 | runStatus = shutdown; | 183 | runStatus = shutdown; |
167 | QApplication::exit(exitStatus); | 184 | QApplication::exit(exitStatus); |
168 | /* The destructor of PwMInit is called when control | 185 | /* The destructor of PwMInit is called when control |
169 | * leaves main() | 186 | * leaves main() |
170 | */ | 187 | */ |
171 | } | 188 | } |
172 | 189 | ||
diff --git a/pwmanager/pwmanager/pwmtray.cpp b/pwmanager/pwmanager/pwmtray.cpp index 0f286c1..fe074ca 100644 --- a/pwmanager/pwmanager/pwmtray.cpp +++ b/pwmanager/pwmanager/pwmtray.cpp | |||
@@ -4,49 +4,53 @@ | |||
4 | * email: mbuesch@freenet.de * | 4 | * email: mbuesch@freenet.de * |
5 | * * | 5 | * * |
6 | * Original implementation of the tray-tree * | 6 | * Original implementation of the tray-tree * |
7 | * (c) by Matt Scifo <mscifo@o1.com> * | 7 | * (c) by Matt Scifo <mscifo@o1.com> * |
8 | * * | 8 | * * |
9 | * This program is free software; you can redistribute it and/or modify * | 9 | * This program is free software; you can redistribute it and/or modify * |
10 | * it under the terms of the GNU General Public License version 2 * | 10 | * it under the terms of the GNU General Public License version 2 * |
11 | * as published by the Free Software Foundation. * | 11 | * as published by the Free Software Foundation. * |
12 | * * | 12 | * * |
13 | ***************************************************************************/ | 13 | ***************************************************************************/ |
14 | 14 | ||
15 | /*************************************************************************** | 15 | /*************************************************************************** |
16 | * copyright (C) 2004 by Ulf Schenk | 16 | * copyright (C) 2004 by Ulf Schenk |
17 | * This file is originaly based on version 1.0.1 of pwmanager | 17 | * This file is originaly based on version 1.0.1 of pwmanager |
18 | * and was modified to run on embedded devices that run microkde | 18 | * and was modified to run on embedded devices that run microkde |
19 | * | 19 | * |
20 | * $Id$ | 20 | * $Id$ |
21 | **************************************************************************/ | 21 | **************************************************************************/ |
22 | 22 | ||
23 | #include "pwmtray.h" | 23 | #include "pwmtray.h" |
24 | #include "pwmexception.h" | 24 | #include "pwmexception.h" |
25 | #include "pwm.h" | 25 | #include "pwm.h" |
26 | #include "pwmdoc.h" | 26 | #include "pwmdoc.h" |
27 | #include "pwminit.h" | 27 | #include "pwminit.h" |
28 | #ifndef PWM_EMBEDDED | ||
28 | #include "configuration.h" | 29 | #include "configuration.h" |
30 | #else | ||
31 | #include "pwmprefs.h" | ||
32 | #endif | ||
29 | 33 | ||
30 | #include <klocale.h> | 34 | #include <klocale.h> |
31 | 35 | ||
32 | 36 | ||
33 | void ActiveTreeItem::execIt() | 37 | void ActiveTreeItem::execIt() |
34 | { | 38 | { |
35 | #ifndef PWM_EMBEDDED | 39 | #ifndef PWM_EMBEDDED |
36 | unsigned int entr = static_cast<unsigned int>(entry); | 40 | unsigned int entr = static_cast<unsigned int>(entry); |
37 | unsigned int cat = static_cast<unsigned int>(category); | 41 | unsigned int cat = static_cast<unsigned int>(category); |
38 | #else | 42 | #else |
39 | unsigned int entr = (unsigned int)(entry); | 43 | unsigned int entr = (unsigned int)(entry); |
40 | unsigned int cat = (unsigned int)(category); | 44 | unsigned int cat = (unsigned int)(category); |
41 | #endif | 45 | #endif |
42 | switch (task) { | 46 | switch (task) { |
43 | case pwToClipboard: { | 47 | case pwToClipboard: { |
44 | PwMDataItem d; | 48 | PwMDataItem d; |
45 | doc->getDataChangedLock(); | 49 | doc->getDataChangedLock(); |
46 | bool wasLocked = doc->isLocked(cat, entr); | 50 | bool wasLocked = doc->isLocked(cat, entr); |
47 | doc->getEntry(cat, entr, &d, true); | 51 | doc->getEntry(cat, entr, &d, true); |
48 | if (wasLocked) | 52 | if (wasLocked) |
49 | doc->lockAt(cat, entr, true); | 53 | doc->lockAt(cat, entr, true); |
50 | doc->putDataChangedLock(); | 54 | doc->putDataChangedLock(); |
51 | PwM::copyToClipboard(d.pw.c_str()); | 55 | PwM::copyToClipboard(d.pw.c_str()); |
52 | break; | 56 | break; |
diff --git a/pwmanager/pwmanager/pwmview.cpp b/pwmanager/pwmanager/pwmview.cpp index c09fbf5..58c2fca 100644 --- a/pwmanager/pwmanager/pwmview.cpp +++ b/pwmanager/pwmanager/pwmview.cpp | |||
@@ -1,49 +1,53 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * * | 2 | * * |
3 | * copyright (C) 2003, 2004 by Michael Buesch * | 3 | * copyright (C) 2003, 2004 by Michael Buesch * |
4 | * email: mbuesch@freenet.de * | 4 | * email: mbuesch@freenet.de * |
5 | * * | 5 | * * |
6 | * This program is free software; you can redistribute it and/or modify * | 6 | * This program is free software; you can redistribute it and/or modify * |
7 | * it under the terms of the GNU General Public License version 2 * | 7 | * it under the terms of the GNU General Public License version 2 * |
8 | * as published by the Free Software Foundation. * | 8 | * as published by the Free Software Foundation. * |
9 | * * | 9 | * * |
10 | ***************************************************************************/ | 10 | ***************************************************************************/ |
11 | 11 | ||
12 | /*************************************************************************** | 12 | /*************************************************************************** |
13 | * copyright (C) 2004 by Ulf Schenk | 13 | * copyright (C) 2004 by Ulf Schenk |
14 | * This file is originaly based on version 1.0.1 of pwmanager | 14 | * This file is originaly based on version 1.0.1 of pwmanager |
15 | * and was modified to run on embedded devices that run microkde | 15 | * and was modified to run on embedded devices that run microkde |
16 | * | 16 | * |
17 | * $Id$ | 17 | * $Id$ |
18 | **************************************************************************/ | 18 | **************************************************************************/ |
19 | 19 | ||
20 | #include "pwmview.h" | 20 | #include "pwmview.h" |
21 | #include "pwmexception.h" | 21 | #include "pwmexception.h" |
22 | #include "globalstuff.h" | 22 | #include "globalstuff.h" |
23 | #include "pwm.h" | 23 | #include "pwm.h" |
24 | #include "rencatwnd.h" | 24 | #include "rencatwnd.h" |
25 | #ifndef PWM_EMBEDDED | ||
25 | #include "configuration.h" | 26 | #include "configuration.h" |
27 | #else | ||
28 | #include "pwmprefs.h" | ||
29 | #endif | ||
26 | #include "commentbox.h" | 30 | #include "commentbox.h" |
27 | 31 | ||
28 | #include <kmessagebox.h> | 32 | #include <kmessagebox.h> |
29 | #include <klocale.h> | 33 | #include <klocale.h> |
30 | 34 | ||
31 | #include <qlineedit.h> | 35 | #include <qlineedit.h> |
32 | #include <qpoint.h> | 36 | #include <qpoint.h> |
33 | #include <qapplication.h> | 37 | #include <qapplication.h> |
34 | 38 | ||
35 | #define COLUMN_DESC 0 | 39 | #define COLUMN_DESC 0 |
36 | #define COLUMN_NAME 1 | 40 | #define COLUMN_NAME 1 |
37 | #define COLUMN_PW 2 | 41 | #define COLUMN_PW 2 |
38 | #define COLUMN_URL 3 | 42 | #define COLUMN_URL 3 |
39 | #define COLUMN_LAUNCHER 4 | 43 | #define COLUMN_LAUNCHER 4 |
40 | 44 | ||
41 | 45 | ||
42 | PwMView::PwMView(PwM *_mainClass, | 46 | PwMView::PwMView(PwM *_mainClass, |
43 | QWidget *parent, PwMDoc *_doc, | 47 | QWidget *parent, PwMDoc *_doc, |
44 | const char *name) | 48 | const char *name) |
45 | : PwMViewStyle(parent, name) | 49 | : PwMViewStyle(parent, name) |
46 | { | 50 | { |
47 | PWM_ASSERT(_mainClass); | 51 | PWM_ASSERT(_mainClass); |
48 | PWM_ASSERT(parent); | 52 | PWM_ASSERT(parent); |
49 | PWM_ASSERT(_doc); | 53 | PWM_ASSERT(_doc); |
diff --git a/pwmanager/pwmanager/serializer.cpp b/pwmanager/pwmanager/serializer.cpp index 65e442d..f29ef6c 100644 --- a/pwmanager/pwmanager/serializer.cpp +++ b/pwmanager/pwmanager/serializer.cpp | |||
@@ -1,48 +1,49 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * * | 2 | * * |
3 | * copyright (C) 2004 by Michael Buesch * | 3 | * copyright (C) 2004 by Michael Buesch * |
4 | * email: mbuesch@freenet.de * | 4 | * email: mbuesch@freenet.de * |
5 | * * | 5 | * * |
6 | * This program is free software; you can redistribute it and/or modify * | 6 | * This program is free software; you can redistribute it and/or modify * |
7 | * it under the terms of the GNU General Public License version 2 * | 7 | * it under the terms of the GNU General Public License version 2 * |
8 | * as published by the Free Software Foundation. * | 8 | * as published by the Free Software Foundation. * |
9 | * * | 9 | * * |
10 | ***************************************************************************/ | 10 | ***************************************************************************/ |
11 | 11 | ||
12 | 12 | ||
13 | /*************************************************************************** | 13 | /*************************************************************************** |
14 | * copyright (C) 2004 by Ulf Schenk | 14 | * copyright (C) 2004 by Ulf Schenk |
15 | * This file is originaly based on version 2.0 of pwmanager | 15 | * This file is originaly based on version 2.0 of pwmanager |
16 | * and was modified to run on embedded devices that run microkde | 16 | * and was modified to run on embedded devices that run microkde |
17 | * | 17 | * |
18 | * $Id$ | 18 | * $Id$ |
19 | **************************************************************************/ | 19 | **************************************************************************/ |
20 | 20 | ||
21 | #include "serializer.h" | 21 | #include "serializer.h" |
22 | #include "pwmexception.h" | 22 | #include "pwmexception.h" |
23 | 23 | ||
24 | #ifdef PWM_EMBEDDED | 24 | #ifdef PWM_EMBEDDED |
25 | #include <kglobal.h> | ||
25 | #include <klocale.h> | 26 | #include <klocale.h> |
26 | #endif | 27 | #endif |
27 | 28 | ||
28 | /* enable/disable serializer debugging (0/1) */ | 29 | /* enable/disable serializer debugging (0/1) */ |
29 | #define SERIALIZER_DEBUG0 | 30 | #define SERIALIZER_DEBUG0 |
30 | /* use the old xml tags for writing (0/1) */ | 31 | /* use the old xml tags for writing (0/1) */ |
31 | #define USE_OLD_TAGS 0 | 32 | #define USE_OLD_TAGS 0 |
32 | /* write a CDATA section (0/1) */ | 33 | /* write a CDATA section (0/1) */ |
33 | #define WRITE_CDATA_SEC 0 | 34 | #define WRITE_CDATA_SEC 0 |
34 | 35 | ||
35 | 36 | ||
36 | #define META_CREATE_DATE"c" | 37 | #define META_CREATE_DATE"c" |
37 | #define META_VALID_DATE "v" | 38 | #define META_VALID_DATE "v" |
38 | #define META_EXPIRE_DATE"e" | 39 | #define META_EXPIRE_DATE"e" |
39 | #define META_UPDATE_DATE"u" | 40 | #define META_UPDATE_DATE"u" |
40 | #define META_UPDATE_INT "i" | 41 | #define META_UPDATE_INT "i" |
41 | //US ENH : uniqueid | 42 | //US ENH : uniqueid |
42 | #define META_UNIQUEID "n" | 43 | #define META_UNIQUEID "n" |
43 | 44 | ||
44 | /* This is compatibility stuff. | 45 | /* This is compatibility stuff. |
45 | * The names of the entries have changed and here are the | 46 | * The names of the entries have changed and here are the |
46 | * new and old ones | 47 | * new and old ones |
47 | */ | 48 | */ |
48 | #define ROOT_MAGIC_OLD "PwM-xml-dat" | 49 | #define ROOT_MAGIC_OLD "PwM-xml-dat" |