summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile613
-rw-r--r--microkde/kdeui/kmainwindow.cpp1
-rw-r--r--microkde/kdeui/kmainwindow.h5
-rw-r--r--pwmanager/pwmanager/getmasterpwwnd_emb.cpp2
-rw-r--r--pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp4
-rw-r--r--pwmanager/pwmanager/libgcryptif.cpp5
-rw-r--r--pwmanager/pwmanager/main.cpp1
-rw-r--r--pwmanager/pwmanager/pwm.cpp10
-rw-r--r--pwmanager/pwmanager/pwmdoc.cpp1
-rw-r--r--pwmanager/pwmanager/pwmdocui.cpp15
-rw-r--r--pwmanager/pwmanager/pwminit.cpp17
11 files changed, 296 insertions, 378 deletions
diff --git a/Makefile b/Makefile
index da5feba..19e1685 100644
--- a/Makefile
+++ b/Makefile
@@ -1,362 +1,253 @@
1export KDEPIMDIR = $(shell pwd) 1#############################################################################
2 2# Makefile for building: kdepim-desktop
3export 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
5ifeq ($(PLATFORM) , zaurus) 5# Template: subdirs
6 BUILD_NO_LDAP_PLUGIN=1 6# Command: $(QMAKE) -o Makefile kdepim-desktop.pro
7endif 7#############################################################################
8 8
9ifneq ($(PLATFORM) , zaurus) 9 MAKEFILE =Makefile
10 BUILD_NO_SHARP_PLUGIN=1 10 QMAKE =qmake
11endif 11DEL_FILE = rm -f
12 12CHK_DIR_EXISTS= test -d
13SUBDIRS_MICROKDE = \ 13MKDIR = 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 \
28SUBDIRS_QTOPIA_PLUGIN = \ 28 sub-pwmanager-libcrypt-cipher \
29 kabc/plugins/qtopia 29 sub-pwmanager-libcrypt-error \
30 30 sub-pwmanager-libcrypt-mpi \
31SUBDIRS_OPIE_PLUGIN = \ 31 sub-pwmanager-libcrypt-zlib \
32 kabc/plugins/opie 32 sub-pwmanager-pwmanager
33 33
34SUBDIRS_SHARP_PLUGIN = \ 34first: all
35 kabc/plugins/sharpdtm 35
36 36all: Makefile $(SUBTARGETS)
37SUBDIRS_LDAP_PLUGIN = \ 37
38 kabc/plugins/ldap 38gammu/emb/common/$(MAKEFILE):
39 39 @$(CHK_DIR_EXISTS) "gammu/emb/common" || $(MKDIR) "gammu/emb/common"
40SUBDIRS_MICROMAIL = \ 40 cd gammu/emb/common && $(QMAKE) common.pro -o $(MAKEFILE)
41 kmicromail/libetpan \ 41sub-gammu-emb-common: gammu/emb/common/$(MAKEFILE) FORCE
42 kmicromail/libmailwrapper \ 42 cd gammu/emb/common && $(MAKE) -f $(MAKEFILE)
43 kmicromail 43
44 44gammu/emb/gammu/$(MAKEFILE):
45SUBDIRS_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 47sub-gammu-emb-gammu: gammu/emb/gammu/$(MAKEFILE) FORCE
48 48 cd gammu/emb/gammu && $(MAKE) -f $(MAKEFILE)
49SUBDIRS_PWMANAGER = \ 49
50 pwmanager/libcrypt/mpi \ 50libical/$(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 \ 53sub-libical: libical/$(MAKEFILE) FORCE
54 pwmanager/pwmanager 54 cd libical && $(MAKE) -f $(MAKEFILE)
55 55
56SUBDIRS = \ 56libkcal/$(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) \ 59sub-libkcal: libkcal/$(MAKEFILE) FORCE
60 $(SUBDIRS_SHARP_PLUGIN) \ 60 cd libkcal && $(MAKE) -f $(MAKEFILE)
61 $(SUBDIRS_LDAP_PLUGIN) \ 61
62 $(SUBDIRS_MICROMAIL) \ 62microkde/$(MAKEFILE):
63 $(SUBDIRS_GAMMU) \ 63 @$(CHK_DIR_EXISTS) "microkde" || $(MKDIR) "microkde"
64 $(SUBDIRS_PWMANAGER) 64 cd microkde && $(QMAKE) microkde.pro -o $(MAKEFILE)
65 65sub-microkde: microkde/$(MAKEFILE) FORCE
66 66 cd microkde && $(MAKE) -f $(MAKEFILE)
67all: build_microkde \ 67
68 build_qtopia_plugin \ 68libkdepim/$(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 \ 71sub-libkdepim: libkdepim/$(MAKEFILE) FORCE
72 build_micromail \ 72 cd libkdepim && $(MAKE) -f $(MAKEFILE)
73 build_gammu \ 73
74 build_pwmanager 74kabc/$(MAKEFILE):
75 75 @$(CHK_DIR_EXISTS) "kabc" || $(MKDIR) "kabc"
76 76 cd kabc && $(QMAKE) kabc.pro -o $(MAKEFILE)
77build_microkde: variable_test tmake 77sub-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 80korganizer/$(MAKEFILE):
81 81 @$(CHK_DIR_EXISTS) "korganizer" || $(MKDIR) "korganizer"
82build_qtopia_plugin: build_microkde 82 cd korganizer && $(QMAKE) korganizer.pro -o $(MAKEFILE)
83 ifdef BUILD_NO_QTOPIA_PLUGIN 83sub-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; \ 86kaddressbook/$(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 89sub-kaddressbook: kaddressbook/$(MAKEFILE) FORCE
90 90 cd kaddressbook && $(MAKE) -f $(MAKEFILE)
91build_opie_plugin: build_microkde 91
92 ifdef BUILD_NO_OPIE_PLUGIN 92kabc/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; \ 95sub-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 98kabc/plugins/dir/$(MAKEFILE):
99 99 @$(CHK_DIR_EXISTS) "kabc/plugins/dir" || $(MKDIR) "kabc/plugins/dir"
100build_sharp_plugin: build_microkde 100 cd kabc/plugins/dir && $(QMAKE) dir.pro -o $(MAKEFILE)
101 ifdef BUILD_NO_SHARP_PLUGIN 101sub-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; \ 104kabc/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 107sub-kabc-plugins-file: kabc/plugins/file/$(MAKEFILE) FORCE
108 108 cd kabc/plugins/file && $(MAKE) -f $(MAKEFILE)
109build_ldap_plugin: build_microkde 109
110 ifdef BUILD_NO_LDAP_PLUGIN 110kabc/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; \ 113sub-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 116pwmanager/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)
119build_micromail: build_microkde 119sub-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 122pwmanager/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 125sub-pwmanager-libcrypt-error: pwmanager/libcrypt/error/$(MAKEFILE) FORCE
126 endif 126 cd pwmanager/libcrypt/error && $(MAKE) -f $(MAKEFILE)
127 127
128build_gammu: variable_test tmake 128pwmanager/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 131sub-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 134pwmanager/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)
137build_pwmanager: build_microkde 137sub-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 140pwmanager/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 143sub-pwmanager-pwmanager: pwmanager/pwmanager/$(MAKEFILE) FORCE
144 endif 144 cd pwmanager/pwmanager && $(MAKE) -f $(MAKEFILE)
145 145
146 146Makefile: kdepim-desktop.pro /usr/lib/qt3/mkspecs/default/qmake.conf
147variable_info: 147 $(QMAKE) -o Makefile kdepim-desktop.pro
148 @echo -------------------------------------- 148qmake: qmake_all
149 @echo KDEPIM buildsystem, variableinfo... 149 @$(QMAKE) -o Makefile kdepim-desktop.pro
150 @echo KDEPIMDIR=$(KDEPIMDIR) 150
151 @echo QTDIR=$(QTDIR) 151all: $(SUBTARGETS)
152 @echo QPEDIR=$(QPEDIR) 152qmake_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
168variable_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. 171clean 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 190uninstall_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
207objects: 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 209install_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
213clean: 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
220install: 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 228distclean: qmake_all FORCE
229 229 ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
230dist: 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 248install: install_subdirs
249 249
250tmake: objects \ 250uninstall: uninstall_subdirs
251 qtcompat/Makefile$(PLATFORM) \ 251
252 microkde/Makefile$(PLATFORM) \ 252FORCE:
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
279qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro
280 cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtcompat.pro -o Makefile$(PLATFORM)
281
282microkde/Makefile$(PLATFORM): microkde/microkdeE.pro
283 cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" microkdeE.pro -o Makefile$(PLATFORM)
284
285libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro
286 cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkcalE.pro -o Makefile$(PLATFORM)
287
288
289libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro
290 cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkdepimE.pro -o Makefile$(PLATFORM)
291
292kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro
293 cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kalarmdE.pro -o Makefile$(PLATFORM)
294
295korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro
296 cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" korganizerE.pro -o Makefile$(PLATFORM)
297
298libical/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
301libical/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
304kabc/Makefile$(PLATFORM): kabc/kabcE.pro
305 cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcE.pro -o Makefile$(PLATFORM)
306
307kabc/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
310kabc/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
313kabc/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
316kabc/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
319kabc/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
322kabc/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
325kabc/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
328kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro
329 cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kaddressbookE.pro -o Makefile$(PLATFORM)
330
331kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro
332 cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kmicromailE.pro -o Makefile$(PLATFORM)
333
334kmicromail/libetpan/Makefile$(PLATFORM): kmicromail/libetpan/libetpanE.pro
335 cd kmicromail/libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libetpanE.pro -o Makefile$(PLATFORM)
336
337kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro
338 cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libmailwrapperE.pro -o Makefile$(PLATFORM)
339
340gammu/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
343gammu/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
346pwmanager/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
350pwmanager/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
353pwmanager/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
356pwmanager/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
359pwmanager/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
@@ -279,48 +279,49 @@ void KMainWindow::setPlainCaption( const QString &caption )
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
287void KMainWindow::slotStateChanged(const QString &newstate) 287void 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 */
295void KMainWindow::slotStateChanged(const QString &newstate, 295void 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
301void KMainWindow::closeEvent ( QCloseEvent *e ) 301void 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();
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
@@ -42,79 +42,80 @@ class KAccel;
42class KToolBarMenuAction; 42class KToolBarMenuAction;
43*/ 43*/
44 44
45class QMenuBar; 45class QMenuBar;
46class QStatusBar; 46class QStatusBar;
47class KMainWindowPrivate; 47class KMainWindowPrivate;
48class KAction; 48class 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
56class KActionCollection; 56class KActionCollection;
57 57
58class KMainWindow : public QMainWindow, virtual public KXMLGUIClient 58class KMainWindow : public QMainWindow, virtual public KXMLGUIClient
59{ 59{
60 Q_OBJECT 60 Q_OBJECT
61 61
62private: 62private:
63//US create private defaultconstructor 63//US create private defaultconstructor
64 KMainWindow() {;}; 64 KMainWindow() {;};
65 65
66public: 66
67public: 67public:
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 *
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
@@ -105,49 +105,49 @@ getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name)
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 */
136getMasterPwWnd::~getMasterPwWnd() 136getMasterPwWnd::~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
141void getMasterPwWnd::okButton_slot() 141void 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
146void getMasterPwWnd::cancelButton_slot() 146void 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
151void getMasterPwWnd::add0() 151void getMasterPwWnd::add0()
152{ 152{
153 addCharacter("0"); 153 addCharacter("0");
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
@@ -127,55 +127,55 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n
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;
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
@@ -418,32 +418,37 @@ void LibGCryptIf::padData(unsigned char *buf,
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
435void LibGCryptIf::unpadData(const unsigned char *buf, 435void 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
@@ -188,32 +188,33 @@ int main(int argc, char *argv[])
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
@@ -172,53 +172,55 @@ PwM::PwM(PwMInit *_init, PwMDoc *doc,
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
194PwM::~PwM() 194PwM::~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
206void PwM::initMenubar() 208void 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
@@ -866,53 +868,57 @@ void PwM::config_slot()
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
883void PwM::activateMpButton(bool activate) 885void 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
888void PwM::closeEvent(QCloseEvent *e) 890void 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
893void PwM::docClosed(PwMDoc *doc) 898void 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
900void PwM::find_slot() 906void 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
913void PwM::exportToText() 919void 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
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
@@ -2956,48 +2956,49 @@ QString PwMDoc::getTitle()
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
2978bool PwMDoc::tryDelete() 2978bool 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 }
2994out_accept: 2995out_accept:
2995 deleted = true; 2996 deleted = true;
2996 delete this; 2997 delete this;
2997 return true; 2998 return true;
2998out_ignore: 2999out_ignore:
2999 return false; 3000 return false;
3000} 3001}
3001 3002
3002 3003
3003 3004
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
@@ -183,75 +183,78 @@ void PwMDocUi::noMpwMsgBox(bool chipcard, QString prefix, QString postfix)
183void PwMDocUi::rootAlertMsgBox() 183void 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
192void PwMDocUi::cantDeeplock_notSavedMsgBox() 192void 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
201void PwMDocUi::gpmPwLenErrMsgBox() 201void PwMDocUi::gpmPwLenErrMsgBox()
202{ 202{
203 KMessageBox::error(currentView, 203 KMessageBox::error(currentView,
204 i18n("GPasman does not support passwords\n" 204 i18n("GPasman does not support passwords\n"
205 "shorter than 4 characters! Please try\n" 205 "shorter than 4 characters! Please try\n"
206 "again with a longer password."), 206 "again with a longer password."),
207 i18n("password too short")); 207 i18n("Password too short"));
208} 208}
209 209
210int PwMDocUi::dirtyAskSave(const QString &docTitle) 210int PwMDocUi::dirtyAskSave(const QString &docTitle)
211{ 211{
212 int ret; 212 int ret;
213#ifndef PWM_EMBEDDED 213#ifndef PWM_EMBEDDED
214 ret = KMessageBox::questionYesNoCancel(currentView, 214 ret = KMessageBox::questionYesNoCancel(currentView,
215 i18n("The list \"") + 215 i18n("The list\n\"") +
216 docTitle + 216 docTitle +
217 i18n 217 i18n
218 ("\" has been modified.\n" 218 ("\" has been modified.\n"
219 "Do you want to save it?"), 219 "Do you want to save it?"),
220 i18n("save?")); 220 i18n("Save?"));
221 if (ret == KMessageBox::Yes) { 221 if (ret == KMessageBox::Yes) {
222 return 0; 222 return 0;
223 } else if (ret == KMessageBox::No) { 223 } else if (ret == KMessageBox::No) {
224 return 1; 224 return 1;
225 } 225 }
226#else 226#else
227 QString doc = docTitle;
228 if ( doc.length() > 33 )
229 doc = "..." + doc.right(30);
227 ret = KMessageBox::warningYesNoCancel(currentView, 230 ret = KMessageBox::warningYesNoCancel(currentView,
228 i18n("The list \"") + 231 i18n("The list\n \"") +
229 docTitle + 232 doc +
230 i18n 233 i18n
231 ("\"\nhas been modified.\n" 234 ("\"\nhas been modified.\n"
232 "Do you want to save it?"), 235 "Do you want to save it?"),
233 i18n("save?")); 236 i18n("Save?"));
234 if (ret == KMessageBox::Yes) { 237 if (ret == KMessageBox::Yes) {
235 return 0; 238 return 0;
236 } else if (ret == KMessageBox::No) { 239 } else if (ret == KMessageBox::No) {
237 return 1; 240 return 1;
238 } 241 }
239 242
240#endif 243#endif
241 244
242 // cancel 245 // cancel
243 return -1; 246 return -1;
244} 247}
245 248
246bool PwMDocUi::saveDocUi(PwMDoc *doc) 249bool 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;
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
@@ -67,48 +67,49 @@ static NOREGPARM void sig_handler(int signum)
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
77PwMInit::PwMInit(PwMApplication *_app) 77PwMInit::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
89PwMInit::~PwMInit() 89PwMInit::~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) {
@@ -158,49 +159,48 @@ void PwMInit::initializeApp()
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
186void PwMInit::shutdownApp(int exitStatus) 186void 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
198void PwMInit::initPosixSignalHandler() 198void 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
204void PwMInit::initDCOP() 204void PwMInit::initDCOP()
205{ 205{
206#ifndef PWM_EMBEDDED 206#ifndef PWM_EMBEDDED
@@ -301,52 +301,50 @@ PwM * PwMInit::createMainWnd(const QString &loadFile,
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
340PwMDoc * PwMInit::createDoc() 338PwMDoc * 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);
@@ -370,88 +368,99 @@ again:
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();
439out_success: 448out_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;