-rw-r--r-- | Makefile | 613 | ||||
-rw-r--r-- | microkde/kdeui/kmainwindow.cpp | 1 | ||||
-rw-r--r-- | microkde/kdeui/kmainwindow.h | 5 | ||||
-rw-r--r-- | pwmanager/pwmanager/getmasterpwwnd_emb.cpp | 2 | ||||
-rw-r--r-- | pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp | 4 | ||||
-rw-r--r-- | pwmanager/pwmanager/libgcryptif.cpp | 5 | ||||
-rw-r--r-- | pwmanager/pwmanager/main.cpp | 1 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwm.cpp | 10 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmdoc.cpp | 1 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmdocui.cpp | 15 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwminit.cpp | 17 |
11 files changed, 296 insertions, 378 deletions
@@ -1,362 +1,253 @@ | |||
1 | export KDEPIMDIR = $(shell pwd) | 1 | ############################################################################# |
2 | 2 | # Makefile for building: kdepim-desktop | |
3 | export KDEPIM_VERSION=$(shell sed -e 's/.*\"\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/' < version) | 3 | # Generated by qmake (1.07a) (Qt 3.3.1) on: Mon Oct 25 11:25:22 2004 |
4 | 4 | # Project: kdepim-desktop.pro | |
5 | ifeq ($(PLATFORM) , zaurus) | 5 | # Template: subdirs |
6 | BUILD_NO_LDAP_PLUGIN=1 | 6 | # Command: $(QMAKE) -o Makefile kdepim-desktop.pro |
7 | endif | 7 | ############################################################################# |
8 | 8 | ||
9 | ifneq ($(PLATFORM) , zaurus) | 9 | MAKEFILE =Makefile |
10 | BUILD_NO_SHARP_PLUGIN=1 | 10 | QMAKE =qmake |
11 | endif | 11 | DEL_FILE = rm -f |
12 | 12 | CHK_DIR_EXISTS= test -d | |
13 | SUBDIRS_MICROKDE = \ | 13 | MKDIR = mkdir -p |
14 | libical/src/libical \ | 14 | SUBTARGETS = \ |
15 | libical/src/libicalss \ | 15 | sub-gammu-emb-common \ |
16 | qtcompat \ | 16 | sub-gammu-emb-gammu \ |
17 | microkde \ | 17 | sub-libical \ |
18 | libkcal \ | 18 | sub-libkcal \ |
19 | libkdepim \ | 19 | sub-microkde \ |
20 | kabc \ | 20 | sub-libkdepim \ |
21 | kabc/formats/binary \ | 21 | sub-kabc \ |
22 | kabc/plugins/file \ | 22 | sub-korganizer \ |
23 | kabc/plugins/dir \ | 23 | sub-kaddressbook \ |
24 | korganizer \ | 24 | sub-kabc-plugins-file \ |
25 | kalarmd \ | 25 | sub-kabc-plugins-dir \ |
26 | kaddressbook | 26 | sub-kabc-plugins-file \ |
27 | 27 | sub-kabc-plugins-qtopia \ | |
28 | SUBDIRS_QTOPIA_PLUGIN = \ | 28 | sub-pwmanager-libcrypt-cipher \ |
29 | kabc/plugins/qtopia | 29 | sub-pwmanager-libcrypt-error \ |
30 | 30 | sub-pwmanager-libcrypt-mpi \ | |
31 | SUBDIRS_OPIE_PLUGIN = \ | 31 | sub-pwmanager-libcrypt-zlib \ |
32 | kabc/plugins/opie | 32 | sub-pwmanager-pwmanager |
33 | 33 | ||
34 | SUBDIRS_SHARP_PLUGIN = \ | 34 | first: all |
35 | kabc/plugins/sharpdtm | 35 | |
36 | 36 | all: Makefile $(SUBTARGETS) | |
37 | SUBDIRS_LDAP_PLUGIN = \ | 37 | |
38 | kabc/plugins/ldap | 38 | gammu/emb/common/$(MAKEFILE): |
39 | 39 | @$(CHK_DIR_EXISTS) "gammu/emb/common" || $(MKDIR) "gammu/emb/common" | |
40 | SUBDIRS_MICROMAIL = \ | 40 | cd gammu/emb/common && $(QMAKE) common.pro -o $(MAKEFILE) |
41 | kmicromail/libetpan \ | 41 | sub-gammu-emb-common: gammu/emb/common/$(MAKEFILE) FORCE |
42 | kmicromail/libmailwrapper \ | 42 | cd gammu/emb/common && $(MAKE) -f $(MAKEFILE) |
43 | kmicromail | 43 | |
44 | 44 | gammu/emb/gammu/$(MAKEFILE): | |
45 | SUBDIRS_GAMMU = \ | 45 | @$(CHK_DIR_EXISTS) "gammu/emb/gammu" || $(MKDIR) "gammu/emb/gammu" |
46 | gammu/emb/common \ | 46 | cd gammu/emb/gammu && $(QMAKE) gammu.pro -o $(MAKEFILE) |
47 | gammu/emb/gammu | 47 | sub-gammu-emb-gammu: gammu/emb/gammu/$(MAKEFILE) FORCE |
48 | 48 | cd gammu/emb/gammu && $(MAKE) -f $(MAKEFILE) | |
49 | SUBDIRS_PWMANAGER = \ | 49 | |
50 | pwmanager/libcrypt/mpi \ | 50 | libical/$(MAKEFILE): |
51 | pwmanager/libcrypt/error \ | 51 | @$(CHK_DIR_EXISTS) "libical" || $(MKDIR) "libical" |
52 | pwmanager/libcrypt/cipher \ | 52 | cd libical && $(QMAKE) libical.pro -o $(MAKEFILE) |
53 | pwmanager/libcrypt/zlib \ | 53 | sub-libical: libical/$(MAKEFILE) FORCE |
54 | pwmanager/pwmanager | 54 | cd libical && $(MAKE) -f $(MAKEFILE) |
55 | 55 | ||
56 | SUBDIRS = \ | 56 | libkcal/$(MAKEFILE): |
57 | $(SUBDIRS_MICROKDE) \ | 57 | @$(CHK_DIR_EXISTS) "libkcal" || $(MKDIR) "libkcal" |
58 | $(SUBDIRS_QTOPIA_PLUGIN) \ | 58 | cd libkcal && $(QMAKE) libkcal.pro -o $(MAKEFILE) |
59 | $(SUBDIRS_OPIE_PLUGIN) \ | 59 | sub-libkcal: libkcal/$(MAKEFILE) FORCE |
60 | $(SUBDIRS_SHARP_PLUGIN) \ | 60 | cd libkcal && $(MAKE) -f $(MAKEFILE) |
61 | $(SUBDIRS_LDAP_PLUGIN) \ | 61 | |
62 | $(SUBDIRS_MICROMAIL) \ | 62 | microkde/$(MAKEFILE): |
63 | $(SUBDIRS_GAMMU) \ | 63 | @$(CHK_DIR_EXISTS) "microkde" || $(MKDIR) "microkde" |
64 | $(SUBDIRS_PWMANAGER) | 64 | cd microkde && $(QMAKE) microkde.pro -o $(MAKEFILE) |
65 | 65 | sub-microkde: microkde/$(MAKEFILE) FORCE | |
66 | 66 | cd microkde && $(MAKE) -f $(MAKEFILE) | |
67 | all: build_microkde \ | 67 | |
68 | build_qtopia_plugin \ | 68 | libkdepim/$(MAKEFILE): |
69 | build_opie_plugin \ | 69 | @$(CHK_DIR_EXISTS) "libkdepim" || $(MKDIR) "libkdepim" |
70 | build_sharp_plugin \ | 70 | cd libkdepim && $(QMAKE) libkdepim.pro -o $(MAKEFILE) |
71 | build_ldap_plugin \ | 71 | sub-libkdepim: libkdepim/$(MAKEFILE) FORCE |
72 | build_micromail \ | 72 | cd libkdepim && $(MAKE) -f $(MAKEFILE) |
73 | build_gammu \ | 73 | |
74 | build_pwmanager | 74 | kabc/$(MAKEFILE): |
75 | 75 | @$(CHK_DIR_EXISTS) "kabc" || $(MKDIR) "kabc" | |
76 | 76 | cd kabc && $(QMAKE) kabc.pro -o $(MAKEFILE) | |
77 | build_microkde: variable_test tmake | 77 | sub-kabc: kabc/$(MAKEFILE) FORCE |
78 | for i in $(SUBDIRS_MICROKDE); do pushd $$i; \ | 78 | cd kabc && $(MAKE) -f $(MAKEFILE) |
79 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 79 | |
80 | done | 80 | korganizer/$(MAKEFILE): |
81 | 81 | @$(CHK_DIR_EXISTS) "korganizer" || $(MKDIR) "korganizer" | |
82 | build_qtopia_plugin: build_microkde | 82 | cd korganizer && $(QMAKE) korganizer.pro -o $(MAKEFILE) |
83 | ifdef BUILD_NO_QTOPIA_PLUGIN | 83 | sub-korganizer: korganizer/$(MAKEFILE) FORCE |
84 | @echo == qtopia plugin not build. | 84 | cd korganizer && $(MAKE) -f $(MAKEFILE) |
85 | else | 85 | |
86 | for i in $(SUBDIRS_QTOPIA_PLUGIN); do pushd $$i; \ | 86 | kaddressbook/$(MAKEFILE): |
87 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 87 | @$(CHK_DIR_EXISTS) "kaddressbook" || $(MKDIR) "kaddressbook" |
88 | done | 88 | cd kaddressbook && $(QMAKE) kaddressbook.pro -o $(MAKEFILE) |
89 | endif | 89 | sub-kaddressbook: kaddressbook/$(MAKEFILE) FORCE |
90 | 90 | cd kaddressbook && $(MAKE) -f $(MAKEFILE) | |
91 | build_opie_plugin: build_microkde | 91 | |
92 | ifdef BUILD_NO_OPIE_PLUGIN | 92 | kabc/plugins/file/$(MAKEFILE): |
93 | @echo == opie plugin not build. | 93 | @$(CHK_DIR_EXISTS) "kabc/plugins/file" || $(MKDIR) "kabc/plugins/file" |
94 | else | 94 | cd kabc/plugins/file && $(QMAKE) file.pro -o $(MAKEFILE) |
95 | for i in $(SUBDIRS_OPIE_PLUGIN); do pushd $$i; \ | 95 | sub-kabc-plugins-file: kabc/plugins/file/$(MAKEFILE) FORCE |
96 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 96 | cd kabc/plugins/file && $(MAKE) -f $(MAKEFILE) |
97 | done | 97 | |
98 | endif | 98 | kabc/plugins/dir/$(MAKEFILE): |
99 | 99 | @$(CHK_DIR_EXISTS) "kabc/plugins/dir" || $(MKDIR) "kabc/plugins/dir" | |
100 | build_sharp_plugin: build_microkde | 100 | cd kabc/plugins/dir && $(QMAKE) dir.pro -o $(MAKEFILE) |
101 | ifdef BUILD_NO_SHARP_PLUGIN | 101 | sub-kabc-plugins-dir: kabc/plugins/dir/$(MAKEFILE) FORCE |
102 | @echo == ldap plugin not build. | 102 | cd kabc/plugins/dir && $(MAKE) -f $(MAKEFILE) |
103 | else | 103 | |
104 | for i in $(SUBDIRS_SHARP_PLUGIN); do pushd $$i; \ | 104 | kabc/plugins/file/$(MAKEFILE): |
105 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 105 | @$(CHK_DIR_EXISTS) "kabc/plugins/file" || $(MKDIR) "kabc/plugins/file" |
106 | done | 106 | cd kabc/plugins/file && $(QMAKE) file.pro -o $(MAKEFILE) |
107 | endif | 107 | sub-kabc-plugins-file: kabc/plugins/file/$(MAKEFILE) FORCE |
108 | 108 | cd kabc/plugins/file && $(MAKE) -f $(MAKEFILE) | |
109 | build_ldap_plugin: build_microkde | 109 | |
110 | ifdef BUILD_NO_LDAP_PLUGIN | 110 | kabc/plugins/qtopia/$(MAKEFILE): |
111 | @echo == ldap plugin not build. | 111 | @$(CHK_DIR_EXISTS) "kabc/plugins/qtopia" || $(MKDIR) "kabc/plugins/qtopia" |
112 | else | 112 | cd kabc/plugins/qtopia && $(QMAKE) qtopia.pro -o $(MAKEFILE) |
113 | for i in $(SUBDIRS_LDAP_PLUGIN); do pushd $$i; \ | 113 | sub-kabc-plugins-qtopia: kabc/plugins/qtopia/$(MAKEFILE) FORCE |
114 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 114 | cd kabc/plugins/qtopia && $(MAKE) -f $(MAKEFILE) |
115 | done | 115 | |
116 | endif | 116 | pwmanager/libcrypt/cipher/$(MAKEFILE): |
117 | 117 | @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/cipher" || $(MKDIR) "pwmanager/libcrypt/cipher" | |
118 | 118 | cd pwmanager/libcrypt/cipher && $(QMAKE) cipher.pro -o $(MAKEFILE) | |
119 | build_micromail: build_microkde | 119 | sub-pwmanager-libcrypt-cipher: pwmanager/libcrypt/cipher/$(MAKEFILE) FORCE |
120 | ifdef BUILD_NO_MICROMAIL | 120 | cd pwmanager/libcrypt/cipher && $(MAKE) -f $(MAKEFILE) |
121 | @echo == kmicromail not build. | 121 | |
122 | else | 122 | pwmanager/libcrypt/error/$(MAKEFILE): |
123 | for i in $(SUBDIRS_MICROMAIL); do pushd $$i; \ | 123 | @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/error" || $(MKDIR) "pwmanager/libcrypt/error" |
124 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 124 | cd pwmanager/libcrypt/error && $(QMAKE) error.pro -o $(MAKEFILE) |
125 | done | 125 | sub-pwmanager-libcrypt-error: pwmanager/libcrypt/error/$(MAKEFILE) FORCE |
126 | endif | 126 | cd pwmanager/libcrypt/error && $(MAKE) -f $(MAKEFILE) |
127 | 127 | ||
128 | build_gammu: variable_test tmake | 128 | pwmanager/libcrypt/mpi/$(MAKEFILE): |
129 | ifdef BUILD_NO_GAMMU | 129 | @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/mpi" || $(MKDIR) "pwmanager/libcrypt/mpi" |
130 | @echo == gammu not build. | 130 | cd pwmanager/libcrypt/mpi && $(QMAKE) mpi.pro -o $(MAKEFILE) |
131 | else | 131 | sub-pwmanager-libcrypt-mpi: pwmanager/libcrypt/mpi/$(MAKEFILE) FORCE |
132 | for i in $(SUBDIRS_GAMMU); do pushd $$i; \ | 132 | cd pwmanager/libcrypt/mpi && $(MAKE) -f $(MAKEFILE) |
133 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 133 | |
134 | done | 134 | pwmanager/libcrypt/zlib/$(MAKEFILE): |
135 | endif | 135 | @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/zlib" || $(MKDIR) "pwmanager/libcrypt/zlib" |
136 | 136 | cd pwmanager/libcrypt/zlib && $(QMAKE) zlib.pro -o $(MAKEFILE) | |
137 | build_pwmanager: build_microkde | 137 | sub-pwmanager-libcrypt-zlib: pwmanager/libcrypt/zlib/$(MAKEFILE) FORCE |
138 | ifdef BUILD_NO_PWMANAGER | 138 | cd pwmanager/libcrypt/zlib && $(MAKE) -f $(MAKEFILE) |
139 | @echo == pwmanager not build. | 139 | |
140 | else | 140 | pwmanager/pwmanager/$(MAKEFILE): |
141 | for i in $(SUBDIRS_PWMANAGER); do pushd $$i; \ | 141 | @$(CHK_DIR_EXISTS) "pwmanager/pwmanager" || $(MKDIR) "pwmanager/pwmanager" |
142 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 142 | cd pwmanager/pwmanager && $(QMAKE) pwmanager.pro -o $(MAKEFILE) |
143 | done | 143 | sub-pwmanager-pwmanager: pwmanager/pwmanager/$(MAKEFILE) FORCE |
144 | endif | 144 | cd pwmanager/pwmanager && $(MAKE) -f $(MAKEFILE) |
145 | 145 | ||
146 | 146 | Makefile: kdepim-desktop.pro /usr/lib/qt3/mkspecs/default/qmake.conf | |
147 | variable_info: | 147 | $(QMAKE) -o Makefile kdepim-desktop.pro |
148 | @echo -------------------------------------- | 148 | qmake: qmake_all |
149 | @echo KDEPIM buildsystem, variableinfo... | 149 | @$(QMAKE) -o Makefile kdepim-desktop.pro |
150 | @echo KDEPIMDIR=$(KDEPIMDIR) | 150 | |
151 | @echo QTDIR=$(QTDIR) | 151 | all: $(SUBTARGETS) |
152 | @echo QPEDIR=$(QPEDIR) | 152 | qmake_all: gammu/emb/common/$(MAKEFILE) gammu/emb/gammu/$(MAKEFILE) libical/$(MAKEFILE) libkcal/$(MAKEFILE) microkde/$(MAKEFILE) libkdepim/$(MAKEFILE) kabc/$(MAKEFILE) korganizer/$(MAKEFILE) kaddressbook/$(MAKEFILE) kabc/plugins/file/$(MAKEFILE) kabc/plugins/dir/$(MAKEFILE) kabc/plugins/file/$(MAKEFILE) kabc/plugins/qtopia/$(MAKEFILE) pwmanager/libcrypt/cipher/$(MAKEFILE) pwmanager/libcrypt/error/$(MAKEFILE) pwmanager/libcrypt/mpi/$(MAKEFILE) pwmanager/libcrypt/zlib/$(MAKEFILE) pwmanager/pwmanager/$(MAKEFILE) |
153 | @echo OPIEDIR=$(OPIEDIR) | 153 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
154 | @echo PLATFORM=$(PLATFORM) | 154 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
155 | @echo RELEASE_DEBUG=$(RELEASE_DEBUG) | 155 | ( [ -d libical ] && cd libical ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
156 | @echo BUILD_NO_MICROMAIL=$(BUILD_NO_MICROMAIL) | 156 | ( [ -d libkcal ] && cd libkcal ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
157 | @echo BUILD_NO_LDAP_PLUGIN=$(BUILD_NO_LDAP_PLUGIN) | 157 | ( [ -d microkde ] && cd microkde ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
158 | @echo BUILD_NO_OPIE_PLUGIN=$(BUILD_NO_OPIE_PLUGIN) | 158 | ( [ -d libkdepim ] && cd libkdepim ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
159 | @echo BUILD_NO_QTOPIA_PLUGIN=$(BUILD_NO_QTOPIA_PLUGIN) | 159 | ( [ -d kabc ] && cd kabc ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
160 | @echo BUILD_NO_SHARP_PLUGIN=$(BUILD_NO_SHARP_PLUGIN) | 160 | ( [ -d korganizer ] && cd korganizer ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
161 | ifndef BUILD_NO_SHARP_PLUGIN | 161 | ( [ -d kaddressbook ] && cd kaddressbook ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
162 | @echo SHARPDTMSDK=$(SHARPDTMSDK) | 162 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
163 | endif | 163 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
164 | @echo BUILD_NO_GAMMU=$(BUILD_NO_GAMMU) | 164 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
165 | @echo BUILD_NO_PWMANAGER=$(BUILD_NO_PWMANAGER) | 165 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
166 | @echo -------------------------------------- | 166 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
167 | 167 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | |
168 | variable_test: variable_info | 168 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
169 | @echo KDEPIM buildsystem, variablecheck... | 169 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
170 | ifndef KDEPIMDIR | 170 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
171 | @echo KDEPIMDIR is not defined. | 171 | clean uicables mocables uiclean mocclean lexclean yaccclean : qmake_all FORCE |
172 | $(error KDEPIMDIR is not defined) | 172 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
173 | endif | 173 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
174 | ifndef PLATFORM | 174 | ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
175 | @echo PLATFORM is not defined. | 175 | ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
176 | $(error PLATFORM is not defined) | 176 | ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
177 | endif | 177 | ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
178 | ifdef BUILD_NO_LDAP_PLUGIN | 178 | ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
179 | @echo LDAP PLUGIN will not be build, because BUILD_NO_LDAP_PLUGIN is set to $(BUILD_NO_LDAP_PLUGIN) | 179 | ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
180 | endif | 180 | ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
181 | ifdef BUILD_NO_OPIE_PLUGIN | 181 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
182 | @echo OPIE PLUGIN will not be build, because BUILD_NO_OPIE_PLUGIN is set to $(BUILD_NO_OPIE_PLUGIN) | 182 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
183 | endif | 183 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
184 | ifdef BUILD_NO_QTOPIA_PLUGIN | 184 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
185 | @echo QTOPIA PLUGIN will not be build, because BUILD_NO__QTOPIA_PLUGIN is set to $(BUILD_NO__QTOPIA_PLUGIN) | 185 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
186 | endif | 186 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
187 | ifdef BUILD_NO_MICROMAIL | 187 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
188 | @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL) | 188 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
189 | endif | 189 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
190 | ifdef BUILD_NO_SHARP_PLUGIN | 190 | uninstall_subdirs: qmake_all FORCE |
191 | @echo SHARP PLUGIN will not be build, because BUILD_NO_SHARP_PLUGIN is set to $(BUILD_NO_SHARP_PLUGIN) | 191 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
192 | else | 192 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
193 | ifndef SHARPDTMSDK | 193 | ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
194 | @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK) | 194 | ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
195 | $(error SHARPDTMSDK is not defined) | 195 | ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
196 | endif | 196 | ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
197 | endif | 197 | ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
198 | ifdef BUILD_NO_GAMMU | 198 | ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
199 | @echo GAMMU will not be build, because BUILD_NO_GAMMU is set to $(BUILD_NO_GAMMU) | 199 | ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
200 | endif | 200 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
201 | ifdef BUILD_NO_PWMANAGER | 201 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
202 | @echo PWMANAGER will not be build, because BUILD_NO_PWMANAGER is set to $(BUILD_NO_PWMANAGER) | 202 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
203 | endif | 203 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
204 | @echo -------------------------------------- | 204 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
205 | 205 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | |
206 | 206 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | |
207 | objects: | 207 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
208 | for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done | 208 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
209 | for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done | 209 | install_subdirs: qmake_all FORCE |
210 | mkdir -p libical/lib/$(PLATFORM) | 210 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) install; ) || true |
211 | mkdir -p pwmanager/libcrypt/$(PLATFORM) | 211 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) install; ) || true |
212 | 212 | ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) install; ) || true | |
213 | clean: | 213 | ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) install; ) || true |
214 | rm -rf libical/lib/$(PLATFORM)/*; | 214 | ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) install; ) || true |
215 | rm -rf pwmanager/libcrypt/$(PLATFORM)/*; | 215 | ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) install; ) || true |
216 | for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\ | 216 | ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) install; ) || true |
217 | rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \ | 217 | ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) install; ) || true |
218 | done | 218 | ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) install; ) || true |
219 | 219 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) install; ) || true | |
220 | install: | 220 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) install; ) || true |
221 | 221 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) install; ) || true | |
222 | cd bin/kdepim; make install | 222 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) install; ) || true |
223 | cp -r Pim $(QPEDIR)/apps | 223 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) install; ) || true |
224 | cp db2file/db2file $(QPEDIR)/bin/db2file | 224 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) install; ) || true |
225 | cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop | 225 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) install; ) || true |
226 | cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop | 226 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) install; ) || true |
227 | cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kopiemail.desktop | 227 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) install; ) || true |
228 | cp pwmanager/pwmanager/pwmanager.desktop $(QPEDIR)/apps/Pim/pwmanager.desktop | 228 | distclean: qmake_all FORCE |
229 | 229 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | |
230 | dist: | 230 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
231 | @echo Dont forget to do "make install" before "make dist" | 231 | ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
232 | rm -f *arm.ipk | 232 | ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
233 | rm -f *~ | 233 | ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
234 | cd ..; tar czf kdepimpi-$(KDEPIM_VERSION).tar.gz --exclude=obj --exclude=moc --exclude=CVS --exclude=Makefilezaurus --exclude=Makefileqtopia kdepim | 234 | ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
235 | mkipks kmicrokdelibs.control | 235 | ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
236 | mkipks korganizer.control | 236 | ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
237 | mkipks kaddressbook.control | 237 | ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
238 | ifndef BUILD_NO_MICROMAIL | 238 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
239 | mkipks kopiemail.control | 239 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
240 | endif | 240 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
241 | mkipks korganizer-alarm.control | 241 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
242 | ifndef BUILD_NO_GAMMU | 242 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
243 | mkipks phoneaccess.control | 243 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
244 | endif | 244 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
245 | ifndef BUILD_NO_PWMANAGER | 245 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
246 | mkipks pwmanager.control | 246 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
247 | endif | 247 | |
248 | mkipks pim_TAB_icon.control | 248 | install: install_subdirs |
249 | 249 | ||
250 | tmake: objects \ | 250 | uninstall: uninstall_subdirs |
251 | qtcompat/Makefile$(PLATFORM) \ | 251 | |
252 | microkde/Makefile$(PLATFORM) \ | 252 | FORCE: |
253 | libkcal/Makefile$(PLATFORM) \ | ||
254 | libkdepim/Makefile$(PLATFORM) \ | ||
255 | korganizer/Makefile$(PLATFORM) \ | ||
256 | kalarmd/Makefile$(PLATFORM) \ | ||
257 | libical/src/libical/Makefile$(PLATFORM) \ | ||
258 | libical/src/libicalss/Makefile$(PLATFORM) \ | ||
259 | kabc/Makefile$(PLATFORM) \ | ||
260 | kabc/formats/binary/Makefile$(PLATFORM) \ | ||
261 | kabc/plugins/file/Makefile$(PLATFORM) \ | ||
262 | kabc/plugins/dir/Makefile$(PLATFORM) \ | ||
263 | kabc/plugins/ldap/Makefile$(PLATFORM) \ | ||
264 | kabc/plugins/opie/Makefile$(PLATFORM) \ | ||
265 | kabc/plugins/qtopia/Makefile$(PLATFORM) \ | ||
266 | kabc/plugins/sharpdtm/Makefile$(PLATFORM) \ | ||
267 | kaddressbook/Makefile$(PLATFORM) \ | ||
268 | kmicromail/Makefile$(PLATFORM) \ | ||
269 | kmicromail/libetpan/Makefile$(PLATFORM) \ | ||
270 | kmicromail/libmailwrapper/Makefile$(PLATFORM) \ | ||
271 | gammu/emb/common/Makefile$(PLATFORM) \ | ||
272 | gammu/emb/gammu/Makefile$(PLATFORM) \ | ||
273 | pwmanager/pwmanager/Makefile$(PLATFORM) \ | ||
274 | pwmanager/libcrypt/mpi/Makefile$(PLATFORM) \ | ||
275 | pwmanager/libcrypt/error/Makefile$(PLATFORM) \ | ||
276 | pwmanager/libcrypt/cipher/Makefile$(PLATFORM) \ | ||
277 | pwmanager/libcrypt/zlib/Makefile$(PLATFORM) | ||
278 | |||
279 | qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro | ||
280 | cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtcompat.pro -o Makefile$(PLATFORM) | ||
281 | |||
282 | microkde/Makefile$(PLATFORM): microkde/microkdeE.pro | ||
283 | cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" microkdeE.pro -o Makefile$(PLATFORM) | ||
284 | |||
285 | libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro | ||
286 | cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkcalE.pro -o Makefile$(PLATFORM) | ||
287 | |||
288 | |||
289 | libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro | ||
290 | cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkdepimE.pro -o Makefile$(PLATFORM) | ||
291 | |||
292 | kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro | ||
293 | cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kalarmdE.pro -o Makefile$(PLATFORM) | ||
294 | |||
295 | korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro | ||
296 | cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" korganizerE.pro -o Makefile$(PLATFORM) | ||
297 | |||
298 | libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro | ||
299 | cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalE.pro -o Makefile$(PLATFORM) | ||
300 | |||
301 | libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro | ||
302 | cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalssE.pro -o Makefile$(PLATFORM) | ||
303 | |||
304 | kabc/Makefile$(PLATFORM): kabc/kabcE.pro | ||
305 | cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcE.pro -o Makefile$(PLATFORM) | ||
306 | |||
307 | kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro | ||
308 | cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcformat_binaryE.pro -o Makefile$(PLATFORM) | ||
309 | |||
310 | kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro | ||
311 | cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" fileE.pro -o Makefile$(PLATFORM) | ||
312 | |||
313 | kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro | ||
314 | cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" dirE.pro -o Makefile$(PLATFORM) | ||
315 | |||
316 | kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro | ||
317 | cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" ldapE.pro -o Makefile$(PLATFORM) | ||
318 | |||
319 | kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro | ||
320 | cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" opieE.pro -o Makefile$(PLATFORM) | ||
321 | |||
322 | kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro | ||
323 | cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtopiaE.pro -o Makefile$(PLATFORM) | ||
324 | |||
325 | kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro | ||
326 | cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" sharpdtmE.pro -o Makefile$(PLATFORM) | ||
327 | |||
328 | kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro | ||
329 | cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kaddressbookE.pro -o Makefile$(PLATFORM) | ||
330 | |||
331 | kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro | ||
332 | cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kmicromailE.pro -o Makefile$(PLATFORM) | ||
333 | |||
334 | kmicromail/libetpan/Makefile$(PLATFORM): kmicromail/libetpan/libetpanE.pro | ||
335 | cd kmicromail/libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libetpanE.pro -o Makefile$(PLATFORM) | ||
336 | |||
337 | kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro | ||
338 | cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libmailwrapperE.pro -o Makefile$(PLATFORM) | ||
339 | |||
340 | gammu/emb/common/Makefile$(PLATFORM): gammu/emb/common/commonE.pro | ||
341 | cd gammu/emb/common; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" commonE.pro -o Makefile$(PLATFORM) | ||
342 | |||
343 | gammu/emb/gammu/Makefile$(PLATFORM): gammu/emb/gammu/gammuE.pro | ||
344 | cd gammu/emb/gammu; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" gammuE.pro -o Makefile$(PLATFORM) | ||
345 | |||
346 | pwmanager/pwmanager/Makefile$(PLATFORM): pwmanager/pwmanager/pwmanagerE.pro | ||
347 | cd pwmanager/pwmanager; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" pwmanagerE.pro -o Makefile$(PLATFORM) | ||
348 | |||
349 | |||
350 | pwmanager/libcrypt/mpi/Makefile$(PLATFORM): pwmanager/libcrypt/mpi/mpi.pro | ||
351 | cd pwmanager/libcrypt/mpi;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" mpi.pro -o Makefile$(PLATFORM) | ||
352 | |||
353 | pwmanager/libcrypt/error/Makefile$(PLATFORM): pwmanager/libcrypt/error/error.pro | ||
354 | cd pwmanager/libcrypt/error;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" error.pro -o Makefile$(PLATFORM) | ||
355 | |||
356 | pwmanager/libcrypt/cipher/Makefile$(PLATFORM): pwmanager/libcrypt/cipher/cipher.pro | ||
357 | cd pwmanager/libcrypt/cipher;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" cipher.pro -o Makefile$(PLATFORM) | ||
358 | |||
359 | pwmanager/libcrypt/zlib/Makefile$(PLATFORM): pwmanager/libcrypt/zlib/zlib.pro | ||
360 | cd pwmanager/libcrypt/zlib;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" zlib.pro -o Makefile$(PLATFORM) | ||
361 | |||
362 | 253 | ||
diff --git a/microkde/kdeui/kmainwindow.cpp b/microkde/kdeui/kmainwindow.cpp index bd5a2cc..3ae4c87 100644 --- a/microkde/kdeui/kmainwindow.cpp +++ b/microkde/kdeui/kmainwindow.cpp | |||
@@ -255,96 +255,97 @@ application config. | |||
255 | 255 | ||
256 | if ( readPropertiesInternal( config, number ) ){ | 256 | if ( readPropertiesInternal( config, number ) ){ |
257 | if ( show ) | 257 | if ( show ) |
258 | KMainWindow::show(); | 258 | KMainWindow::show(); |
259 | return FALSE; | 259 | return FALSE; |
260 | } | 260 | } |
261 | return FALSE; | 261 | return FALSE; |
262 | 262 | ||
263 | } | 263 | } |
264 | 264 | ||
265 | void KMainWindow::setCaption( const QString &caption ) | 265 | void KMainWindow::setCaption( const QString &caption ) |
266 | { | 266 | { |
267 | //US setPlainCaption( kapp->makeStdCaption(caption) ); | 267 | //US setPlainCaption( kapp->makeStdCaption(caption) ); |
268 | setPlainCaption( caption ); | 268 | setPlainCaption( caption ); |
269 | } | 269 | } |
270 | 270 | ||
271 | void KMainWindow::setCaption( const QString &caption, bool modified ) | 271 | void KMainWindow::setCaption( const QString &caption, bool modified ) |
272 | { | 272 | { |
273 | //US setPlainCaption( kapp->makeStdCaption(caption, true, modified) ); | 273 | //US setPlainCaption( kapp->makeStdCaption(caption, true, modified) ); |
274 | setPlainCaption( caption + "modified:" ); | 274 | setPlainCaption( caption + "modified:" ); |
275 | } | 275 | } |
276 | 276 | ||
277 | void KMainWindow::setPlainCaption( const QString &caption ) | 277 | void KMainWindow::setPlainCaption( const QString &caption ) |
278 | { | 278 | { |
279 | QMainWindow::setCaption( caption ); | 279 | QMainWindow::setCaption( caption ); |
280 | #ifndef Q_WS_QWS | 280 | #ifndef Q_WS_QWS |
281 | //US the following is disabled for the embedded version | 281 | //US the following is disabled for the embedded version |
282 | //US NETWinInfo info( qt_xdisplay(), winId(), qt_xrootwin(), 0 ); | 282 | //US NETWinInfo info( qt_xdisplay(), winId(), qt_xrootwin(), 0 ); |
283 | //US info.setName( caption.utf8().data() ); | 283 | //US info.setName( caption.utf8().data() ); |
284 | #endif | 284 | #endif |
285 | } | 285 | } |
286 | 286 | ||
287 | void KMainWindow::slotStateChanged(const QString &newstate) | 287 | void KMainWindow::slotStateChanged(const QString &newstate) |
288 | { | 288 | { |
289 | stateChanged(newstate, KXMLGUIClient::StateNoReverse); | 289 | stateChanged(newstate, KXMLGUIClient::StateNoReverse); |
290 | } | 290 | } |
291 | 291 | ||
292 | /* | 292 | /* |
293 | * Get rid of this for KDE 4.0 | 293 | * Get rid of this for KDE 4.0 |
294 | */ | 294 | */ |
295 | void KMainWindow::slotStateChanged(const QString &newstate, | 295 | void KMainWindow::slotStateChanged(const QString &newstate, |
296 | KXMLGUIClient::ReverseStateChange reverse) | 296 | KXMLGUIClient::ReverseStateChange reverse) |
297 | { | 297 | { |
298 | stateChanged(newstate, reverse); | 298 | stateChanged(newstate, reverse); |
299 | } | 299 | } |
300 | 300 | ||
301 | void KMainWindow::closeEvent ( QCloseEvent *e ) | 301 | void KMainWindow::closeEvent ( QCloseEvent *e ) |
302 | { | 302 | { |
303 | //qDebug("MainWindow::closeEvent "); | ||
303 | // Save settings if auto-save is enabled, and settings have changed | 304 | // Save settings if auto-save is enabled, and settings have changed |
304 | if (d->settingsDirty && d->autoSaveSettings) | 305 | if (d->settingsDirty && d->autoSaveSettings) |
305 | saveAutoSaveSettings(); | 306 | saveAutoSaveSettings(); |
306 | 307 | ||
307 | if (queryClose()) { | 308 | if (queryClose()) { |
308 | e->accept(); | 309 | e->accept(); |
309 | 310 | ||
310 | int not_withdrawn = 0; | 311 | int not_withdrawn = 0; |
311 | /*US | 312 | /*US |
312 | QPtrListIterator<KMainWindow> it(*KMainWindow::memberList); | 313 | QPtrListIterator<KMainWindow> it(*KMainWindow::memberList); |
313 | for (it.toFirst(); it.current(); ++it){ | 314 | for (it.toFirst(); it.current(); ++it){ |
314 | if ( !it.current()->isHidden() && it.current()->isTopLevel() && it.current() != this ) | 315 | if ( !it.current()->isHidden() && it.current()->isTopLevel() && it.current() != this ) |
315 | not_withdrawn++; | 316 | not_withdrawn++; |
316 | } | 317 | } |
317 | */ | 318 | */ |
318 | if ( !no_query_exit && not_withdrawn <= 0 ) { // last window close accepted? | 319 | if ( !no_query_exit && not_withdrawn <= 0 ) { // last window close accepted? |
319 | /*US | 320 | /*US |
320 | if ( queryExit() && !kapp->sessionSaving()) { // Yes, Quit app? | 321 | if ( queryExit() && !kapp->sessionSaving()) { // Yes, Quit app? |
321 | // don't call queryExit() twice | 322 | // don't call queryExit() twice |
322 | disconnect(kapp, SIGNAL(shutDown()), this, SLOT(shuttingDown())); | 323 | disconnect(kapp, SIGNAL(shutDown()), this, SLOT(shuttingDown())); |
323 | kapp->deref(); // ...and quit aplication. | 324 | kapp->deref(); // ...and quit aplication. |
324 | } else { | 325 | } else { |
325 | // cancel closing, it's stupid to end up with no windows at all.... | 326 | // cancel closing, it's stupid to end up with no windows at all.... |
326 | e->ignore(); | 327 | e->ignore(); |
327 | } | 328 | } |
328 | */ | 329 | */ |
329 | //US we have no sessionmanagement. Simply close app. | 330 | //US we have no sessionmanagement. Simply close app. |
330 | if ( queryExit() ) { // Yes, Quit app? | 331 | if ( queryExit() ) { // Yes, Quit app? |
331 | qDebug("KMainWindow::closeEvent: Exit application ???"); | 332 | qDebug("KMainWindow::closeEvent: Exit application ???"); |
332 | // don't call queryExit() twice | 333 | // don't call queryExit() twice |
333 | //US disconnect(kapp, SIGNAL(shutDown()), this, SLOT(shuttingDown())); | 334 | //US disconnect(kapp, SIGNAL(shutDown()), this, SLOT(shuttingDown())); |
334 | } | 335 | } |
335 | 336 | ||
336 | } | 337 | } |
337 | } | 338 | } |
338 | } | 339 | } |
339 | 340 | ||
340 | bool KMainWindow::queryExit() | 341 | bool KMainWindow::queryExit() |
341 | { | 342 | { |
342 | return TRUE; | 343 | return TRUE; |
343 | } | 344 | } |
344 | 345 | ||
345 | bool KMainWindow::queryClose() | 346 | bool KMainWindow::queryClose() |
346 | { | 347 | { |
347 | return TRUE; | 348 | return TRUE; |
348 | } | 349 | } |
349 | 350 | ||
350 | void KMainWindow::saveGlobalProperties( KConfig* ) | 351 | void KMainWindow::saveGlobalProperties( KConfig* ) |
diff --git a/microkde/kdeui/kmainwindow.h b/microkde/kdeui/kmainwindow.h index e76e732..2aafb9d 100644 --- a/microkde/kdeui/kmainwindow.h +++ b/microkde/kdeui/kmainwindow.h | |||
@@ -18,127 +18,128 @@ | |||
18 | $Id$ | 18 | $Id$ |
19 | 19 | ||
20 | */ | 20 | */ |
21 | 21 | ||
22 | 22 | ||
23 | 23 | ||
24 | #ifndef KMAINWINDOW_H | 24 | #ifndef KMAINWINDOW_H |
25 | #define KMAINWINDOW_H | 25 | #define KMAINWINDOW_H |
26 | 26 | ||
27 | /*US | 27 | /*US |
28 | #include "kxmlguifactory.h" | 28 | #include "kxmlguifactory.h" |
29 | #include "kxmlguiclient.h" | 29 | #include "kxmlguiclient.h" |
30 | #include "kxmlguibuilder.h" | 30 | #include "kxmlguibuilder.h" |
31 | #include <qmetaobject.h> | 31 | #include <qmetaobject.h> |
32 | 32 | ||
33 | class KPopupMenu; | 33 | class KPopupMenu; |
34 | class KXMLGUIFactory; | 34 | class KXMLGUIFactory; |
35 | class KConfig; | 35 | class KConfig; |
36 | class KHelpMenu; | 36 | class KHelpMenu; |
37 | class KStatusBar; | 37 | class KStatusBar; |
38 | class QStatusBar; | 38 | class QStatusBar; |
39 | class KMenuBar; | 39 | class KMenuBar; |
40 | class KMWSessionManaged; | 40 | class KMWSessionManaged; |
41 | class KAccel; | 41 | class KAccel; |
42 | class KToolBarMenuAction; | 42 | class KToolBarMenuAction; |
43 | */ | 43 | */ |
44 | 44 | ||
45 | class QMenuBar; | 45 | class QMenuBar; |
46 | class QStatusBar; | 46 | class QStatusBar; |
47 | class KMainWindowPrivate; | 47 | class KMainWindowPrivate; |
48 | class KAction; | 48 | class KAction; |
49 | 49 | ||
50 | #include <ktoolbar.h> | 50 | #include <ktoolbar.h> |
51 | #include <ktoolbarhandler.h> | 51 | #include <ktoolbarhandler.h> |
52 | #include <kxmlguiclient.h> | 52 | #include <kxmlguiclient.h> |
53 | #include <qmainwindow.h> | 53 | #include <qmainwindow.h> |
54 | #include <qptrlist.h> | 54 | #include <qptrlist.h> |
55 | 55 | ||
56 | class KActionCollection; | 56 | class KActionCollection; |
57 | 57 | ||
58 | class KMainWindow : public QMainWindow, virtual public KXMLGUIClient | 58 | class KMainWindow : public QMainWindow, virtual public KXMLGUIClient |
59 | { | 59 | { |
60 | Q_OBJECT | 60 | Q_OBJECT |
61 | 61 | ||
62 | private: | 62 | private: |
63 | //US create private defaultconstructor | 63 | //US create private defaultconstructor |
64 | KMainWindow() {;}; | 64 | KMainWindow() {;}; |
65 | 65 | ||
66 | public: | 66 | |
67 | public: | 67 | public: |
68 | /** | 68 | /** |
69 | * Construct a main window. | 69 | * Construct a main window. |
70 | * | 70 | * |
71 | * @param parent The widget parent. This is usually 0 but it may also be the window | 71 | * @param parent The widget parent. This is usually 0 but it may also be the window |
72 | * group leader. In that case, the KMainWindow becomes sort of a | 72 | * group leader. In that case, the KMainWindow becomes sort of a |
73 | * secondary window. | 73 | * secondary window. |
74 | * | 74 | * |
75 | * @param name The object name. For session management and window management to work | 75 | * @param name The object name. For session management and window management to work |
76 | * properly, all main windows in the application should have a | 76 | * properly, all main windows in the application should have a |
77 | * different name. When passing 0 (the default), KMainWindow will create | 77 | * different name. When passing 0 (the default), KMainWindow will create |
78 | * a unique name, but it's recommended to explicitly pass a window name that will | 78 | * a unique name, but it's recommended to explicitly pass a window name that will |
79 | * also describe the type of the window. If there can be several windows of the same | 79 | * also describe the type of the window. If there can be several windows of the same |
80 | * type, append '#' (hash) to the name, and KMainWindow will append numbers to make | 80 | * type, append '#' (hash) to the name, and KMainWindow will append numbers to make |
81 | * the names unique. For example, for a mail client which has one main window showing | 81 | * the names unique. For example, for a mail client which has one main window showing |
82 | * the mails and folders, and which can also have one or more windows for composing | 82 | * the mails and folders, and which can also have one or more windows for composing |
83 | * mails, the name for the folders window should be e.g. "mainwindow" and | 83 | * mails, the name for the folders window should be e.g. "mainwindow" and |
84 | * for the composer windows "composer#". | 84 | * for the composer windows "composer#". |
85 | * | 85 | * |
86 | * @param f Specify the widget flags. The default is | 86 | * @param f Specify the widget flags. The default is |
87 | * WType_TopLevel and WDestructiveClose. TopLevel indicates that a | 87 | * WType_TopLevel and WDestructiveClose. TopLevel indicates that a |
88 | * main window is a toplevel window, regardless of whether it has a | 88 | * main window is a toplevel window, regardless of whether it has a |
89 | * parent or not. DestructiveClose indicates that a main window is | 89 | * parent or not. DestructiveClose indicates that a main window is |
90 | * automatically destroyed when its window is closed. Pass 0 if | 90 | * automatically destroyed when its window is closed. Pass 0 if |
91 | * you do not want this behavior. | 91 | * you do not want this behavior. |
92 | * | 92 | * |
93 | * KMainWindows must be created on the heap with 'new', like: | 93 | * KMainWindows must be created on the heap with 'new', like: |
94 | * <pre> KMainWindow *kmw = new KMainWindow (...</pre> | 94 | * <pre> KMainWindow *kmw = new KMainWindow (...</pre> |
95 | **/ | 95 | **/ |
96 | KMainWindow( QWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose ); | 96 | //LR remove WDestructiveClose |
97 | KMainWindow( QWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel /*| WDestructiveClose*/ ); | ||
97 | 98 | ||
98 | 99 | ||
99 | /** | 100 | /** |
100 | * Destructor. | 101 | * Destructor. |
101 | * | 102 | * |
102 | * Will also destroy the toolbars, and menubar if | 103 | * Will also destroy the toolbars, and menubar if |
103 | * needed. | 104 | * needed. |
104 | */ | 105 | */ |
105 | virtual ~KMainWindow(); | 106 | virtual ~KMainWindow(); |
106 | 107 | ||
107 | /** | 108 | /** |
108 | * Retrieve the standard help menu. | 109 | * Retrieve the standard help menu. |
109 | * | 110 | * |
110 | * It contains entires for the | 111 | * It contains entires for the |
111 | * help system (activated by F1), an optional "What's This?" entry | 112 | * help system (activated by F1), an optional "What's This?" entry |
112 | * (activated by Shift F1), an application specific dialog box, | 113 | * (activated by Shift F1), an application specific dialog box, |
113 | * and an "About KDE" dialog box. | 114 | * and an "About KDE" dialog box. |
114 | * | 115 | * |
115 | * Example (adding a standard help menu to your application): | 116 | * Example (adding a standard help menu to your application): |
116 | * <pre> | 117 | * <pre> |
117 | * KPopupMenu *help = helpMenu( <myTextString> ); | 118 | * KPopupMenu *help = helpMenu( <myTextString> ); |
118 | * menuBar()->insertItem( i18n("&Help"), help ); | 119 | * menuBar()->insertItem( i18n("&Help"), help ); |
119 | * </pre> | 120 | * </pre> |
120 | * | 121 | * |
121 | * @param aboutAppText The string that is used in the application | 122 | * @param aboutAppText The string that is used in the application |
122 | * specific dialog box. If you leave this string empty the | 123 | * specific dialog box. If you leave this string empty the |
123 | * information in the global @ref KAboutData of the | 124 | * information in the global @ref KAboutData of the |
124 | * application will be used to make a standard dialog box. | 125 | * application will be used to make a standard dialog box. |
125 | * | 126 | * |
126 | * @param showWhatsThis Set this to false if you do not want to include | 127 | * @param showWhatsThis Set this to false if you do not want to include |
127 | * the "What's This" menu entry. | 128 | * the "What's This" menu entry. |
128 | * | 129 | * |
129 | * @return A standard help menu. | 130 | * @return A standard help menu. |
130 | */ | 131 | */ |
131 | //US KPopupMenu* helpMenu( const QString &aboutAppText = QString::null, | 132 | //US KPopupMenu* helpMenu( const QString &aboutAppText = QString::null, |
132 | //US bool showWhatsThis = TRUE ); | 133 | //US bool showWhatsThis = TRUE ); |
133 | 134 | ||
134 | /** | 135 | /** |
135 | * Returns the help menu. Creates a standard help menu if none exists yet. | 136 | * Returns the help menu. Creates a standard help menu if none exists yet. |
136 | * | 137 | * |
137 | * It contains entries for the | 138 | * It contains entries for the |
138 | * help system (activated by F1), an optional "What's This?" entry | 139 | * help system (activated by F1), an optional "What's This?" entry |
139 | * (activated by Shift F1), an application specific dialog box, | 140 | * (activated by Shift F1), an application specific dialog box, |
140 | * and an "About KDE" dialog box. You must create the application | 141 | * and an "About KDE" dialog box. You must create the application |
141 | * specific dialog box yourself. When the "About application" | 142 | * specific dialog box yourself. When the "About application" |
142 | * menu entry is activated, a signal will trigger the | 143 | * menu entry is activated, a signal will trigger the |
143 | * @ref showAboutApplication slot. See @ref showAboutApplication for more | 144 | * @ref showAboutApplication slot. See @ref showAboutApplication for more |
144 | * information. | 145 | * information. |
diff --git a/pwmanager/pwmanager/getmasterpwwnd_emb.cpp b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp index 8404c3e..678f05f 100644 --- a/pwmanager/pwmanager/getmasterpwwnd_emb.cpp +++ b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp | |||
@@ -81,97 +81,97 @@ getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name) | |||
81 | numberLayout->setSpacing( 0 ); | 81 | numberLayout->setSpacing( 0 ); |
82 | 82 | ||
83 | QPushButton* p1 = new QPushButton( i18n("1"), numberBox ); | 83 | QPushButton* p1 = new QPushButton( i18n("1"), numberBox ); |
84 | numberLayout->addWidget( p1, 0, 0 ); | 84 | numberLayout->addWidget( p1, 0, 0 ); |
85 | QPushButton* p2 = new QPushButton( i18n("2"), numberBox ); | 85 | QPushButton* p2 = new QPushButton( i18n("2"), numberBox ); |
86 | numberLayout->addWidget( p2, 0, 1 ); | 86 | numberLayout->addWidget( p2, 0, 1 ); |
87 | QPushButton* p3 = new QPushButton( i18n("3"), numberBox ); | 87 | QPushButton* p3 = new QPushButton( i18n("3"), numberBox ); |
88 | numberLayout->addWidget( p3, 0, 2 ); | 88 | numberLayout->addWidget( p3, 0, 2 ); |
89 | QPushButton* p4 = new QPushButton( i18n("4"), numberBox ); | 89 | QPushButton* p4 = new QPushButton( i18n("4"), numberBox ); |
90 | numberLayout->addWidget( p4, 1, 0 ); | 90 | numberLayout->addWidget( p4, 1, 0 ); |
91 | QPushButton* p5 = new QPushButton( i18n("5"), numberBox ); | 91 | QPushButton* p5 = new QPushButton( i18n("5"), numberBox ); |
92 | numberLayout->addWidget( p5, 1, 1 ); | 92 | numberLayout->addWidget( p5, 1, 1 ); |
93 | QPushButton* p6 = new QPushButton( i18n("6"), numberBox ); | 93 | QPushButton* p6 = new QPushButton( i18n("6"), numberBox ); |
94 | numberLayout->addWidget( p6, 1, 2 ); | 94 | numberLayout->addWidget( p6, 1, 2 ); |
95 | QPushButton* p7 = new QPushButton( i18n("7"), numberBox ); | 95 | QPushButton* p7 = new QPushButton( i18n("7"), numberBox ); |
96 | numberLayout->addWidget( p7, 2, 0 ); | 96 | numberLayout->addWidget( p7, 2, 0 ); |
97 | QPushButton* p8 = new QPushButton( i18n("8"), numberBox ); | 97 | QPushButton* p8 = new QPushButton( i18n("8"), numberBox ); |
98 | numberLayout->addWidget( p8, 2, 1 ); | 98 | numberLayout->addWidget( p8, 2, 1 ); |
99 | QPushButton* p9 = new QPushButton( i18n("9"), numberBox ); | 99 | QPushButton* p9 = new QPushButton( i18n("9"), numberBox ); |
100 | numberLayout->addWidget( p9, 2, 2 ); | 100 | numberLayout->addWidget( p9, 2, 2 ); |
101 | QPushButton* clear = new QPushButton( i18n("x"), numberBox ); | 101 | QPushButton* clear = new QPushButton( i18n("x"), numberBox ); |
102 | numberLayout->addWidget( clear, 3, 0 ); | 102 | numberLayout->addWidget( clear, 3, 0 ); |
103 | QPushButton* p0 = new QPushButton( i18n("0"), numberBox ); | 103 | QPushButton* p0 = new QPushButton( i18n("0"), numberBox ); |
104 | numberLayout->addWidget( p0, 3, 1 ); | 104 | numberLayout->addWidget( p0, 3, 1 ); |
105 | QPushButton* backspace = new QPushButton( i18n("-"), numberBox ); | 105 | QPushButton* backspace = new QPushButton( i18n("-"), numberBox ); |
106 | numberLayout->addWidget( backspace, 3, 2 ); | 106 | numberLayout->addWidget( backspace, 3, 2 ); |
107 | 107 | ||
108 | 108 | ||
109 | pageLayout->addWidget(numberBox); | 109 | pageLayout->addWidget(numberBox); |
110 | #ifdef DESKTOP_VERSION | 110 | #ifdef DESKTOP_VERSION |
111 | resize( sizeHint() ); | 111 | resize( sizeHint() ); |
112 | #else | 112 | #else |
113 | resize( 200,sizeHint().height() ); | 113 | resize( 200,sizeHint().height() ); |
114 | #endif | 114 | #endif |
115 | 115 | ||
116 | connect( p0, SIGNAL( clicked() ), this, SLOT( add0() ) ); | 116 | connect( p0, SIGNAL( clicked() ), this, SLOT( add0() ) ); |
117 | connect( p1, SIGNAL( clicked() ), this, SLOT( add1() ) ); | 117 | connect( p1, SIGNAL( clicked() ), this, SLOT( add1() ) ); |
118 | connect( p2, SIGNAL( clicked() ), this, SLOT( add2() ) ); | 118 | connect( p2, SIGNAL( clicked() ), this, SLOT( add2() ) ); |
119 | connect( p3, SIGNAL( clicked() ), this, SLOT( add3() ) ); | 119 | connect( p3, SIGNAL( clicked() ), this, SLOT( add3() ) ); |
120 | connect( p4, SIGNAL( clicked() ), this, SLOT( add4() ) ); | 120 | connect( p4, SIGNAL( clicked() ), this, SLOT( add4() ) ); |
121 | connect( p5, SIGNAL( clicked() ), this, SLOT( add5() ) ); | 121 | connect( p5, SIGNAL( clicked() ), this, SLOT( add5() ) ); |
122 | connect( p6, SIGNAL( clicked() ), this, SLOT( add6() ) ); | 122 | connect( p6, SIGNAL( clicked() ), this, SLOT( add6() ) ); |
123 | connect( p7, SIGNAL( clicked() ), this, SLOT( add7() ) ); | 123 | connect( p7, SIGNAL( clicked() ), this, SLOT( add7() ) ); |
124 | connect( p8, SIGNAL( clicked() ), this, SLOT( add8() ) ); | 124 | connect( p8, SIGNAL( clicked() ), this, SLOT( add8() ) ); |
125 | connect( p9, SIGNAL( clicked() ), this, SLOT( add9() ) ); | 125 | connect( p9, SIGNAL( clicked() ), this, SLOT( add9() ) ); |
126 | connect( backspace, SIGNAL( clicked() ), this, SLOT( backspace() ) ); | 126 | connect( backspace, SIGNAL( clicked() ), this, SLOT( backspace() ) ); |
127 | connect( clear, SIGNAL( clicked() ), this, SLOT( clear() ) ); | 127 | connect( clear, SIGNAL( clicked() ), this, SLOT( clear() ) ); |
128 | 128 | ||
129 | 129 | pwLineEdit->setFocus(); | |
130 | 130 | ||
131 | } | 131 | } |
132 | 132 | ||
133 | /* | 133 | /* |
134 | * Destroys the object and frees any allocated resources | 134 | * Destroys the object and frees any allocated resources |
135 | */ | 135 | */ |
136 | getMasterPwWnd::~getMasterPwWnd() | 136 | getMasterPwWnd::~getMasterPwWnd() |
137 | { | 137 | { |
138 | // no need to delete child widgets, Qt does it all for us | 138 | // no need to delete child widgets, Qt does it all for us |
139 | } | 139 | } |
140 | 140 | ||
141 | void getMasterPwWnd::okButton_slot() | 141 | void getMasterPwWnd::okButton_slot() |
142 | { | 142 | { |
143 | qWarning( "getMasterPwWnd::okButton_slot(): Not implemented yet" ); | 143 | qWarning( "getMasterPwWnd::okButton_slot(): Not implemented yet" ); |
144 | } | 144 | } |
145 | 145 | ||
146 | void getMasterPwWnd::cancelButton_slot() | 146 | void getMasterPwWnd::cancelButton_slot() |
147 | { | 147 | { |
148 | qWarning( "getMasterPwWnd::cancelButton_slot(): Not implemented yet" ); | 148 | qWarning( "getMasterPwWnd::cancelButton_slot(): Not implemented yet" ); |
149 | } | 149 | } |
150 | 150 | ||
151 | void getMasterPwWnd::add0() | 151 | void getMasterPwWnd::add0() |
152 | { | 152 | { |
153 | addCharacter("0"); | 153 | addCharacter("0"); |
154 | } | 154 | } |
155 | void getMasterPwWnd::add1() | 155 | void getMasterPwWnd::add1() |
156 | { | 156 | { |
157 | addCharacter("1"); | 157 | addCharacter("1"); |
158 | } | 158 | } |
159 | void getMasterPwWnd::add2() | 159 | void getMasterPwWnd::add2() |
160 | { | 160 | { |
161 | addCharacter("2"); | 161 | addCharacter("2"); |
162 | } | 162 | } |
163 | void getMasterPwWnd::add3() | 163 | void getMasterPwWnd::add3() |
164 | { | 164 | { |
165 | addCharacter("3"); | 165 | addCharacter("3"); |
166 | } | 166 | } |
167 | void getMasterPwWnd::add4() | 167 | void getMasterPwWnd::add4() |
168 | { | 168 | { |
169 | addCharacter("4"); | 169 | addCharacter("4"); |
170 | } | 170 | } |
171 | void getMasterPwWnd::add5() | 171 | void getMasterPwWnd::add5() |
172 | { | 172 | { |
173 | addCharacter("5"); | 173 | addCharacter("5"); |
174 | } | 174 | } |
175 | void getMasterPwWnd::add6() | 175 | void getMasterPwWnd::add6() |
176 | { | 176 | { |
177 | addCharacter("6"); | 177 | addCharacter("6"); |
diff --git a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp index 26b9708..a8696ea 100644 --- a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp +++ b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp | |||
@@ -103,103 +103,103 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n | |||
103 | 103 | ||
104 | QLabel* kcfg_crypt_label = new QLabel(i18n("Encryption:"), filePage); | 104 | QLabel* kcfg_crypt_label = new QLabel(i18n("Encryption:"), filePage); |
105 | fileLayout->addWidget(kcfg_crypt_label,i,0); | 105 | fileLayout->addWidget(kcfg_crypt_label,i,0); |
106 | kcfg_cryptAlgo = new QComboBox(filePage, "kcfg_cryptAlgo"); | 106 | kcfg_cryptAlgo = new QComboBox(filePage, "kcfg_cryptAlgo"); |
107 | kcfg_cryptAlgo->insertItem(i18n("Blowfish (128 bit)")); | 107 | kcfg_cryptAlgo->insertItem(i18n("Blowfish (128 bit)")); |
108 | #ifdef CONFIG_PWMANAGER_GCRY | 108 | #ifdef CONFIG_PWMANAGER_GCRY |
109 | kcfg_cryptAlgo->insertItem(i18n("AES-128, Rijndael (128 bit)")); | 109 | kcfg_cryptAlgo->insertItem(i18n("AES-128, Rijndael (128 bit)")); |
110 | kcfg_cryptAlgo->insertItem(i18n("AES-192, Rijndael (192 bit)")); | 110 | kcfg_cryptAlgo->insertItem(i18n("AES-192, Rijndael (192 bit)")); |
111 | kcfg_cryptAlgo->insertItem(i18n("AES-256, Rijndael (256 bit)")); | 111 | kcfg_cryptAlgo->insertItem(i18n("AES-256, Rijndael (256 bit)")); |
112 | kcfg_cryptAlgo->insertItem(i18n("Triple-DES (168 bit)")); | 112 | kcfg_cryptAlgo->insertItem(i18n("Triple-DES (168 bit)")); |
113 | kcfg_cryptAlgo->insertItem(i18n("Twofish (256 bit)")); | 113 | kcfg_cryptAlgo->insertItem(i18n("Twofish (256 bit)")); |
114 | kcfg_cryptAlgo->insertItem(i18n("Twofish-128 (128 bit)")); | 114 | kcfg_cryptAlgo->insertItem(i18n("Twofish-128 (128 bit)")); |
115 | #endif // CONFIG_PWMANAGER_GCRY | 115 | #endif // CONFIG_PWMANAGER_GCRY |
116 | fileLayout->addWidget( kcfg_cryptAlgo,i,1); | 116 | fileLayout->addWidget( kcfg_cryptAlgo,i,1); |
117 | ++i; | 117 | ++i; |
118 | 118 | ||
119 | QLabel* kcfg_hash_label = new QLabel(i18n("Hashing:"), filePage); | 119 | QLabel* kcfg_hash_label = new QLabel(i18n("Hashing:"), filePage); |
120 | fileLayout->addWidget(kcfg_hash_label,i,0); | 120 | fileLayout->addWidget(kcfg_hash_label,i,0); |
121 | kcfg_hashAlgo = new QComboBox(filePage, "kcfg_hashAlgo"); | 121 | kcfg_hashAlgo = new QComboBox(filePage, "kcfg_hashAlgo"); |
122 | kcfg_hashAlgo->insertItem(i18n("SHA-160, SHA1 (160 bit)")); | 122 | kcfg_hashAlgo->insertItem(i18n("SHA-160, SHA1 (160 bit)")); |
123 | #ifdef CONFIG_PWMANAGER_GCRY | 123 | #ifdef CONFIG_PWMANAGER_GCRY |
124 | kcfg_hashAlgo->insertItem(i18n("SHA-256 (256 bit)")); | 124 | kcfg_hashAlgo->insertItem(i18n("SHA-256 (256 bit)")); |
125 | kcfg_hashAlgo->insertItem(i18n("SHA-384 (384 bit)")); | 125 | kcfg_hashAlgo->insertItem(i18n("SHA-384 (384 bit)")); |
126 | kcfg_hashAlgo->insertItem(i18n("SHA-512 (512 bit)")); | 126 | kcfg_hashAlgo->insertItem(i18n("SHA-512 (512 bit)")); |
127 | kcfg_hashAlgo->insertItem(i18n("MD5 (128 bit)")); | 127 | kcfg_hashAlgo->insertItem(i18n("MD5 (128 bit)")); |
128 | kcfg_hashAlgo->insertItem(i18n("RIPE-MD-160 (160 bit)")); | 128 | kcfg_hashAlgo->insertItem(i18n("RIPE-MD-160 (160 bit)")); |
129 | kcfg_hashAlgo->insertItem(i18n("Tiger (192 bit)")); | 129 | kcfg_hashAlgo->insertItem(i18n("Tiger (192 bit)")); |
130 | #endif // CONFIG_PWMANAGER_GCRY | 130 | #endif // CONFIG_PWMANAGER_GCRY |
131 | fileLayout->addWidget( kcfg_hashAlgo,i,1); | 131 | fileLayout->addWidget( kcfg_hashAlgo,i,1); |
132 | ++i; | 132 | ++i; |
133 | 133 | ||
134 | permissionLineEdit = new QLineEdit(filePage); | 134 | permissionLineEdit = new QLineEdit(filePage); |
135 | QLabel* permissionLineLabel = new QLabel(permissionLineEdit, i18n("Permissions:"), filePage); | 135 | QLabel* permissionLineLabel = new QLabel(permissionLineEdit, i18n("Permissions:"), filePage); |
136 | fileLayout->addWidget(permissionLineLabel,i,0); | 136 | fileLayout->addWidget(permissionLineLabel,i,0); |
137 | fileLayout->addWidget(permissionLineEdit,i,1); | 137 | fileLayout->addWidget(permissionLineEdit,i,1); |
138 | ++i; | 138 | ++i; |
139 | 139 | ||
140 | KPrefsWidBool *sb = addWidBool(i18n("Make backup before saving"), | 140 | KPrefsWidBool *sb = addWidBool(i18n("Make backup before saving"), |
141 | &(prefs->mMakeFileBackup),filePage); | 141 | &(prefs->mMakeFileBackup),filePage); |
142 | fileLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); | 142 | fileLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); |
143 | ++i; | 143 | ++i; |
144 | 144 | ||
145 | // Timeout page | 145 | // Timeout page |
146 | ////////////////////////////////////////////////////// | 146 | ////////////////////////////////////////////////////// |
147 | QWidget *timeoutPage = new QWidget( this ); | 147 | QWidget *timeoutPage = new QWidget( this ); |
148 | QGridLayout *timeoutLayout = new QGridLayout( timeoutPage, 3, 2); | 148 | QGridLayout *timeoutLayout = new QGridLayout( timeoutPage, 3, 2); |
149 | 149 | ||
150 | i = 0; | 150 | i = 0; |
151 | pwTimeoutSpinBox = new QSpinBox( timeoutPage, "pwTimeoutSpinBox" ); | 151 | pwTimeoutSpinBox = new QSpinBox( 0,600,10,timeoutPage, "pwTimeoutSpinBox" ); |
152 | QLabel* timeoutLabel = new QLabel(pwTimeoutSpinBox, i18n("Password timeout\n(timeout to hold password in\nmemory,so you don't have to\nre-enter it,if you\nalready have entered it)\n[set to 0 to disable]:"), timeoutPage); | 152 | QLabel* timeoutLabel = new QLabel(pwTimeoutSpinBox, i18n("Password timeout\n(timeout to hold password in\nmemory,so you don't have to\nre-enter it,if you\nalready have entered it)\n[set to 0 to disable]:"), timeoutPage); |
153 | timeoutLayout->addMultiCellWidget(timeoutLabel,i, i, 0 ,0); | 153 | timeoutLayout->addMultiCellWidget(timeoutLabel,i, i, 0 ,0); |
154 | timeoutLayout->addWidget(pwTimeoutSpinBox,i,1); | 154 | timeoutLayout->addWidget(pwTimeoutSpinBox,i,1); |
155 | ++i; | 155 | ++i; |
156 | 156 | ||
157 | lockTimeoutSpinBox = new QSpinBox( timeoutPage, "lockTimeoutSpinBox" ); | 157 | lockTimeoutSpinBox = new QSpinBox( 0,600,10,timeoutPage, "lockTimeoutSpinBox" ); |
158 | QLabel* lockTimeoutLabel = new QLabel(lockTimeoutSpinBox, i18n("Auto-lock timeout\n(auto lock document after this\namount of seconds)\n[set to 0 to disable]:"), timeoutPage); | 158 | QLabel* lockTimeoutLabel = new QLabel(lockTimeoutSpinBox, i18n("Auto-lock timeout\n(auto lock document after this\namount of seconds)\n[set to 0 to disable]:"), timeoutPage); |
159 | timeoutLayout->addMultiCellWidget(lockTimeoutLabel,i, i, 0 ,0); | 159 | timeoutLayout->addMultiCellWidget(lockTimeoutLabel,i, i, 0 ,0); |
160 | timeoutLayout->addWidget(lockTimeoutSpinBox,i,1); | 160 | timeoutLayout->addWidget(lockTimeoutSpinBox,i,1); |
161 | ++i; | 161 | ++i; |
162 | 162 | ||
163 | sb = addWidBool(i18n("deep-lock on autolock"), | 163 | sb = addWidBool(i18n("deep-lock on autolock"), |
164 | &(prefs->mAutoDeeplock),timeoutPage); | 164 | &(prefs->mAutoDeeplock),timeoutPage); |
165 | timeoutLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); | 165 | timeoutLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); |
166 | ++i; | 166 | ++i; |
167 | 167 | ||
168 | 168 | ||
169 | // Autostart page | 169 | // Autostart page |
170 | ////////////////////////////////////////////////////// | 170 | ////////////////////////////////////////////////////// |
171 | QWidget *autostartPage = new QWidget( this ); | 171 | QWidget *autostartPage = new QWidget( this ); |
172 | QGridLayout *autostartLayout = new QGridLayout( autostartPage, 3, 2); | 172 | QGridLayout *autostartLayout = new QGridLayout( autostartPage, 3, 2); |
173 | 173 | ||
174 | i = 0; | 174 | i = 0; |
175 | 175 | ||
176 | autostartLineEdit = new KURLRequester(autostartPage, "autoStartLineEdit"); | 176 | autostartLineEdit = new KURLRequester(autostartPage, "autoStartLineEdit"); |
177 | QLabel* autostartLineLabel = new QLabel(autostartLineEdit, "Open this file automatically on startup:",autostartPage); | 177 | QLabel* autostartLineLabel = new QLabel(autostartLineEdit, "Open this file automatically on startup:",autostartPage); |
178 | autostartLayout->addMultiCellWidget(autostartLineLabel,i,i,0,1); | 178 | autostartLayout->addMultiCellWidget(autostartLineLabel,i,i,0,1); |
179 | ++i; | 179 | ++i; |
180 | autostartLayout->addMultiCellWidget(autostartLineEdit,i,i,0,1); | 180 | autostartLayout->addMultiCellWidget(autostartLineEdit,i,i,0,1); |
181 | ++i; | 181 | ++i; |
182 | 182 | ||
183 | sb = addWidBool(i18n("open deeplocked"), | 183 | sb = addWidBool(i18n("open deeplocked"), |
184 | &(prefs->mAutostartDeeplocked),autostartPage); | 184 | &(prefs->mAutostartDeeplocked),autostartPage); |
185 | autostartLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); | 185 | autostartLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1); |
186 | ++i; | 186 | ++i; |
187 | 187 | ||
188 | 188 | ||
189 | // external app page | 189 | // external app page |
190 | ////////////////////////////////////////////////////// | 190 | ////////////////////////////////////////////////////// |
191 | QWidget *externalappPage = new QWidget( this ); | 191 | QWidget *externalappPage = new QWidget( this ); |
192 | QGridLayout *externalappLayout = new QGridLayout( externalappPage, 3, 2); | 192 | QGridLayout *externalappLayout = new QGridLayout( externalappPage, 3, 2); |
193 | 193 | ||
194 | i = 0; | 194 | i = 0; |
195 | 195 | ||
196 | browserLineEdit = new QLineEdit(externalappPage); | 196 | browserLineEdit = new QLineEdit(externalappPage); |
197 | QLabel* browserLineLabel = new QLabel(browserLineEdit, i18n("Favourite browser:"), externalappPage); | 197 | QLabel* browserLineLabel = new QLabel(browserLineEdit, i18n("Favourite browser:"), externalappPage); |
198 | externalappLayout->addWidget(browserLineLabel,i,0); | 198 | externalappLayout->addWidget(browserLineLabel,i,0); |
199 | externalappLayout->addWidget(browserLineEdit,i,1); | 199 | externalappLayout->addWidget(browserLineEdit,i,1); |
200 | ++i; | 200 | ++i; |
201 | 201 | ||
202 | xtermLineEdit = new QLineEdit(externalappPage); | 202 | xtermLineEdit = new QLineEdit(externalappPage); |
203 | QLabel* xtermLineLabel = new QLabel(xtermLineEdit, i18n("Favourite x-terminal:"), externalappPage); | 203 | QLabel* xtermLineLabel = new QLabel(xtermLineEdit, i18n("Favourite x-terminal:"), externalappPage); |
204 | externalappLayout->addWidget(xtermLineLabel,i,0); | 204 | externalappLayout->addWidget(xtermLineLabel,i,0); |
205 | externalappLayout->addWidget(xtermLineEdit,i,1); | 205 | externalappLayout->addWidget(xtermLineEdit,i,1); |
diff --git a/pwmanager/pwmanager/libgcryptif.cpp b/pwmanager/pwmanager/libgcryptif.cpp index eafd318..ff94bf6 100644 --- a/pwmanager/pwmanager/libgcryptif.cpp +++ b/pwmanager/pwmanager/libgcryptif.cpp | |||
@@ -394,56 +394,61 @@ bool LibGCryptIf::doHashPassphrase(DEK *dek, | |||
394 | if (count < 8) { | 394 | if (count < 8) { |
395 | gcry_md_write(md, s2k->salt, count); | 395 | gcry_md_write(md, s2k->salt, count); |
396 | } else { | 396 | } else { |
397 | gcry_md_write(md, s2k->salt, 8); | 397 | gcry_md_write(md, s2k->salt, 8); |
398 | count -= 8; | 398 | count -= 8; |
399 | gcry_md_write(md, pw, count); | 399 | gcry_md_write(md, pw, count); |
400 | } | 400 | } |
401 | } else | 401 | } else |
402 | gcry_md_write(md, pw, pwlen); | 402 | gcry_md_write(md, pw, pwlen); |
403 | gcry_md_final(md); | 403 | gcry_md_final(md); |
404 | i = gcry_md_get_algo_dlen(s2k->hash_algo); | 404 | i = gcry_md_get_algo_dlen(s2k->hash_algo); |
405 | if (i > dek->keylen - used) | 405 | if (i > dek->keylen - used) |
406 | i = dek->keylen - used; | 406 | i = dek->keylen - used; |
407 | memcpy(dek->key+used, gcry_md_read(md, s2k->hash_algo), i); | 407 | memcpy(dek->key+used, gcry_md_read(md, s2k->hash_algo), i); |
408 | used += i; | 408 | used += i; |
409 | } | 409 | } |
410 | gcry_md_close(md); | 410 | gcry_md_close(md); |
411 | out: | 411 | out: |
412 | return ret; | 412 | return ret; |
413 | } | 413 | } |
414 | 414 | ||
415 | void LibGCryptIf::padData(unsigned char *buf, | 415 | void LibGCryptIf::padData(unsigned char *buf, |
416 | size_t bufLen, | 416 | size_t bufLen, |
417 | size_t boundary) | 417 | size_t boundary) |
418 | { | 418 | { |
419 | size_t numPadBytes = boundary - ((bufLen + 1) % boundary); | 419 | size_t numPadBytes = boundary - ((bufLen + 1) % boundary); |
420 | buf[bufLen] = static_cast<char>(0x01); | 420 | buf[bufLen] = static_cast<char>(0x01); |
421 | size_t i = 0; | 421 | size_t i = 0; |
422 | Randomizer *rnd = Randomizer::obj(); | 422 | Randomizer *rnd = Randomizer::obj(); |
423 | char c; | 423 | char c; |
424 | unsigned char *b; | 424 | unsigned char *b; |
425 | while (i < numPadBytes) { | 425 | while (i < numPadBytes) { |
426 | c = rnd->genRndChar(); | 426 | c = rnd->genRndChar(); |
427 | if (c == static_cast<char>(0x01)) | 427 | if (c == static_cast<char>(0x01)) |
428 | continue; | 428 | continue; |
429 | b = buf + bufLen + 1 + i; | 429 | b = buf + bufLen + 1 + i; |
430 | *b = c; | 430 | *b = c; |
431 | ++i; | 431 | ++i; |
432 | } | 432 | } |
433 | } | 433 | } |
434 | 434 | ||
435 | void LibGCryptIf::unpadData(const unsigned char *buf, | 435 | void LibGCryptIf::unpadData(const unsigned char *buf, |
436 | size_t *bufLen) | 436 | size_t *bufLen) |
437 | { | 437 | { |
438 | size_t pos; | 438 | size_t pos; |
439 | BUG_ON(*bufLen % 8); | 439 | BUG_ON(*bufLen % 8); |
440 | pos = *bufLen - 1; | 440 | pos = *bufLen - 1; |
441 | while (buf[pos] != static_cast<char>(0x01)) { | 441 | while (buf[pos] != static_cast<char>(0x01)) { |
442 | qDebug("pos %d %d %d", pos, buf[pos], static_cast<char>(0x01) ); | ||
442 | BUG_ON(!pos); | 443 | BUG_ON(!pos); |
444 | //LR BUG we should terminte the loop if p == 0 | ||
445 | if ( pos == 0 ) | ||
446 | break; | ||
443 | --pos; | 447 | --pos; |
444 | } | 448 | } |
445 | *bufLen = pos; | 449 | *bufLen = pos; |
450 | qDebug("ente "); | ||
446 | } | 451 | } |
447 | 452 | ||
448 | #endif // CONFIG_PWMANAGER_GCRY | 453 | #endif // CONFIG_PWMANAGER_GCRY |
449 | 454 | ||
diff --git a/pwmanager/pwmanager/main.cpp b/pwmanager/pwmanager/main.cpp index 1ca7ba8..70df15d 100644 --- a/pwmanager/pwmanager/main.cpp +++ b/pwmanager/pwmanager/main.cpp | |||
@@ -164,56 +164,57 @@ int main(int argc, char *argv[]) | |||
164 | #else | 164 | #else |
165 | 165 | ||
166 | bool exitHelp = false; | 166 | bool exitHelp = false; |
167 | if ( argc > 1 ) { | 167 | if ( argc > 1 ) { |
168 | QString command = argv[1]; | 168 | QString command = argv[1]; |
169 | if ( command == "-help" ){ | 169 | if ( command == "-help" ){ |
170 | printf("PWM/PI command line commands:\n"); | 170 | printf("PWM/PI command line commands:\n"); |
171 | printf(" no command: Start PWM/PI in usual way\n"); | 171 | printf(" no command: Start PWM/PI in usual way\n"); |
172 | printf(" -help: This output\n"); | 172 | printf(" -help: This output\n"); |
173 | printf(" PWM/PI is exiting now. Bye!\n"); | 173 | printf(" PWM/PI is exiting now. Bye!\n"); |
174 | exitHelp = true; | 174 | exitHelp = true; |
175 | } | 175 | } |
176 | } | 176 | } |
177 | if ( ! exitHelp ) { | 177 | if ( ! exitHelp ) { |
178 | 178 | ||
179 | PwMApplication a(argc, argv); | 179 | PwMApplication a(argc, argv); |
180 | 180 | ||
181 | KGlobal::setAppName( "pwmanager" ); | 181 | KGlobal::setAppName( "pwmanager" ); |
182 | #ifndef DESKTOP_VERSION | 182 | #ifndef DESKTOP_VERSION |
183 | //qDebug("width %d ",QApplication::desktop()->width() ); | 183 | //qDebug("width %d ",QApplication::desktop()->width() ); |
184 | if ( QApplication::desktop()->width() > 320 ) | 184 | if ( QApplication::desktop()->width() > 320 ) |
185 | KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons22/"); | 185 | KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons22/"); |
186 | else | 186 | else |
187 | KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons16/"); | 187 | KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons16/"); |
188 | #else | 188 | #else |
189 | QString fileName ; | 189 | QString fileName ; |
190 | fileName = qApp->applicationDirPath () + "/kdepim/pwmanager/icons22/"; | 190 | fileName = qApp->applicationDirPath () + "/kdepim/pwmanager/icons22/"; |
191 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); | 191 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); |
192 | QApplication::addLibraryPath ( qApp->applicationDirPath () ); | 192 | QApplication::addLibraryPath ( qApp->applicationDirPath () ); |
193 | 193 | ||
194 | #endif | 194 | #endif |
195 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "pwmanager"))); | 195 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "pwmanager"))); |
196 | KPimGlobalPrefs::instance()->setGlobalConfig(); | 196 | KPimGlobalPrefs::instance()->setGlobalConfig(); |
197 | 197 | ||
198 | a.newInstance(); | 198 | a.newInstance(); |
199 | 199 | ||
200 | //US KAddressBookMain m ; | 200 | //US KAddressBookMain m ; |
201 | 201 | ||
202 | //US QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 202 | //US QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); |
203 | /*US | 203 | /*US |
204 | #ifndef DESKTOP_VERSION | 204 | #ifndef DESKTOP_VERSION |
205 | a.showMainWidget( &m ); | 205 | a.showMainWidget( &m ); |
206 | #else | 206 | #else |
207 | a.setMainWidget( &m ); | 207 | a.setMainWidget( &m ); |
208 | m.resize (640, 480 ); | 208 | m.resize (640, 480 ); |
209 | m.show(); | 209 | m.show(); |
210 | #endif | 210 | #endif |
211 | */ | 211 | */ |
212 | QObject::connect( &a, SIGNAL( lastWindowClosed()), &a, SLOT (quit())); | ||
212 | a.exec(); | 213 | a.exec(); |
213 | KPimGlobalPrefs::instance()->writeConfig(); | 214 | KPimGlobalPrefs::instance()->writeConfig(); |
214 | } | 215 | } |
215 | qDebug("PWMPI: Bye! "); | 216 | qDebug("PWMPI: Bye! "); |
216 | 217 | ||
217 | #endif | 218 | #endif |
218 | 219 | ||
219 | } | 220 | } |
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp index 1ab2b71..2b8f2fa 100644 --- a/pwmanager/pwmanager/pwm.cpp +++ b/pwmanager/pwmanager/pwm.cpp | |||
@@ -148,101 +148,103 @@ enum { | |||
148 | }; | 148 | }; |
149 | #endif | 149 | #endif |
150 | 150 | ||
151 | // Button IDs for toolbar | 151 | // Button IDs for toolbar |
152 | enum { | 152 | enum { |
153 | BUTTON_TOOL_NEW = 0, | 153 | BUTTON_TOOL_NEW = 0, |
154 | BUTTON_TOOL_OPEN, | 154 | BUTTON_TOOL_OPEN, |
155 | BUTTON_TOOL_SAVE, | 155 | BUTTON_TOOL_SAVE, |
156 | BUTTON_TOOL_SAVEAS, | 156 | BUTTON_TOOL_SAVEAS, |
157 | BUTTON_TOOL_PRINT, | 157 | BUTTON_TOOL_PRINT, |
158 | BUTTON_TOOL_ADD, | 158 | BUTTON_TOOL_ADD, |
159 | BUTTON_TOOL_EDIT, | 159 | BUTTON_TOOL_EDIT, |
160 | BUTTON_TOOL_DEL, | 160 | BUTTON_TOOL_DEL, |
161 | BUTTON_TOOL_FIND, | 161 | BUTTON_TOOL_FIND, |
162 | BUTTON_TOOL_LOCK, | 162 | BUTTON_TOOL_LOCK, |
163 | BUTTON_TOOL_DEEPLOCK, | 163 | BUTTON_TOOL_DEEPLOCK, |
164 | BUTTON_TOOL_UNLOCK | 164 | BUTTON_TOOL_UNLOCK |
165 | }; | 165 | }; |
166 | 166 | ||
167 | 167 | ||
168 | PwM::PwM(PwMInit *_init, PwMDoc *doc, | 168 | PwM::PwM(PwMInit *_init, PwMDoc *doc, |
169 | bool virginity, | 169 | bool virginity, |
170 | QWidget *parent, const char *name) | 170 | QWidget *parent, const char *name) |
171 | : KMainWindow(parent, "HALLO") | 171 | : KMainWindow(parent, "HALLO") |
172 | , forceQuit (false) | 172 | , forceQuit (false) |
173 | , forceMinimizeToTray (false) | 173 | , forceMinimizeToTray (false) |
174 | { | 174 | { |
175 | syncManager = 0; | 175 | syncManager = 0; |
176 | virgin = !virginity; | 176 | virgin = !virginity; |
177 | init = _init; | 177 | init = _init; |
178 | connect(doc, SIGNAL(docClosed(PwMDoc *)), | 178 | connect(doc, SIGNAL(docClosed(PwMDoc *)), |
179 | this, SLOT(docClosed(PwMDoc *))); | 179 | this, SLOT(docClosed(PwMDoc *))); |
180 | initMenubar(); | 180 | initMenubar(); |
181 | initToolbar(); | 181 | initToolbar(); |
182 | initMetrics(); | 182 | initMetrics(); |
183 | setVirgin(virginity); | 183 | setVirgin(virginity); |
184 | setFocusPolicy(QWidget::WheelFocus); | 184 | setFocusPolicy(QWidget::WheelFocus); |
185 | #ifndef PWM_EMBEDDED | 185 | #ifndef PWM_EMBEDDED |
186 | statusBar()->show(); | 186 | statusBar()->show(); |
187 | #endif | 187 | #endif |
188 | view = makeNewListView(doc); | 188 | view = makeNewListView(doc); |
189 | setCentralWidget(view); | 189 | setCentralWidget(view); |
190 | updateCaption(); | 190 | updateCaption(); |
191 | showStatMsg(i18n("Ready.")); | 191 | showStatMsg(i18n("Ready.")); |
192 | } | 192 | } |
193 | 193 | ||
194 | PwM::~PwM() | 194 | PwM::~PwM() |
195 | { | 195 | { |
196 | //qDebug("PwM::~PwM()"); | 196 | qDebug("PwM::~PwM() %x", this); |
197 | disconnect(curDoc(), SIGNAL(docClosed(PwMDoc *)), | 197 | disconnect(curDoc(), SIGNAL(docClosed(PwMDoc *)), |
198 | this, SLOT(docClosed(PwMDoc *))); | 198 | this, SLOT(docClosed(PwMDoc *))); |
199 | conf()->confWndMainWndSize(size()); | 199 | conf()->confWndMainWndSize(size()); |
200 | emit closed(this); | 200 | //LR closing of windows changed |
201 | //needed for fastload option on PDA | ||
202 | //emit closed(this); | ||
201 | //qDebug("PwM::~PwM() emited closed(this)"); | 203 | //qDebug("PwM::~PwM() emited closed(this)"); |
202 | delete view; | 204 | delete view; |
203 | delete syncManager; | 205 | delete syncManager; |
204 | } | 206 | } |
205 | 207 | ||
206 | void PwM::initMenubar() | 208 | void PwM::initMenubar() |
207 | { | 209 | { |
208 | KIconLoader* picons; | 210 | KIconLoader* picons; |
209 | #ifndef PWM_EMBEDDED | 211 | #ifndef PWM_EMBEDDED |
210 | KIconLoader icons; | 212 | KIconLoader icons; |
211 | picons = &icons; | 213 | picons = &icons; |
212 | #else | 214 | #else |
213 | picons = KGlobal::iconLoader(); | 215 | picons = KGlobal::iconLoader(); |
214 | 216 | ||
215 | 217 | ||
216 | syncPopup = new KPopupMenu(this); | 218 | syncPopup = new KPopupMenu(this); |
217 | 219 | ||
218 | syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::PWMPI, PWMPrefs::instance(), syncPopup); | 220 | syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::PWMPI, PWMPrefs::instance(), syncPopup); |
219 | syncManager->setBlockSave(false); | 221 | syncManager->setBlockSave(false); |
220 | 222 | ||
221 | connect ( syncPopup, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); | 223 | connect ( syncPopup, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); |
222 | syncManager->fillSyncMenu(); | 224 | syncManager->fillSyncMenu(); |
223 | 225 | ||
224 | #endif | 226 | #endif |
225 | filePopup = new KPopupMenu(this); | 227 | filePopup = new KPopupMenu(this); |
226 | importPopup = new KPopupMenu(filePopup); | 228 | importPopup = new KPopupMenu(filePopup); |
227 | exportPopup = new KPopupMenu(filePopup); | 229 | exportPopup = new KPopupMenu(filePopup); |
228 | managePopup = new KPopupMenu(this); | 230 | managePopup = new KPopupMenu(this); |
229 | #ifdef CONFIG_KEYCARD | 231 | #ifdef CONFIG_KEYCARD |
230 | chipcardPopup = new KPopupMenu(this); | 232 | chipcardPopup = new KPopupMenu(this); |
231 | #endif // CONFIG_KEYCARD | 233 | #endif // CONFIG_KEYCARD |
232 | viewPopup = new KPopupMenu(this); | 234 | viewPopup = new KPopupMenu(this); |
233 | optionsPopup = new KPopupMenu(this); | 235 | optionsPopup = new KPopupMenu(this); |
234 | 236 | ||
235 | // "file" popup menu | 237 | // "file" popup menu |
236 | filePopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), | 238 | filePopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), |
237 | i18n("&New"), this, | 239 | i18n("&New"), this, |
238 | SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW); | 240 | SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW); |
239 | filePopup->insertItem(QIconSet(picons->loadIcon("fileopen", KIcon::Small)), | 241 | filePopup->insertItem(QIconSet(picons->loadIcon("fileopen", KIcon::Small)), |
240 | i18n("&Open"), this, | 242 | i18n("&Open"), this, |
241 | SLOT(open_slot()), 0, BUTTON_POPUP_FILE_OPEN); | 243 | SLOT(open_slot()), 0, BUTTON_POPUP_FILE_OPEN); |
242 | filePopup->insertItem(QIconSet(picons->loadIcon("fileclose", KIcon::Small)), | 244 | filePopup->insertItem(QIconSet(picons->loadIcon("fileclose", KIcon::Small)), |
243 | i18n("&Close"), this, | 245 | i18n("&Close"), this, |
244 | SLOT(close_slot()), 0, BUTTON_POPUP_FILE_CLOSE); | 246 | SLOT(close_slot()), 0, BUTTON_POPUP_FILE_CLOSE); |
245 | filePopup->insertSeparator(); | 247 | filePopup->insertSeparator(); |
246 | filePopup->insertItem(QIconSet(picons->loadIcon("filesave", KIcon::Small)), | 248 | filePopup->insertItem(QIconSet(picons->loadIcon("filesave", KIcon::Small)), |
247 | i18n("&Save"), this, | 249 | i18n("&Save"), this, |
248 | SLOT(save_slot()), 0, BUTTON_POPUP_FILE_SAVE); | 250 | SLOT(save_slot()), 0, BUTTON_POPUP_FILE_SAVE); |
@@ -842,101 +844,105 @@ void PwM::config_slot() | |||
842 | 844 | ||
843 | int newStyle = conf()->confWndMainViewStyle(); | 845 | int newStyle = conf()->confWndMainViewStyle(); |
844 | // reinitialize tray | 846 | // reinitialize tray |
845 | init->initTray(); | 847 | init->initTray(); |
846 | // reinitialize KWallet emulation | 848 | // reinitialize KWallet emulation |
847 | init->initKWalletEmu(); | 849 | init->initKWalletEmu(); |
848 | 850 | ||
849 | PwMDocList *_dl = PwMDoc::getOpenDocList(); | 851 | PwMDocList *_dl = PwMDoc::getOpenDocList(); |
850 | const vector<PwMDocList::listItem> *dl = _dl->getList(); | 852 | const vector<PwMDocList::listItem> *dl = _dl->getList(); |
851 | vector<PwMDocList::listItem>::const_iterator i = dl->begin(), | 853 | vector<PwMDocList::listItem>::const_iterator i = dl->begin(), |
852 | end = dl->end(); | 854 | end = dl->end(); |
853 | PwMDoc *doc; | 855 | PwMDoc *doc; |
854 | while (i != end) { | 856 | while (i != end) { |
855 | doc = (*i).doc; | 857 | doc = (*i).doc; |
856 | // unlock-without-mpw timeout | 858 | // unlock-without-mpw timeout |
857 | doc->timer()->start(DocTimer::id_mpwTimer); | 859 | doc->timer()->start(DocTimer::id_mpwTimer); |
858 | // auto-lock timeout | 860 | // auto-lock timeout |
859 | doc->timer()->start(DocTimer::id_autoLockTimer); | 861 | doc->timer()->start(DocTimer::id_autoLockTimer); |
860 | ++i; | 862 | ++i; |
861 | } | 863 | } |
862 | 864 | ||
863 | const QValueList<PwM *> *ml = init->mainWndList(); | 865 | const QValueList<PwM *> *ml = init->mainWndList(); |
864 | #ifndef PWM_EMBEDDED | 866 | #ifndef PWM_EMBEDDED |
865 | QValueList<PwM *>::const_iterator i2 = ml->begin(), | 867 | QValueList<PwM *>::const_iterator i2 = ml->begin(), |
866 | end2 = ml->end(); | 868 | end2 = ml->end(); |
867 | #else | 869 | #else |
868 | QValueList<PwM *>::ConstIterator i2 = ml->begin(), | 870 | QValueList<PwM *>::ConstIterator i2 = ml->begin(), |
869 | end2 = ml->end(); | 871 | end2 = ml->end(); |
870 | #endif | 872 | #endif |
871 | PwM *pwm; | 873 | PwM *pwm; |
872 | while (i2 != end2) { | 874 | while (i2 != end2) { |
873 | pwm = *i2; | 875 | pwm = *i2; |
874 | // reinitialize the window style. | 876 | // reinitialize the window style. |
875 | if (oldStyle != newStyle) | 877 | if (oldStyle != newStyle) |
876 | pwm->curView()->initStyle(newStyle); | 878 | pwm->curView()->initStyle(newStyle); |
877 | // set the new font | 879 | // set the new font |
878 | pwm->curView()->setFont(conf()->confGlobEntryFont()); | 880 | pwm->curView()->setFont(conf()->confGlobEntryFont()); |
879 | ++i2; | 881 | ++i2; |
880 | } | 882 | } |
881 | } | 883 | } |
882 | 884 | ||
883 | void PwM::activateMpButton(bool activate) | 885 | void PwM::activateMpButton(bool activate) |
884 | { | 886 | { |
885 | managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_CHANGEMP, activate); | 887 | managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_CHANGEMP, activate); |
886 | } | 888 | } |
887 | 889 | ||
888 | void PwM::closeEvent(QCloseEvent *e) | 890 | void PwM::closeEvent(QCloseEvent *e) |
889 | { | 891 | { |
892 | qDebug("PwM::closeEvent "); | ||
893 | emit closed( this ); | ||
894 | return; | ||
890 | e->accept(); | 895 | e->accept(); |
891 | } | 896 | } |
892 | 897 | ||
893 | void PwM::docClosed(PwMDoc *doc) | 898 | void PwM::docClosed(PwMDoc *doc) |
894 | { | 899 | { |
900 | qDebug("PwM::docClosed "); | ||
895 | PARAM_UNUSED(doc); | 901 | PARAM_UNUSED(doc); |
896 | PWM_ASSERT(doc == curDoc()); | 902 | PWM_ASSERT(doc == curDoc()); |
897 | close(); | 903 | close(); |
898 | } | 904 | } |
899 | 905 | ||
900 | void PwM::find_slot() | 906 | void PwM::find_slot() |
901 | { | 907 | { |
902 | PWM_ASSERT(curDoc()); | 908 | PWM_ASSERT(curDoc()); |
903 | if (curDoc()->isDocEmpty()) | 909 | if (curDoc()->isDocEmpty()) |
904 | return; | 910 | return; |
905 | if (curDoc()->isDeepLocked()) | 911 | if (curDoc()->isDeepLocked()) |
906 | return; | 912 | return; |
907 | curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); | 913 | curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); |
908 | FindWndImpl findWnd(view); | 914 | FindWndImpl findWnd(view); |
909 | findWnd.exec(); | 915 | findWnd.exec(); |
910 | curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); | 916 | curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); |
911 | } | 917 | } |
912 | 918 | ||
913 | void PwM::exportToText() | 919 | void PwM::exportToText() |
914 | { | 920 | { |
915 | PWM_ASSERT(curDoc()); | 921 | PWM_ASSERT(curDoc()); |
916 | if (curDoc()->isDocEmpty()) { | 922 | if (curDoc()->isDocEmpty()) { |
917 | KMessageBox::information(this, | 923 | KMessageBox::information(this, |
918 | i18n | 924 | i18n |
919 | ("Sorry, there's nothing to export.\n" | 925 | ("Sorry, there's nothing to export.\n" |
920 | "Please first add some passwords."), | 926 | "Please first add some passwords."), |
921 | i18n("nothing to do")); | 927 | i18n("nothing to do")); |
922 | return; | 928 | return; |
923 | } | 929 | } |
924 | curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); | 930 | curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); |
925 | QString fn(KFileDialog::getSaveFileName(QString::null, | 931 | QString fn(KFileDialog::getSaveFileName(QString::null, |
926 | i18n("*|plain-text file"), | 932 | i18n("*|plain-text file"), |
927 | this)); | 933 | this)); |
928 | if (fn == "") { | 934 | if (fn == "") { |
929 | curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); | 935 | curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); |
930 | return; | 936 | return; |
931 | } | 937 | } |
932 | 938 | ||
933 | PwMerror ret = curDoc()->exportToText(&fn); | 939 | PwMerror ret = curDoc()->exportToText(&fn); |
934 | if (ret != e_success) { | 940 | if (ret != e_success) { |
935 | KMessageBox::error(this, | 941 | KMessageBox::error(this, |
936 | i18n("Error: Couldn't write to file.\n" | 942 | i18n("Error: Couldn't write to file.\n" |
937 | "Please check if you have permission to write\n" | 943 | "Please check if you have permission to write\n" |
938 | "to the file in that directory."), | 944 | "to the file in that directory."), |
939 | i18n("error while writing")); | 945 | i18n("error while writing")); |
940 | } else | 946 | } else |
941 | showStatMsg(i18n("Successfully exported data.")); | 947 | showStatMsg(i18n("Successfully exported data.")); |
942 | curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); | 948 | curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); |
diff --git a/pwmanager/pwmanager/pwmdoc.cpp b/pwmanager/pwmanager/pwmdoc.cpp index 129bf7b..cf8690f 100644 --- a/pwmanager/pwmanager/pwmdoc.cpp +++ b/pwmanager/pwmanager/pwmdoc.cpp | |||
@@ -2932,96 +2932,97 @@ void PwMDoc::ensureLvp() | |||
2932 | } | 2932 | } |
2933 | 2933 | ||
2934 | /*/debug | 2934 | /*/debug |
2935 | entrBegin = catI->d.begin(); | 2935 | entrBegin = catI->d.begin(); |
2936 | entrEnd = catI->d.end(); | 2936 | entrEnd = catI->d.end(); |
2937 | entrI = entrBegin; | 2937 | entrI = entrBegin; |
2938 | 2938 | ||
2939 | while (entrI != entrEnd) { | 2939 | while (entrI != entrEnd) { |
2940 | qDebug("check: %s, pos=%i", (*entrI).desc.c_str(), (*entrI).listViewPos); | 2940 | qDebug("check: %s, pos=%i", (*entrI).desc.c_str(), (*entrI).listViewPos); |
2941 | ++entrI; | 2941 | ++entrI; |
2942 | } | 2942 | } |
2943 | */ | 2943 | */ |
2944 | 2944 | ||
2945 | ++catI; | 2945 | ++catI; |
2946 | } | 2946 | } |
2947 | } | 2947 | } |
2948 | 2948 | ||
2949 | QString PwMDoc::getTitle() | 2949 | QString PwMDoc::getTitle() |
2950 | { | 2950 | { |
2951 | /* NOTE: We have to ensure, that the returned title | 2951 | /* NOTE: We have to ensure, that the returned title |
2952 | * is unique and not reused somewhere else while | 2952 | * is unique and not reused somewhere else while |
2953 | * this document is valid (open). | 2953 | * this document is valid (open). |
2954 | */ | 2954 | */ |
2955 | QString title(getFilename()); | 2955 | QString title(getFilename()); |
2956 | 2956 | ||
2957 | //US ENH: The whole filename on PDAs is too long. So use only the last characters | 2957 | //US ENH: The whole filename on PDAs is too long. So use only the last characters |
2958 | if (QApplication::desktop()->width() < 640) | 2958 | if (QApplication::desktop()->width() < 640) |
2959 | { | 2959 | { |
2960 | if (title.length() > 30) | 2960 | if (title.length() > 30) |
2961 | title = "..." + title.right(30); | 2961 | title = "..." + title.right(30); |
2962 | 2962 | ||
2963 | } | 2963 | } |
2964 | 2964 | ||
2965 | 2965 | ||
2966 | if (title.isEmpty()) { | 2966 | if (title.isEmpty()) { |
2967 | if (unnamedNum == 0) { | 2967 | if (unnamedNum == 0) { |
2968 | unnamedNum = PwMDocList::getNewUnnamedNumber(); | 2968 | unnamedNum = PwMDocList::getNewUnnamedNumber(); |
2969 | PWM_ASSERT(unnamedNum != 0); | 2969 | PWM_ASSERT(unnamedNum != 0); |
2970 | } | 2970 | } |
2971 | title = DEFAULT_TITLE; | 2971 | title = DEFAULT_TITLE; |
2972 | title += " "; | 2972 | title += " "; |
2973 | title += tostr(unnamedNum).c_str(); | 2973 | title += tostr(unnamedNum).c_str(); |
2974 | } | 2974 | } |
2975 | return title; | 2975 | return title; |
2976 | } | 2976 | } |
2977 | 2977 | ||
2978 | bool PwMDoc::tryDelete() | 2978 | bool PwMDoc::tryDelete() |
2979 | { | 2979 | { |
2980 | |||
2980 | if (deleted) | 2981 | if (deleted) |
2981 | return true; | 2982 | return true; |
2982 | int ret; | 2983 | int ret; |
2983 | if (isDirty()) { | 2984 | if (isDirty()) { |
2984 | ret = dirtyAskSave(getTitle()); | 2985 | ret = dirtyAskSave(getTitle()); |
2985 | if (ret == 0) { // save to disk | 2986 | if (ret == 0) { // save to disk |
2986 | if (!saveDocUi(this)) | 2987 | if (!saveDocUi(this)) |
2987 | goto out_ignore; | 2988 | goto out_ignore; |
2988 | } else if (ret == 1) { // don't save and delete | 2989 | } else if (ret == 1) { // don't save and delete |
2989 | goto out_accept; | 2990 | goto out_accept; |
2990 | } else { // cancel operation | 2991 | } else { // cancel operation |
2991 | goto out_ignore; | 2992 | goto out_ignore; |
2992 | } | 2993 | } |
2993 | } | 2994 | } |
2994 | out_accept: | 2995 | out_accept: |
2995 | deleted = true; | 2996 | deleted = true; |
2996 | delete this; | 2997 | delete this; |
2997 | return true; | 2998 | return true; |
2998 | out_ignore: | 2999 | out_ignore: |
2999 | return false; | 3000 | return false; |
3000 | } | 3001 | } |
3001 | 3002 | ||
3002 | 3003 | ||
3003 | 3004 | ||
3004 | #ifdef PWM_EMBEDDED | 3005 | #ifdef PWM_EMBEDDED |
3005 | //US ENH: this is the magic function that syncronizes the this doc with the remote doc | 3006 | //US ENH: this is the magic function that syncronizes the this doc with the remote doc |
3006 | //US it could have been defined as static, but I did not want to. | 3007 | //US it could have been defined as static, but I did not want to. |
3007 | PwMerror PwMDoc::syncronize(KSyncManager* manager, PwMDoc* syncLocal , PwMDoc* syncRemote, int mode ) | 3008 | PwMerror PwMDoc::syncronize(KSyncManager* manager, PwMDoc* syncLocal , PwMDoc* syncRemote, int mode ) |
3008 | { | 3009 | { |
3009 | int addedPasswordsLocal = 0; | 3010 | int addedPasswordsLocal = 0; |
3010 | int addedPasswordsRemote = 0; | 3011 | int addedPasswordsRemote = 0; |
3011 | int deletedPasswordsRemote = 0; | 3012 | int deletedPasswordsRemote = 0; |
3012 | int deletedPasswordsLocal = 0; | 3013 | int deletedPasswordsLocal = 0; |
3013 | int changedLocal = 0; | 3014 | int changedLocal = 0; |
3014 | int changedRemote = 0; | 3015 | int changedRemote = 0; |
3015 | 3016 | ||
3016 | PwMSyncItem* syncItemLocal; | 3017 | PwMSyncItem* syncItemLocal; |
3017 | PwMSyncItem* syncItemRemote; | 3018 | PwMSyncItem* syncItemRemote; |
3018 | 3019 | ||
3019 | QString mCurrentSyncName = manager->getCurrentSyncName(); | 3020 | QString mCurrentSyncName = manager->getCurrentSyncName(); |
3020 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); | 3021 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); |
3021 | 3022 | ||
3022 | bool fullDateRange = false; | 3023 | bool fullDateRange = false; |
3023 | int take; | 3024 | int take; |
3024 | // local->resetTempSyncStat(); | 3025 | // local->resetTempSyncStat(); |
3025 | QDateTime mLastSync = QDateTime::currentDateTime(); | 3026 | QDateTime mLastSync = QDateTime::currentDateTime(); |
3026 | QDateTime modifiedSync = mLastSync; | 3027 | QDateTime modifiedSync = mLastSync; |
3027 | 3028 | ||
diff --git a/pwmanager/pwmanager/pwmdocui.cpp b/pwmanager/pwmanager/pwmdocui.cpp index 71b4a8d..a9916c2 100644 --- a/pwmanager/pwmanager/pwmdocui.cpp +++ b/pwmanager/pwmanager/pwmdocui.cpp | |||
@@ -159,123 +159,126 @@ void PwMDocUi::noMpwMsgBox(bool chipcard, QString prefix, QString postfix) | |||
159 | { | 159 | { |
160 | QString msg; | 160 | QString msg; |
161 | if (prefix != "") { | 161 | if (prefix != "") { |
162 | msg += prefix; | 162 | msg += prefix; |
163 | msg += "\n"; | 163 | msg += "\n"; |
164 | } | 164 | } |
165 | 165 | ||
166 | if (chipcard) { | 166 | if (chipcard) { |
167 | msg += i18n("No key-card found!\n" | 167 | msg += i18n("No key-card found!\n" |
168 | "Please insert the\n" | 168 | "Please insert the\n" |
169 | "correct key-card."); | 169 | "correct key-card."); |
170 | } else { | 170 | } else { |
171 | msg += i18n("No master-password given!"); | 171 | msg += i18n("No master-password given!"); |
172 | } | 172 | } |
173 | 173 | ||
174 | if (postfix != "") { | 174 | if (postfix != "") { |
175 | msg += "\n"; | 175 | msg += "\n"; |
176 | msg += postfix; | 176 | msg += postfix; |
177 | } | 177 | } |
178 | KMessageBox::error(currentView, msg, | 178 | KMessageBox::error(currentView, msg, |
179 | (chipcard) ? (i18n("no chipcard")) | 179 | (chipcard) ? (i18n("no chipcard")) |
180 | : (i18n("password error"))); | 180 | : (i18n("password error"))); |
181 | } | 181 | } |
182 | 182 | ||
183 | void PwMDocUi::rootAlertMsgBox() | 183 | void PwMDocUi::rootAlertMsgBox() |
184 | { | 184 | { |
185 | KMessageBox::error(currentView, | 185 | KMessageBox::error(currentView, |
186 | i18n("This feature is not available,n" | 186 | i18n("This feature is not available,n" |
187 | "if you execute PwM with \"root\" \n" | 187 | "if you execute PwM with \"root\" \n" |
188 | "UID 0 privileges, for security reasons!"), | 188 | "UID 0 privileges, for security reasons!"), |
189 | i18n("not allowed as root!")); | 189 | i18n("not allowed as root!")); |
190 | } | 190 | } |
191 | 191 | ||
192 | void PwMDocUi::cantDeeplock_notSavedMsgBox() | 192 | void PwMDocUi::cantDeeplock_notSavedMsgBox() |
193 | { | 193 | { |
194 | KMessageBox::error(currentView, | 194 | KMessageBox::error(currentView, |
195 | i18n("Can't deep-lock, because the document\n" | 195 | i18n("Can't deep-lock, because the document\n" |
196 | "hasn't been saved, yet. Please save\n" | 196 | "hasn't been saved, yet. Please save\n" |
197 | "to a file and try again."), | 197 | "to a file and try again."), |
198 | i18n("not saved, yet")); | 198 | i18n("not saved, yet")); |
199 | } | 199 | } |
200 | 200 | ||
201 | void PwMDocUi::gpmPwLenErrMsgBox() | 201 | void PwMDocUi::gpmPwLenErrMsgBox() |
202 | { | 202 | { |
203 | KMessageBox::error(currentView, | 203 | KMessageBox::error(currentView, |
204 | i18n("GPasman does not support passwords\n" | 204 | i18n("GPasman does not support passwords\n" |
205 | "shorter than 4 characters! Please try\n" | 205 | "shorter than 4 characters! Please try\n" |
206 | "again with a longer password."), | 206 | "again with a longer password."), |
207 | i18n("password too short")); | 207 | i18n("Password too short")); |
208 | } | 208 | } |
209 | 209 | ||
210 | int PwMDocUi::dirtyAskSave(const QString &docTitle) | 210 | int PwMDocUi::dirtyAskSave(const QString &docTitle) |
211 | { | 211 | { |
212 | int ret; | 212 | int ret; |
213 | #ifndef PWM_EMBEDDED | 213 | #ifndef PWM_EMBEDDED |
214 | ret = KMessageBox::questionYesNoCancel(currentView, | 214 | ret = KMessageBox::questionYesNoCancel(currentView, |
215 | i18n("The list \"") + | 215 | i18n("The list\n\"") + |
216 | docTitle + | 216 | docTitle + |
217 | i18n | 217 | i18n |
218 | ("\" has been modified.\n" | 218 | ("\" has been modified.\n" |
219 | "Do you want to save it?"), | 219 | "Do you want to save it?"), |
220 | i18n("save?")); | 220 | i18n("Save?")); |
221 | if (ret == KMessageBox::Yes) { | 221 | if (ret == KMessageBox::Yes) { |
222 | return 0; | 222 | return 0; |
223 | } else if (ret == KMessageBox::No) { | 223 | } else if (ret == KMessageBox::No) { |
224 | return 1; | 224 | return 1; |
225 | } | 225 | } |
226 | #else | 226 | #else |
227 | QString doc = docTitle; | ||
228 | if ( doc.length() > 33 ) | ||
229 | doc = "..." + doc.right(30); | ||
227 | ret = KMessageBox::warningYesNoCancel(currentView, | 230 | ret = KMessageBox::warningYesNoCancel(currentView, |
228 | i18n("The list \"") + | 231 | i18n("The list\n \"") + |
229 | docTitle + | 232 | doc + |
230 | i18n | 233 | i18n |
231 | ("\"\nhas been modified.\n" | 234 | ("\"\nhas been modified.\n" |
232 | "Do you want to save it?"), | 235 | "Do you want to save it?"), |
233 | i18n("save?")); | 236 | i18n("Save?")); |
234 | if (ret == KMessageBox::Yes) { | 237 | if (ret == KMessageBox::Yes) { |
235 | return 0; | 238 | return 0; |
236 | } else if (ret == KMessageBox::No) { | 239 | } else if (ret == KMessageBox::No) { |
237 | return 1; | 240 | return 1; |
238 | } | 241 | } |
239 | 242 | ||
240 | #endif | 243 | #endif |
241 | 244 | ||
242 | // cancel | 245 | // cancel |
243 | return -1; | 246 | return -1; |
244 | } | 247 | } |
245 | 248 | ||
246 | bool PwMDocUi::saveDocUi(PwMDoc *doc) | 249 | bool PwMDocUi::saveDocUi(PwMDoc *doc) |
247 | { | 250 | { |
248 | PWM_ASSERT(doc); | 251 | PWM_ASSERT(doc); |
249 | doc->timer()->getLock(DocTimer::id_autoLockTimer); | 252 | doc->timer()->getLock(DocTimer::id_autoLockTimer); |
250 | if (doc->isDocEmpty()) { | 253 | if (doc->isDocEmpty()) { |
251 | KMessageBox::information(currentView, | 254 | KMessageBox::information(currentView, |
252 | i18n | 255 | i18n |
253 | ("Sorry, there's nothing to save.\n" | 256 | ("Sorry, there's nothing to save.\n" |
254 | "Please first add some passwords."), | 257 | "Please first add some passwords."), |
255 | i18n("nothing to do")); | 258 | i18n("nothing to do")); |
256 | doc->timer()->putLock(DocTimer::id_autoLockTimer); | 259 | doc->timer()->putLock(DocTimer::id_autoLockTimer); |
257 | return true; | 260 | return true; |
258 | } | 261 | } |
259 | PwMerror ret = doc->saveDoc(conf()->confGlobCompression()); | 262 | PwMerror ret = doc->saveDoc(conf()->confGlobCompression()); |
260 | if (ret == e_filename) { | 263 | if (ret == e_filename) { |
261 | doc->timer()->putLock(DocTimer::id_autoLockTimer); | 264 | doc->timer()->putLock(DocTimer::id_autoLockTimer); |
262 | return saveAsDocUi(doc); | 265 | return saveAsDocUi(doc); |
263 | } else if (ret == e_weakPw) { | 266 | } else if (ret == e_weakPw) { |
264 | KMessageBox::error(currentView, | 267 | KMessageBox::error(currentView, |
265 | i18n("Error: This is a weak password.\n" | 268 | i18n("Error: This is a weak password.\n" |
266 | "Please select another password."), | 269 | "Please select another password."), |
267 | i18n("weak password")); | 270 | i18n("weak password")); |
268 | doc->timer()->putLock(DocTimer::id_autoLockTimer); | 271 | doc->timer()->putLock(DocTimer::id_autoLockTimer); |
269 | return false; | 272 | return false; |
270 | } else if (ret == e_fileBackup) { | 273 | } else if (ret == e_fileBackup) { |
271 | KMessageBox::error(currentView, | 274 | KMessageBox::error(currentView, |
272 | i18n("Error: Couldn't make backup-file!"), | 275 | i18n("Error: Couldn't make backup-file!"), |
273 | i18n("backup failed")); | 276 | i18n("backup failed")); |
274 | doc->timer()->putLock(DocTimer::id_autoLockTimer); | 277 | doc->timer()->putLock(DocTimer::id_autoLockTimer); |
275 | return false; | 278 | return false; |
276 | } else if (ret == e_noPw || | 279 | } else if (ret == e_noPw || |
277 | ret == e_wrongPw || | 280 | ret == e_wrongPw || |
278 | ret == e_openFile) { | 281 | ret == e_openFile) { |
279 | doc->timer()->putLock(DocTimer::id_autoLockTimer); | 282 | doc->timer()->putLock(DocTimer::id_autoLockTimer); |
280 | return false; | 283 | return false; |
281 | } else if (ret != e_success) { | 284 | } else if (ret != e_success) { |
diff --git a/pwmanager/pwmanager/pwminit.cpp b/pwmanager/pwmanager/pwminit.cpp index d775aa9..fbd17a7 100644 --- a/pwmanager/pwmanager/pwminit.cpp +++ b/pwmanager/pwmanager/pwminit.cpp | |||
@@ -43,188 +43,188 @@ | |||
43 | #include <qmessagebox.h> | 43 | #include <qmessagebox.h> |
44 | 44 | ||
45 | #include <kmessagebox.h> | 45 | #include <kmessagebox.h> |
46 | #ifndef PWM_EMBEDDED | 46 | #ifndef PWM_EMBEDDED |
47 | #include <kcmdlineargs.h> | 47 | #include <kcmdlineargs.h> |
48 | #include <kwin.h> | 48 | #include <kwin.h> |
49 | #include <dcopclient.h> | 49 | #include <dcopclient.h> |
50 | #endif | 50 | #endif |
51 | 51 | ||
52 | #include <kapplication.h> | 52 | #include <kapplication.h> |
53 | #include <kiconloader.h> | 53 | #include <kiconloader.h> |
54 | 54 | ||
55 | #include <signal.h> | 55 | #include <signal.h> |
56 | 56 | ||
57 | static PwMInit *sig_init_pointer; | 57 | static PwMInit *sig_init_pointer; |
58 | #ifdef _WIN32_ | 58 | #ifdef _WIN32_ |
59 | static void sig_handler(int signum) | 59 | static void sig_handler(int signum) |
60 | #else | 60 | #else |
61 | static NOREGPARM void sig_handler(int signum) | 61 | static NOREGPARM void sig_handler(int signum) |
62 | #endif | 62 | #endif |
63 | { | 63 | { |
64 | switch (signum) { | 64 | switch (signum) { |
65 | case SIGINT: | 65 | case SIGINT: |
66 | case SIGTERM: | 66 | case SIGTERM: |
67 | sig_init_pointer->shutdownApp(20 + signum); | 67 | sig_init_pointer->shutdownApp(20 + signum); |
68 | break; | 68 | break; |
69 | default: | 69 | default: |
70 | printDebug(string("unhandled signal ") | 70 | printDebug(string("unhandled signal ") |
71 | + tostr(signum)); | 71 | + tostr(signum)); |
72 | } | 72 | } |
73 | } | 73 | } |
74 | 74 | ||
75 | 75 | ||
76 | 76 | ||
77 | PwMInit::PwMInit(PwMApplication *_app) | 77 | PwMInit::PwMInit(PwMApplication *_app) |
78 | : runStatus (unknown) | 78 | : runStatus (unknown) |
79 | , _curWidget (0) | 79 | , _curWidget (0) |
80 | , _dcopClient (0) | 80 | , _dcopClient (0) |
81 | , _kwalletEmu (0) | 81 | , _kwalletEmu (0) |
82 | , _keycard (0) | 82 | , _keycard (0) |
83 | , _tray (0) | 83 | , _tray (0) |
84 | { | 84 | { |
85 | sig_init_pointer = this; | 85 | sig_init_pointer = this; |
86 | app = _app; | 86 | app = _app; |
87 | } | 87 | } |
88 | 88 | ||
89 | PwMInit::~PwMInit() | 89 | PwMInit::~PwMInit() |
90 | { | 90 | { |
91 | qDebug("PwMInit::~PwMInit() "); | ||
91 | #ifndef PWM_EMBEDDED | 92 | #ifndef PWM_EMBEDDED |
92 | SelfTest::cancel(); | 93 | SelfTest::cancel(); |
93 | // close all open mainwnds | 94 | // close all open mainwnds |
94 | QValueList<PwM *>::iterator i = _mainWndList.begin(), | 95 | QValueList<PwM *>::iterator i = _mainWndList.begin(), |
95 | end = _mainWndList.end(); | 96 | end = _mainWndList.end(); |
96 | 97 | ||
97 | #else | 98 | #else |
98 | // close all open mainwnds | 99 | // close all open mainwnds |
99 | QValueList<PwM *>::Iterator i = _mainWndList.begin(), | 100 | QValueList<PwM *>::Iterator i = _mainWndList.begin(), |
100 | end = _mainWndList.end(); | 101 | end = _mainWndList.end(); |
101 | #endif | 102 | #endif |
102 | while (i != end) { | 103 | while (i != end) { |
103 | disconnect(*i, SIGNAL(closed(PwM *)), | 104 | disconnect(*i, SIGNAL(closed(PwM *)), |
104 | this, SLOT(mainWndClosed(PwM *))); | 105 | this, SLOT(mainWndClosed(PwM *))); |
105 | delete *i; | 106 | delete *i; |
106 | ++i; | 107 | ++i; |
107 | } | 108 | } |
108 | _mainWndList.clear(); | 109 | _mainWndList.clear(); |
109 | // close all remaining open documents | 110 | // close all remaining open documents |
110 | PwMDocList *_dl = PwMDoc::getOpenDocList(); | 111 | PwMDocList *_dl = PwMDoc::getOpenDocList(); |
111 | vector<PwMDocList::listItem> dl = *(_dl->getList()); | 112 | vector<PwMDocList::listItem> dl = *(_dl->getList()); |
112 | vector<PwMDocList::listItem>::iterator i2 = dl.begin(), | 113 | vector<PwMDocList::listItem>::iterator i2 = dl.begin(), |
113 | end2 = dl.end(); | 114 | end2 = dl.end(); |
114 | while (i2 != end2) { | 115 | while (i2 != end2) { |
115 | delete (*i2).doc; | 116 | delete (*i2).doc; |
116 | ++i2; | 117 | ++i2; |
117 | } | 118 | } |
118 | 119 | ||
119 | #ifdef CONFIG_KWALLETIF | 120 | #ifdef CONFIG_KWALLETIF |
120 | delete_ifnot_null(_kwalletEmu); | 121 | delete_ifnot_null(_kwalletEmu); |
121 | #endif // CONFIG_KWALLETIF | 122 | #endif // CONFIG_KWALLETIF |
122 | #ifdef CONFIG_KEYCARD | 123 | #ifdef CONFIG_KEYCARD |
123 | delete_ifnot_null(_keycard); | 124 | delete_ifnot_null(_keycard); |
124 | #endif // CONFIG_KEYCARD | 125 | #endif // CONFIG_KEYCARD |
125 | delete_ifnot_null(_tray); | 126 | delete_ifnot_null(_tray); |
126 | 127 | ||
127 | Randomizer::cleanup(); | 128 | Randomizer::cleanup(); |
128 | #ifndef PWM_EMBEDDED | 129 | #ifndef PWM_EMBEDDED |
129 | Configuration::cleanup(); | 130 | Configuration::cleanup(); |
130 | #endif | 131 | #endif |
131 | } | 132 | } |
132 | 133 | ||
133 | void PwMInit::initializeApp() | 134 | void PwMInit::initializeApp() |
134 | { | 135 | { |
135 | //qDebug("PwMInit::initializeApp() "); | 136 | //qDebug("PwMInit::initializeApp() "); |
136 | PWM_ASSERT(runStatus == unknown); | 137 | PWM_ASSERT(runStatus == unknown); |
137 | runStatus = init; | 138 | runStatus = init; |
138 | initPosixSignalHandler(); | 139 | initPosixSignalHandler(); |
139 | Randomizer::init(); | 140 | Randomizer::init(); |
140 | #ifndef PWM_EMBEDDED | 141 | #ifndef PWM_EMBEDDED |
141 | Configuration::init(); | 142 | Configuration::init(); |
142 | #endif | 143 | #endif |
143 | initDCOP(); | 144 | initDCOP(); |
144 | initKWalletEmu(); | 145 | initKWalletEmu(); |
145 | initKeycard(); | 146 | initKeycard(); |
146 | initTray(); | 147 | initTray(); |
147 | handleCmdLineArgs(); | 148 | handleCmdLineArgs(); |
148 | bool openDeeplocked = false; | 149 | bool openDeeplocked = false; |
149 | if (conf()->confGlobAutostartDeepLocked() || | 150 | if (conf()->confGlobAutostartDeepLocked() || |
150 | savedCmd.open_deeplocked) | 151 | savedCmd.open_deeplocked) |
151 | openDeeplocked = true; | 152 | openDeeplocked = true; |
152 | if ( false ){ | 153 | if ( false ){ |
153 | // LR is not working | 154 | // LR is not working |
154 | //if (conf()->confWndAutoMinimizeOnStart() || | 155 | //if (conf()->confWndAutoMinimizeOnStart() || |
155 | // savedCmd.minToTray) { | 156 | // savedCmd.minToTray) { |
156 | PwMDoc *newDoc = createDoc(); | 157 | PwMDoc *newDoc = createDoc(); |
157 | qDebug(" createDoc()"); | 158 | qDebug(" createDoc()"); |
158 | if (!newDoc->openDocUi(newDoc, | 159 | if (!newDoc->openDocUi(newDoc, |
159 | conf()->confGlobAutoStart(), | 160 | conf()->confGlobAutoStart(), |
160 | openDeeplocked)) { | 161 | openDeeplocked)) { |
161 | delete newDoc; | 162 | delete newDoc; |
162 | } | 163 | } |
163 | 164 | ||
164 | //US ENH for embedded devices: in the case of failure, open a document the default way | 165 | //US ENH for embedded devices: in the case of failure, open a document the default way |
165 | createMainWnd(conf()->confGlobAutoStart(), | 166 | createMainWnd(conf()->confGlobAutoStart(), |
166 | openDeeplocked, | 167 | openDeeplocked, |
167 | true, | 168 | true, |
168 | 0, | 169 | 0, |
169 | savedCmd.minimized); | 170 | savedCmd.minimized); |
170 | 171 | ||
171 | 172 | ||
172 | 173 | ||
173 | 174 | ||
174 | //} | 175 | //} |
175 | } else { | 176 | } else { |
176 | createMainWnd(conf()->confGlobAutoStart(), | 177 | createMainWnd(conf()->confGlobAutoStart(), |
177 | openDeeplocked, | 178 | openDeeplocked, |
178 | true, | 179 | true, |
179 | 0, | 180 | 0, |
180 | savedCmd.minimized); | 181 | savedCmd.minimized); |
181 | } | 182 | } |
182 | |||
183 | runStatus = running; | 183 | runStatus = running; |
184 | } | 184 | } |
185 | 185 | ||
186 | void PwMInit::shutdownApp(int exitStatus) | 186 | void PwMInit::shutdownApp(int exitStatus) |
187 | { | 187 | { |
188 | printDebug(string("PwMInit::shutdownApp(") | 188 | printDebug(string("PwMInit::shutdownApp(") |
189 | + tostr(exitStatus) + ") called."); | 189 | + tostr(exitStatus) + ") called."); |
190 | PWM_ASSERT((runStatus == running) || (runStatus == init)); | 190 | PWM_ASSERT((runStatus == running) || (runStatus == init)); |
191 | runStatus = shutdown; | 191 | runStatus = shutdown; |
192 | QApplication::exit(exitStatus); | 192 | QApplication::exit(exitStatus); |
193 | /* The destructor of PwMInit is called when control | 193 | /* The destructor of PwMInit is called when control |
194 | * leaves main() | 194 | * leaves main() |
195 | */ | 195 | */ |
196 | } | 196 | } |
197 | 197 | ||
198 | void PwMInit::initPosixSignalHandler() | 198 | void PwMInit::initPosixSignalHandler() |
199 | { | 199 | { |
200 | signal(SIGINT, sig_handler); | 200 | signal(SIGINT, sig_handler); |
201 | signal(SIGTERM, sig_handler); | 201 | signal(SIGTERM, sig_handler); |
202 | } | 202 | } |
203 | 203 | ||
204 | void PwMInit::initDCOP() | 204 | void PwMInit::initDCOP() |
205 | { | 205 | { |
206 | #ifndef PWM_EMBEDDED | 206 | #ifndef PWM_EMBEDDED |
207 | _dcopClient = app->dcopClient(); | 207 | _dcopClient = app->dcopClient(); |
208 | _dcopClient->setNotifications(true); | 208 | _dcopClient->setNotifications(true); |
209 | #endif | 209 | #endif |
210 | 210 | ||
211 | } | 211 | } |
212 | 212 | ||
213 | void PwMInit::initKWalletEmu(bool forceDisable, bool forceReload) | 213 | void PwMInit::initKWalletEmu(bool forceDisable, bool forceReload) |
214 | { | 214 | { |
215 | #ifdef CONFIG_KWALLETIF | 215 | #ifdef CONFIG_KWALLETIF |
216 | if (!conf()->confGlobKwalletEmu() || | 216 | if (!conf()->confGlobKwalletEmu() || |
217 | forceDisable) { | 217 | forceDisable) { |
218 | delete_ifnot_null(_kwalletEmu); | 218 | delete_ifnot_null(_kwalletEmu); |
219 | return; | 219 | return; |
220 | } | 220 | } |
221 | try { | 221 | try { |
222 | if (_kwalletEmu && forceReload) | 222 | if (_kwalletEmu && forceReload) |
223 | delete_and_null(_kwalletEmu); | 223 | delete_and_null(_kwalletEmu); |
224 | if (!_kwalletEmu) | 224 | if (!_kwalletEmu) |
225 | _kwalletEmu = new KWalletEmu(this); | 225 | _kwalletEmu = new KWalletEmu(this); |
226 | } catch (PwMException e) { | 226 | } catch (PwMException e) { |
227 | string errMsg("initializing KWallet emulation failed. ID: "); | 227 | string errMsg("initializing KWallet emulation failed. ID: "); |
228 | errMsg += tostr(static_cast<int>(e.getId())); | 228 | errMsg += tostr(static_cast<int>(e.getId())); |
229 | errMsg += " err-message: "; | 229 | errMsg += " err-message: "; |
230 | errMsg += e.getMessage(); | 230 | errMsg += e.getMessage(); |
@@ -277,205 +277,214 @@ void PwMInit::initTray() | |||
277 | end = dl->end(); | 277 | end = dl->end(); |
278 | while (i != end) { | 278 | while (i != end) { |
279 | _tray->connectDocToTray((*i).doc); | 279 | _tray->connectDocToTray((*i).doc); |
280 | ++i; | 280 | ++i; |
281 | } | 281 | } |
282 | } | 282 | } |
283 | 283 | ||
284 | void PwMInit::removeTrayAndQuit() | 284 | void PwMInit::removeTrayAndQuit() |
285 | { | 285 | { |
286 | PWM_ASSERT(_tray); | 286 | PWM_ASSERT(_tray); |
287 | // _tray is deleted in ~PwMInit | 287 | // _tray is deleted in ~PwMInit |
288 | shutdownApp(0); | 288 | shutdownApp(0); |
289 | } | 289 | } |
290 | 290 | ||
291 | PwM * PwMInit::createMainWnd(const QString &loadFile, | 291 | PwM * PwMInit::createMainWnd(const QString &loadFile, |
292 | bool loadFileDeepLocked, | 292 | bool loadFileDeepLocked, |
293 | bool virginity, | 293 | bool virginity, |
294 | PwMDoc *doc, | 294 | PwMDoc *doc, |
295 | bool minimized) | 295 | bool minimized) |
296 | { | 296 | { |
297 | PwM *newWnd; | 297 | PwM *newWnd; |
298 | if (!doc) | 298 | if (!doc) |
299 | doc = createDoc(); | 299 | doc = createDoc(); |
300 | newWnd = new PwM(this, doc, virginity); | 300 | newWnd = new PwM(this, doc, virginity); |
301 | #ifndef PWM_EMBEDDED | 301 | #ifndef PWM_EMBEDDED |
302 | _mainWndList.push_back(newWnd); | 302 | _mainWndList.push_back(newWnd); |
303 | #else | 303 | #else |
304 | _mainWndList.append(newWnd); | 304 | _mainWndList.append(newWnd); |
305 | #endif | 305 | #endif |
306 | connect(newWnd, SIGNAL(closed(PwM *)), | 306 | connect(newWnd, SIGNAL(closed(PwM *)), |
307 | this, SLOT(mainWndClosed(PwM *))); | 307 | this, SLOT(mainWndClosed(PwM *))); |
308 | connect(newWnd, SIGNAL(gotFocus(PwM *)), | 308 | connect(newWnd, SIGNAL(gotFocus(PwM *)), |
309 | this, SLOT(setCurWidget(PwM *))); | 309 | this, SLOT(setCurWidget(PwM *))); |
310 | connect(newWnd, SIGNAL(lostFocus(PwM *)), | 310 | connect(newWnd, SIGNAL(lostFocus(PwM *)), |
311 | this, SLOT(resetCurWidget())); | 311 | this, SLOT(resetCurWidget())); |
312 | 312 | ||
313 | //US ENH | 313 | //US ENH |
314 | #ifndef PWM_EMBEDDED | 314 | #ifndef PWM_EMBEDDED |
315 | if (minimized) | 315 | if (minimized) |
316 | newWnd->showMinimized(); | 316 | newWnd->showMinimized(); |
317 | else | 317 | else |
318 | newWnd->show(); | 318 | newWnd->show(); |
319 | 319 | ||
320 | #else //PWM_EMBEDDED | 320 | #else //PWM_EMBEDDED |
321 | 321 | ||
322 | #ifndef DESKTOP_VERSION | 322 | #ifndef DESKTOP_VERSION |
323 | app->showMainWidget( newWnd ); | 323 | app->showMainWidget( newWnd ); |
324 | #else //DESKTOP_VERSION | 324 | #else //DESKTOP_VERSION |
325 | app->setMainWidget( newWnd ); | ||
326 | newWnd->resize (640, 480 ); | 325 | newWnd->resize (640, 480 ); |
327 | newWnd->show(); | 326 | newWnd->show(); |
328 | qDebug("show "); | ||
329 | #endif //DESKTOP_VERSION | 327 | #endif //DESKTOP_VERSION |
330 | 328 | ||
331 | #endif //PWM_EMBEDDED | 329 | #endif //PWM_EMBEDDED |
332 | 330 | ||
333 | if (loadFile != QString::null && | 331 | if (loadFile != QString::null && |
334 | loadFile != "") { | 332 | loadFile != "") { |
335 | newWnd->openDoc(loadFile, loadFileDeepLocked); | 333 | newWnd->openDoc(loadFile, loadFileDeepLocked); |
336 | } | 334 | } |
337 | return newWnd; | 335 | return newWnd; |
338 | } | 336 | } |
339 | 337 | ||
340 | PwMDoc * PwMInit::createDoc() | 338 | PwMDoc * PwMInit::createDoc() |
341 | { | 339 | { |
342 | PwMDoc *doc = new PwMDoc(this); | 340 | PwMDoc *doc = new PwMDoc(this); |
343 | #ifdef CONFIG_KEYCARD | 341 | #ifdef CONFIG_KEYCARD |
344 | doc->setPwMKeyCard(keycard()); | 342 | doc->setPwMKeyCard(keycard()); |
345 | #endif | 343 | #endif |
346 | #ifdef CONFIG_KWALLETIF | 344 | #ifdef CONFIG_KWALLETIF |
347 | if (kwalletEmu()) | 345 | if (kwalletEmu()) |
348 | kwalletEmu()->connectDocSignals(doc); | 346 | kwalletEmu()->connectDocSignals(doc); |
349 | #endif | 347 | #endif |
350 | 348 | ||
351 | if (_tray) | 349 | if (_tray) |
352 | _tray->connectDocToTray(doc); | 350 | _tray->connectDocToTray(doc); |
353 | 351 | ||
354 | return doc; | 352 | return doc; |
355 | 353 | ||
356 | } | 354 | } |
357 | 355 | ||
358 | void PwMInit::mainWndClosed(PwM *wnd) | 356 | void PwMInit::mainWndClosed(PwM *wnd) |
359 | { | 357 | { |
360 | bool doMinimizeToTray = false; | 358 | bool doMinimizeToTray = false; |
361 | bool doDeleteDoc = false; | 359 | bool doDeleteDoc = false; |
362 | #ifndef PWM_EMBEDDED | 360 | #ifndef PWM_EMBEDDED |
363 | dcopClient()->suspend(); | 361 | dcopClient()->suspend(); |
364 | dcopClient()->setAcceptCalls(false); | 362 | dcopClient()->setAcceptCalls(false); |
365 | #endif | 363 | #endif |
366 | again: | 364 | again: |
367 | 365 | ||
368 | if (wnd->isForceMinimizeToTray()) { | 366 | if (wnd->isForceMinimizeToTray()) { |
369 | if (unlikely(!_tray)) { | 367 | if (unlikely(!_tray)) { |
370 | /* This should not happen! If we set forceMinimizeToTray , | 368 | /* This should not happen! If we set forceMinimizeToTray , |
371 | * we must be sure that _tray exists. | 369 | * we must be sure that _tray exists. |
372 | */ | 370 | */ |
373 | BUG(); | 371 | BUG(); |
374 | wnd->setForceMinimizeToTray(false); | 372 | wnd->setForceMinimizeToTray(false); |
375 | goto again; | 373 | goto again; |
376 | } | 374 | } |
377 | doMinimizeToTray = true; | 375 | doMinimizeToTray = true; |
378 | } else { | 376 | } else { |
379 | // Ask to minimize to tray. If not, delete doc. | 377 | // Ask to minimize to tray. If not, delete doc. |
380 | if (_tray && | 378 | if (_tray && |
381 | runStatus != shutdown && | 379 | runStatus != shutdown && |
382 | !wnd->isForceQuit() && | 380 | !wnd->isForceQuit() && |
383 | !wnd->curDoc()->isDeleted()) { | 381 | !wnd->curDoc()->isDeleted()) { |
384 | if (conf()->confWndClose()) | 382 | if (conf()->confWndClose()) |
385 | doDeleteDoc = true; | 383 | doDeleteDoc = true; |
386 | else | 384 | else |
387 | doMinimizeToTray = true; | 385 | doMinimizeToTray = true; |
388 | } else { | 386 | } else { |
389 | doDeleteDoc = true; | 387 | doDeleteDoc = true; |
390 | } | 388 | } |
391 | } | 389 | } |
392 | 390 | ||
393 | if (doMinimizeToTray) { | 391 | if (doMinimizeToTray) { |
394 | 392 | qDebug("doMinimizeToTray "); | |
395 | PWM_ASSERT(_tray); | 393 | PWM_ASSERT(_tray); |
396 | int mmlock = conf()->confGlobMinimizeLock(); | 394 | int mmlock = conf()->confGlobMinimizeLock(); |
397 | switch (mmlock) { | 395 | switch (mmlock) { |
398 | case 0: // don't lock anything | 396 | case 0: // don't lock anything |
399 | break; | 397 | break; |
400 | case 1: // normal lock | 398 | case 1: // normal lock |
401 | wnd->curDoc()->lockAll(true); | 399 | wnd->curDoc()->lockAll(true); |
402 | break; | 400 | break; |
403 | case 2: // deep-lock | 401 | case 2: // deep-lock |
404 | wnd->curDoc()->deepLock(); | 402 | wnd->curDoc()->deepLock(); |
405 | break; | 403 | break; |
406 | default: | 404 | default: |
407 | WARN(); | 405 | WARN(); |
408 | } | 406 | } |
409 | } else if (doDeleteDoc) { | 407 | } else if (doDeleteDoc) { |
408 | qDebug("doDeleteDoc "); | ||
410 | if (!wnd->curDoc()->tryDelete()) { | 409 | if (!wnd->curDoc()->tryDelete()) { |
411 | /* We failed deleting the doc, | 410 | /* We failed deleting the doc, |
412 | * so open a new window with it, again. | 411 | * so open a new window with it, again. |
413 | */ | 412 | */ |
414 | createMainWnd(QString::null, false, | 413 | createMainWnd(QString::null, false, |
415 | false, wnd->curDoc()); | 414 | false, wnd->curDoc()); |
416 | } | 415 | } |
417 | } | 416 | } |
418 | #ifndef PWM_EMBEDDED | 417 | #ifndef PWM_EMBEDDED |
419 | // find the closed window in the "mainWndList" and delete it. | 418 | // find the closed window in the "mainWndList" and delete it. |
420 | QValueList<PwM *>::iterator i = _mainWndList.begin(), | 419 | QValueList<PwM *>::iterator i = _mainWndList.begin(), |
421 | end = _mainWndList.end(); | 420 | end = _mainWndList.end(); |
422 | #else | 421 | #else |
423 | // find the closed window in the "mainWndList" and delete it. | 422 | // find the closed window in the "mainWndList" and delete it. |
424 | QValueList<PwM *>::Iterator i = _mainWndList.begin(), | 423 | QValueList<PwM *>::Iterator i = _mainWndList.begin(), |
425 | end = _mainWndList.end(); | 424 | end = _mainWndList.end(); |
426 | #endif | 425 | #endif |
427 | while (i != end) { | 426 | while (i != end) { |
428 | if (*i == wnd) { | 427 | if (*i == wnd) { |
429 | #ifndef PWM_EMBEDDED | 428 | #ifndef PWM_EMBEDDED |
430 | _mainWndList.erase(i); | 429 | _mainWndList.erase(i); |
431 | #else | 430 | #else |
432 | _mainWndList.remove(i); | 431 | _mainWndList.remove(i); |
433 | #endif | 432 | #endif |
433 | |||
434 | if ( app->mainWidget() == wnd ) { | ||
435 | if ( _mainWndList.count() ) { | ||
436 | #ifndef DESKTOP_VERSION | ||
437 | app->showMainWidget(_mainWndList.first() ); | ||
438 | #endif //DESKTOP_VERSION | ||
439 | |||
440 | } | ||
441 | } | ||
442 | delete wnd; | ||
434 | goto out_success; | 443 | goto out_success; |
435 | } | 444 | } |
436 | ++i; | 445 | ++i; |
437 | } | 446 | } |
438 | BUG(); | 447 | BUG(); |
439 | out_success: | 448 | out_success: |
440 | #ifndef PWM_EMBEDDED | 449 | #ifndef PWM_EMBEDDED |
441 | if (!_mainWndList.size()) | 450 | if (!_mainWndList.size()) |
442 | #else | 451 | #else |
443 | if (!_mainWndList.count()) | 452 | if (!_mainWndList.count()) |
444 | #endif | 453 | #endif |
445 | 454 | ||
446 | { | 455 | { |
447 | /* If there's no main window and no tray icon | 456 | /* If there's no main window and no tray icon |
448 | * left, we have no user interface, so we can | 457 | * left, we have no user interface, so we can |
449 | * shut down the application. | 458 | * shut down the application. |
450 | */ | 459 | */ |
451 | if (!_tray) { | 460 | if (!_tray) { |
452 | #ifndef PWM_EMBEDDED | 461 | #ifndef PWM_EMBEDDED |
453 | dcopClient()->setAcceptCalls(true); | 462 | dcopClient()->setAcceptCalls(true); |
454 | dcopClient()->resume(); | 463 | dcopClient()->resume(); |
455 | #endif | 464 | #endif |
456 | shutdownApp(0); | 465 | shutdownApp(0); |
457 | return; | 466 | return; |
458 | } | 467 | } |
459 | /* There is no widget left, so set | 468 | /* There is no widget left, so set |
460 | * _curWidget to 0 | 469 | * _curWidget to 0 |
461 | */ | 470 | */ |
462 | resetCurWidget(); | 471 | resetCurWidget(); |
463 | } | 472 | } |
464 | #ifndef PWM_EMBEDDED | 473 | #ifndef PWM_EMBEDDED |
465 | dcopClient()->setAcceptCalls(true); | 474 | dcopClient()->setAcceptCalls(true); |
466 | dcopClient()->resume(); | 475 | dcopClient()->resume(); |
467 | #endif | 476 | #endif |
468 | } | 477 | } |
469 | 478 | ||
470 | void PwMInit::trayIconClosed(PwMTray *tray) | 479 | void PwMInit::trayIconClosed(PwMTray *tray) |
471 | { | 480 | { |
472 | if (runStatus != running) | 481 | if (runStatus != running) |
473 | return; | 482 | return; |
474 | PARAM_UNUSED(tray); | 483 | PARAM_UNUSED(tray); |
475 | PWM_ASSERT(tray == _tray); | 484 | PWM_ASSERT(tray == _tray); |
476 | /* If there's no main wnd left we have to | 485 | /* If there's no main wnd left we have to |
477 | * shutdown the app (same as in mainWndClosed()) | 486 | * shutdown the app (same as in mainWndClosed()) |
478 | */ | 487 | */ |
479 | #ifndef PWM_EMBEDDED | 488 | #ifndef PWM_EMBEDDED |
480 | if (!_mainWndList.size()) | 489 | if (!_mainWndList.size()) |
481 | shutdownApp(0); | 490 | shutdownApp(0); |