author | zautrix <zautrix> | 2005-04-15 09:18:49 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-15 09:18:49 (UTC) |
commit | ab47475f1b03a8c82f9b0388549a2618743f2a69 (patch) (unidiff) | |
tree | 381622b3ceb94daf771a2697ee10f0cd6572e947 | |
parent | acb5803cdda97ef1369388eb15eb669e2835c06a (diff) | |
download | kdepimpi-ab47475f1b03a8c82f9b0388549a2618743f2a69.zip kdepimpi-ab47475f1b03a8c82f9b0388549a2618743f2a69.tar.gz kdepimpi-ab47475f1b03a8c82f9b0388549a2618743f2a69.tar.bz2 |
fixxx
-rw-r--r-- | Makefile | 662 | ||||
-rw-r--r-- | korganizer/koeventviewer.cpp | 90 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 5 | ||||
-rw-r--r-- | libkcal/kincidenceformatter.cpp | 63 |
4 files changed, 376 insertions, 444 deletions
@@ -1,385 +1,279 @@ | |||
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.4) on: Fri Apr 15 10:15:45 2005 |
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 | #opie plugin is deprecated. The qtopia plugin handles the task from now on. | 13 | MKDIR = mkdir -p |
14 | BUILD_NO_OPIE_PLUGIN=1 | 14 | INSTALL_FILE= |
15 | 15 | INSTALL_DIR = | |
16 | SUBDIRS_MICROKDE = \ | 16 | SUBTARGETS = \ |
17 | libical/src/libical \ | 17 | sub-kabc-plugins-file \ |
18 | libical/src/libicalss \ | 18 | sub-kabc-plugins-dir \ |
19 | qtcompat \ | 19 | sub-kabc-plugins-qtopia \ |
20 | microkde \ | 20 | sub-libical \ |
21 | libkcal \ | 21 | sub-libkcal \ |
22 | libkdepim \ | 22 | sub-kabc \ |
23 | kabc \ | 23 | sub-libkdepim \ |
24 | kabc/formats/binary \ | 24 | sub-microkde \ |
25 | kabc/plugins/file \ | 25 | sub-korganizer \ |
26 | kabc/plugins/dir \ | 26 | sub-kaddressbook \ |
27 | korganizer \ | 27 | sub-gammu-emb-common \ |
28 | kalarmd \ | 28 | sub-gammu-emb-gammu \ |
29 | kaddressbook | 29 | sub-libetpan \ |
30 | 30 | sub-kmicromail-libmailwrapper \ | |
31 | SUBDIRS_QTOPIA_PLUGIN = \ | 31 | sub-kmicromail \ |
32 | kabc/plugins/qtopia | 32 | sub-pwmanager-libcrypt-cipher \ |
33 | 33 | sub-pwmanager-libcrypt-error \ | |
34 | SUBDIRS_OPIE_PLUGIN = \ | 34 | sub-pwmanager-libcrypt-mpi \ |
35 | kabc/plugins/opie | 35 | sub-pwmanager-libcrypt-zlib \ |
36 | 36 | sub-pwmanager-pwmanager | |
37 | SUBDIRS_SHARP_PLUGIN = \ | 37 | |
38 | kabc/plugins/sharpdtm | 38 | first: all |
39 | 39 | ||
40 | SUBDIRS_LDAP_PLUGIN = \ | 40 | all: Makefile $(SUBTARGETS) |
41 | kabc/plugins/ldap | 41 | |
42 | 42 | kabc/plugins/file/$(MAKEFILE): | |
43 | SUBDIRS_MICROMAIL = \ | 43 | @$(CHK_DIR_EXISTS) "kabc/plugins/file" || $(MKDIR) "kabc/plugins/file" |
44 | libetpan \ | 44 | cd kabc/plugins/file && $(QMAKE) file.pro -o $(MAKEFILE) |
45 | kmicromail/libmailwrapper \ | 45 | sub-kabc-plugins-file: kabc/plugins/file/$(MAKEFILE) FORCE |
46 | kmicromail | 46 | cd kabc/plugins/file && $(MAKE) -f $(MAKEFILE) |
47 | 47 | ||
48 | SUBDIRS_GAMMU = \ | 48 | kabc/plugins/dir/$(MAKEFILE): |
49 | gammu/emb/common \ | 49 | @$(CHK_DIR_EXISTS) "kabc/plugins/dir" || $(MKDIR) "kabc/plugins/dir" |
50 | gammu/emb/gammu | 50 | cd kabc/plugins/dir && $(QMAKE) dir.pro -o $(MAKEFILE) |
51 | 51 | sub-kabc-plugins-dir: kabc/plugins/dir/$(MAKEFILE) FORCE | |
52 | SUBDIRS_PWMANAGER = \ | 52 | cd kabc/plugins/dir && $(MAKE) -f $(MAKEFILE) |
53 | pwmanager/libcrypt/mpi \ | 53 | |
54 | pwmanager/libcrypt/error \ | 54 | kabc/plugins/qtopia/$(MAKEFILE): |
55 | pwmanager/libcrypt/cipher \ | 55 | @$(CHK_DIR_EXISTS) "kabc/plugins/qtopia" || $(MKDIR) "kabc/plugins/qtopia" |
56 | pwmanager/libcrypt/zlib \ | 56 | cd kabc/plugins/qtopia && $(QMAKE) qtopia.pro -o $(MAKEFILE) |
57 | pwmanager/pwmanager | 57 | sub-kabc-plugins-qtopia: kabc/plugins/qtopia/$(MAKEFILE) FORCE |
58 | 58 | cd kabc/plugins/qtopia && $(MAKE) -f $(MAKEFILE) | |
59 | SUBDIRS = \ | 59 | |
60 | $(SUBDIRS_MICROKDE) \ | 60 | libical/$(MAKEFILE): |
61 | $(SUBDIRS_QTOPIA_PLUGIN) \ | 61 | @$(CHK_DIR_EXISTS) "libical" || $(MKDIR) "libical" |
62 | $(SUBDIRS_OPIE_PLUGIN) \ | 62 | cd libical && $(QMAKE) libical.pro -o $(MAKEFILE) |
63 | $(SUBDIRS_SHARP_PLUGIN) \ | 63 | sub-libical: libical/$(MAKEFILE) FORCE |
64 | $(SUBDIRS_LDAP_PLUGIN) \ | 64 | cd libical && $(MAKE) -f $(MAKEFILE) |
65 | $(SUBDIRS_MICROMAIL) \ | 65 | |
66 | $(SUBDIRS_GAMMU) \ | 66 | libkcal/$(MAKEFILE): |
67 | $(SUBDIRS_PWMANAGER) | 67 | @$(CHK_DIR_EXISTS) "libkcal" || $(MKDIR) "libkcal" |
68 | 68 | cd libkcal && $(QMAKE) libkcal.pro -o $(MAKEFILE) | |
69 | 69 | sub-libkcal: libkcal/$(MAKEFILE) FORCE | |
70 | all: build_microkde \ | 70 | cd libkcal && $(MAKE) -f $(MAKEFILE) |
71 | build_qtopia_plugin \ | 71 | |
72 | build_opie_plugin \ | 72 | kabc/$(MAKEFILE): |
73 | build_sharp_plugin \ | 73 | @$(CHK_DIR_EXISTS) "kabc" || $(MKDIR) "kabc" |
74 | build_ldap_plugin \ | 74 | cd kabc && $(QMAKE) kabc.pro -o $(MAKEFILE) |
75 | build_micromail \ | 75 | sub-kabc: kabc/$(MAKEFILE) FORCE |
76 | build_gammu \ | 76 | cd kabc && $(MAKE) -f $(MAKEFILE) |
77 | build_pwmanager | 77 | |
78 | 78 | libkdepim/$(MAKEFILE): | |
79 | 79 | @$(CHK_DIR_EXISTS) "libkdepim" || $(MKDIR) "libkdepim" | |
80 | build_microkde: variable_test tmake | 80 | cd libkdepim && $(QMAKE) libkdepim.pro -o $(MAKEFILE) |
81 | for i in $(SUBDIRS_MICROKDE); do pushd $$i; \ | 81 | sub-libkdepim: libkdepim/$(MAKEFILE) FORCE |
82 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 82 | cd libkdepim && $(MAKE) -f $(MAKEFILE) |
83 | done | 83 | |
84 | 84 | microkde/$(MAKEFILE): | |
85 | build_qtopia_plugin: build_microkde | 85 | @$(CHK_DIR_EXISTS) "microkde" || $(MKDIR) "microkde" |
86 | ifdef BUILD_NO_QTOPIA_PLUGIN | 86 | cd microkde && $(QMAKE) microkde.pro -o $(MAKEFILE) |
87 | @echo == qtopia plugin not build. | 87 | sub-microkde: microkde/$(MAKEFILE) FORCE |
88 | else | 88 | cd microkde && $(MAKE) -f $(MAKEFILE) |
89 | for i in $(SUBDIRS_QTOPIA_PLUGIN); do pushd $$i; \ | 89 | |
90 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 90 | korganizer/$(MAKEFILE): |
91 | done | 91 | @$(CHK_DIR_EXISTS) "korganizer" || $(MKDIR) "korganizer" |
92 | endif | 92 | cd korganizer && $(QMAKE) korganizer.pro -o $(MAKEFILE) |
93 | 93 | sub-korganizer: korganizer/$(MAKEFILE) FORCE | |
94 | build_opie_plugin: build_microkde | 94 | cd korganizer && $(MAKE) -f $(MAKEFILE) |
95 | ifdef BUILD_NO_OPIE_PLUGIN | 95 | |
96 | @echo == opie plugin not build. | 96 | kaddressbook/$(MAKEFILE): |
97 | else | 97 | @$(CHK_DIR_EXISTS) "kaddressbook" || $(MKDIR) "kaddressbook" |
98 | for i in $(SUBDIRS_OPIE_PLUGIN); do pushd $$i; \ | 98 | cd kaddressbook && $(QMAKE) kaddressbook.pro -o $(MAKEFILE) |
99 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 99 | sub-kaddressbook: kaddressbook/$(MAKEFILE) FORCE |
100 | done | 100 | cd kaddressbook && $(MAKE) -f $(MAKEFILE) |
101 | endif | 101 | |
102 | 102 | gammu/emb/common/$(MAKEFILE): | |
103 | build_sharp_plugin: build_microkde | 103 | @$(CHK_DIR_EXISTS) "gammu/emb/common" || $(MKDIR) "gammu/emb/common" |
104 | ifdef BUILD_NO_SHARP_PLUGIN | 104 | cd gammu/emb/common && $(QMAKE) common.pro -o $(MAKEFILE) |
105 | @echo == ldap plugin not build. | 105 | sub-gammu-emb-common: gammu/emb/common/$(MAKEFILE) FORCE |
106 | else | 106 | cd gammu/emb/common && $(MAKE) -f $(MAKEFILE) |
107 | for i in $(SUBDIRS_SHARP_PLUGIN); do pushd $$i; \ | 107 | |
108 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 108 | gammu/emb/gammu/$(MAKEFILE): |
109 | done | 109 | @$(CHK_DIR_EXISTS) "gammu/emb/gammu" || $(MKDIR) "gammu/emb/gammu" |
110 | endif | 110 | cd gammu/emb/gammu && $(QMAKE) gammu.pro -o $(MAKEFILE) |
111 | 111 | sub-gammu-emb-gammu: gammu/emb/gammu/$(MAKEFILE) FORCE | |
112 | build_ldap_plugin: build_microkde | 112 | cd gammu/emb/gammu && $(MAKE) -f $(MAKEFILE) |
113 | ifdef BUILD_NO_LDAP_PLUGIN | 113 | |
114 | @echo == ldap plugin not build. | 114 | libetpan/$(MAKEFILE): |
115 | else | 115 | @$(CHK_DIR_EXISTS) "libetpan" || $(MKDIR) "libetpan" |
116 | for i in $(SUBDIRS_LDAP_PLUGIN); do pushd $$i; \ | 116 | cd libetpan && $(QMAKE) libetpan.pro -o $(MAKEFILE) |
117 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 117 | sub-libetpan: libetpan/$(MAKEFILE) FORCE |
118 | done | 118 | cd libetpan && $(MAKE) -f $(MAKEFILE) |
119 | endif | 119 | |
120 | 120 | kmicromail/libmailwrapper/$(MAKEFILE): | |
121 | 121 | @$(CHK_DIR_EXISTS) "kmicromail/libmailwrapper" || $(MKDIR) "kmicromail/libmailwrapper" | |
122 | build_micromail: build_microkde | 122 | cd kmicromail/libmailwrapper && $(QMAKE) libmailwrapper.pro -o $(MAKEFILE) |
123 | ifdef BUILD_NO_MICROMAIL | 123 | sub-kmicromail-libmailwrapper: kmicromail/libmailwrapper/$(MAKEFILE) FORCE |
124 | @echo == kmicromail not build. | 124 | cd kmicromail/libmailwrapper && $(MAKE) -f $(MAKEFILE) |
125 | else | 125 | |
126 | for i in $(SUBDIRS_MICROMAIL); do pushd $$i; \ | 126 | kmicromail/$(MAKEFILE): |
127 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 127 | @$(CHK_DIR_EXISTS) "kmicromail" || $(MKDIR) "kmicromail" |
128 | done | 128 | cd kmicromail && $(QMAKE) kmicromail.pro -o $(MAKEFILE) |
129 | endif | 129 | sub-kmicromail: kmicromail/$(MAKEFILE) FORCE |
130 | 130 | cd kmicromail && $(MAKE) -f $(MAKEFILE) | |
131 | build_gammu: variable_test tmake | 131 | |
132 | ifdef BUILD_NO_GAMMU | 132 | pwmanager/libcrypt/cipher/$(MAKEFILE): |
133 | @echo == gammu not build. | 133 | @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/cipher" || $(MKDIR) "pwmanager/libcrypt/cipher" |
134 | else | 134 | cd pwmanager/libcrypt/cipher && $(QMAKE) cipher.pro -o $(MAKEFILE) |
135 | for i in $(SUBDIRS_GAMMU); do pushd $$i; \ | 135 | sub-pwmanager-libcrypt-cipher: pwmanager/libcrypt/cipher/$(MAKEFILE) FORCE |
136 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 136 | cd pwmanager/libcrypt/cipher && $(MAKE) -f $(MAKEFILE) |
137 | done | 137 | |
138 | endif | 138 | pwmanager/libcrypt/error/$(MAKEFILE): |
139 | 139 | @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/error" || $(MKDIR) "pwmanager/libcrypt/error" | |
140 | build_pwmanager: build_microkde | 140 | cd pwmanager/libcrypt/error && $(QMAKE) error.pro -o $(MAKEFILE) |
141 | ifdef BUILD_NO_PWMANAGER | 141 | sub-pwmanager-libcrypt-error: pwmanager/libcrypt/error/$(MAKEFILE) FORCE |
142 | @echo == pwmanager not build. | 142 | cd pwmanager/libcrypt/error && $(MAKE) -f $(MAKEFILE) |
143 | else | 143 | |
144 | for i in $(SUBDIRS_PWMANAGER); do pushd $$i; \ | 144 | pwmanager/libcrypt/mpi/$(MAKEFILE): |
145 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 145 | @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/mpi" || $(MKDIR) "pwmanager/libcrypt/mpi" |
146 | done | 146 | cd pwmanager/libcrypt/mpi && $(QMAKE) mpi.pro -o $(MAKEFILE) |
147 | endif | 147 | sub-pwmanager-libcrypt-mpi: pwmanager/libcrypt/mpi/$(MAKEFILE) FORCE |
148 | 148 | cd pwmanager/libcrypt/mpi && $(MAKE) -f $(MAKEFILE) | |
149 | 149 | ||
150 | variable_info: | 150 | pwmanager/libcrypt/zlib/$(MAKEFILE): |
151 | @echo -------------------------------------- | 151 | @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/zlib" || $(MKDIR) "pwmanager/libcrypt/zlib" |
152 | @echo KDEPIM buildsystem, variableinfo... | 152 | cd pwmanager/libcrypt/zlib && $(QMAKE) zlib.pro -o $(MAKEFILE) |
153 | @echo KDEPIMDIR=$(KDEPIMDIR) | 153 | sub-pwmanager-libcrypt-zlib: pwmanager/libcrypt/zlib/$(MAKEFILE) FORCE |
154 | @echo QTDIR=$(QTDIR) | 154 | cd pwmanager/libcrypt/zlib && $(MAKE) -f $(MAKEFILE) |
155 | @echo QPEDIR=$(QPEDIR) | 155 | |
156 | @echo OPIEDIR=$(OPIEDIR) | 156 | pwmanager/pwmanager/$(MAKEFILE): |
157 | @echo PLATFORM=$(PLATFORM) | 157 | @$(CHK_DIR_EXISTS) "pwmanager/pwmanager" || $(MKDIR) "pwmanager/pwmanager" |
158 | @echo RELEASE_DEBUG=$(RELEASE_DEBUG) | 158 | cd pwmanager/pwmanager && $(QMAKE) pwmanager.pro -o $(MAKEFILE) |
159 | @echo BUILD_NO_MICROMAIL=$(BUILD_NO_MICROMAIL) | 159 | sub-pwmanager-pwmanager: pwmanager/pwmanager/$(MAKEFILE) FORCE |
160 | @echo BUILD_NO_LDAP_PLUGIN=$(BUILD_NO_LDAP_PLUGIN) | 160 | cd pwmanager/pwmanager && $(MAKE) -f $(MAKEFILE) |
161 | @echo BUILD_NO_OPIE_PLUGIN=$(BUILD_NO_OPIE_PLUGIN) | 161 | |
162 | @echo BUILD_NO_QTOPIA_PLUGIN=$(BUILD_NO_QTOPIA_PLUGIN) | 162 | Makefile: kdepim-desktop.pro /usr/lib/qt3/mkspecs/default/qmake.conf variables.pri |
163 | @echo BUILD_NO_SHARP_PLUGIN=$(BUILD_NO_SHARP_PLUGIN) | 163 | $(QMAKE) -o Makefile kdepim-desktop.pro |
164 | ifndef BUILD_NO_SHARP_PLUGIN | 164 | qmake: qmake_all |
165 | @echo SHARPDTMSDK=$(SHARPDTMSDK) | 165 | @$(QMAKE) -o Makefile kdepim-desktop.pro |
166 | endif | 166 | |
167 | @echo BUILD_NO_GAMMU=$(BUILD_NO_GAMMU) | 167 | all: $(SUBTARGETS) |
168 | @echo BUILD_NO_PWMANAGER=$(BUILD_NO_PWMANAGER) | 168 | qmake_all: kabc/plugins/file/$(MAKEFILE) kabc/plugins/dir/$(MAKEFILE) kabc/plugins/qtopia/$(MAKEFILE) libical/$(MAKEFILE) libkcal/$(MAKEFILE) kabc/$(MAKEFILE) libkdepim/$(MAKEFILE) microkde/$(MAKEFILE) korganizer/$(MAKEFILE) kaddressbook/$(MAKEFILE) gammu/emb/common/$(MAKEFILE) gammu/emb/gammu/$(MAKEFILE) libetpan/$(MAKEFILE) kmicromail/libmailwrapper/$(MAKEFILE) kmicromail/$(MAKEFILE) pwmanager/libcrypt/cipher/$(MAKEFILE) pwmanager/libcrypt/error/$(MAKEFILE) pwmanager/libcrypt/mpi/$(MAKEFILE) pwmanager/libcrypt/zlib/$(MAKEFILE) pwmanager/pwmanager/$(MAKEFILE) |
169 | @echo -------------------------------------- | 169 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
170 | 170 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | |
171 | variable_test: variable_info | 171 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
172 | @echo KDEPIM buildsystem, variablecheck... | 172 | ( [ -d libical ] && cd libical ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
173 | ifndef KDEPIMDIR | 173 | ( [ -d libkcal ] && cd libkcal ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
174 | @echo KDEPIMDIR is not defined. | 174 | ( [ -d kabc ] && cd kabc ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
175 | $(error KDEPIMDIR is not defined) | 175 | ( [ -d libkdepim ] && cd libkdepim ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
176 | endif | 176 | ( [ -d microkde ] && cd microkde ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
177 | ifndef PLATFORM | 177 | ( [ -d korganizer ] && cd korganizer ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
178 | @echo PLATFORM is not defined. | 178 | ( [ -d kaddressbook ] && cd kaddressbook ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
179 | $(error PLATFORM is not defined) | 179 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
180 | endif | 180 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
181 | ifdef BUILD_NO_LDAP_PLUGIN | 181 | ( [ -d libetpan ] && cd libetpan ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
182 | @echo LDAP PLUGIN will not be build, because BUILD_NO_LDAP_PLUGIN is set to $(BUILD_NO_LDAP_PLUGIN) | 182 | ( [ -d kmicromail/libmailwrapper ] && cd kmicromail/libmailwrapper ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
183 | endif | 183 | ( [ -d kmicromail ] && cd kmicromail ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
184 | ifdef BUILD_NO_OPIE_PLUGIN | 184 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
185 | @echo OPIE PLUGIN will not be build, because BUILD_NO_OPIE_PLUGIN is set to $(BUILD_NO_OPIE_PLUGIN) | 185 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
186 | endif | 186 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
187 | ifdef BUILD_NO_QTOPIA_PLUGIN | 187 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
188 | @echo QTOPIA PLUGIN will not be build, because BUILD_NO__QTOPIA_PLUGIN is set to $(BUILD_NO__QTOPIA_PLUGIN) | 188 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true |
189 | endif | 189 | clean uicables mocables uiclean mocclean lexclean yaccclean : qmake_all FORCE |
190 | ifdef BUILD_NO_MICROMAIL | 190 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
191 | @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL) | 191 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
192 | endif | 192 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
193 | ifdef BUILD_NO_SHARP_PLUGIN | 193 | ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
194 | @echo SHARP PLUGIN will not be build, because BUILD_NO_SHARP_PLUGIN is set to $(BUILD_NO_SHARP_PLUGIN) | 194 | ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
195 | else | 195 | ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
196 | ifndef SHARPDTMSDK | 196 | ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
197 | @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK) | 197 | ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
198 | $(error SHARPDTMSDK is not defined) | 198 | ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
199 | endif | 199 | ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
200 | endif | 200 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
201 | ifdef BUILD_NO_GAMMU | 201 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
202 | @echo GAMMU will not be build, because BUILD_NO_GAMMU is set to $(BUILD_NO_GAMMU) | 202 | ( [ -d libetpan ] && cd libetpan ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
203 | endif | 203 | ( [ -d kmicromail/libmailwrapper ] && cd kmicromail/libmailwrapper ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
204 | ifdef BUILD_NO_PWMANAGER | 204 | ( [ -d kmicromail ] && cd kmicromail ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
205 | @echo PWMANAGER will not be build, because BUILD_NO_PWMANAGER is set to $(BUILD_NO_PWMANAGER) | 205 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
206 | endif | 206 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
207 | @echo -------------------------------------- | 207 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) $@; ) || true |
208 | 208 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) $@; ) || true | |
209 | 209 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) $@; ) || true | |
210 | objects: | 210 | uninstall_subdirs: qmake_all FORCE |
211 | for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done | 211 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
212 | for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done | 212 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
213 | mkdir -p libical/lib/$(PLATFORM) | 213 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
214 | mkdir -p dest | 214 | ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
215 | mkdir -p dest$(LIBICAL_PATH) | 215 | ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
216 | mkdir -p pwmanager/libcrypt/$(PLATFORM) | 216 | ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
217 | 217 | ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | |
218 | clean: | 218 | ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
219 | rm -rf libical/lib/$(PLATFORM)/*; | 219 | ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
220 | rm -rf pwmanager/libcrypt/$(PLATFORM)/*; | 220 | ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
221 | for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\ | 221 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
222 | rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \ | 222 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
223 | done | 223 | ( [ -d libetpan ] && cd libetpan ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
224 | 224 | ( [ -d kmicromail/libmailwrapper ] && cd kmicromail/libmailwrapper ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | |
225 | pac: | 225 | ( [ -d kmicromail ] && cd kmicromail ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
226 | rm -f $(QPEDIR)/lib/libmicro* | 226 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
227 | rm -f $(QPEDIR)/plugins/applets/libkopi* | 227 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
228 | make | 228 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
229 | make install | 229 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
230 | make dist | 230 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true |
231 | install: | 231 | install_subdirs: qmake_all FORCE |
232 | 232 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) install; ) || true | |
233 | cd bin/kdepim; make install | 233 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) install; ) || true |
234 | cp -r Pim $(QPEDIR)/apps | 234 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) install; ) || true |
235 | cp db2file/db2file $(QPEDIR)/bin/db2file | 235 | ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) install; ) || true |
236 | chmod ugo+x $(QPEDIR)/bin/db2file | 236 | ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) install; ) || true |
237 | cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop | 237 | ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) install; ) || true |
238 | cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop | 238 | ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) install; ) || true |
239 | cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kopiemail.desktop | 239 | ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) install; ) || true |
240 | cp pwmanager/pwmanager/pwmanager.desktop $(QPEDIR)/apps/Pim/pwmanager.desktop | 240 | ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) install; ) || true |
241 | 241 | ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) install; ) || true | |
242 | dist: | 242 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) install; ) || true |
243 | @echo Dont forget to do "make install" before "make dist" | 243 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) install; ) || true |
244 | rm -f *arm.ipk | 244 | ( [ -d libetpan ] && cd libetpan ; $(MAKE) -f $(MAKEFILE) install; ) || true |
245 | rm -f *ipk.zip | 245 | ( [ -d kmicromail/libmailwrapper ] && cd kmicromail/libmailwrapper ; $(MAKE) -f $(MAKEFILE) install; ) || true |
246 | rm -rf ../kdepimpi_$(KDEPIM_VERSION)/* | 246 | ( [ -d kmicromail ] && cd kmicromail ; $(MAKE) -f $(MAKEFILE) install; ) || true |
247 | rm -f *~ | 247 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) install; ) || true |
248 | cd ..;mkdir -p kdepimpi_$(KDEPIM_VERSION) | 248 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) install; ) || true |
249 | cd ../kdepimpi_$(KDEPIM_VERSION);mkdir -p ipk | 249 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) install; ) || true |
250 | cd ..; tar czf kdepimpi-$(KDEPIM_VERSION).tar.gz --exclude=obj --exclude=moc --exclude=CVS --exclude=Makefilezaurus --exclude=Makefileqtopia kdepim | 250 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) install; ) || true |
251 | mkipks kmicrokdelibs.control | 251 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) install; ) || true |
252 | mkipks korganizer.control | 252 | distclean: qmake_all FORCE |
253 | mkipks kaddressbook.control | 253 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
254 | ifndef BUILD_NO_MICROMAIL | 254 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
255 | mkipks kopiemail.control | 255 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
256 | endif | 256 | ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
257 | ifndef BUILD_NO_SHARP_PLUGIN | 257 | ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
258 | mkipks ksharpPIM-DTMaccess.control | 258 | ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
259 | endif | 259 | ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
260 | mkipks korganizer-alarm.control | 260 | ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
261 | ifndef BUILD_NO_GAMMU | 261 | ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
262 | mkipks kmobilephoneaccess.control | 262 | ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
263 | endif | 263 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
264 | ifndef BUILD_NO_PWMANAGER | 264 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
265 | mkipks pwmanager.control | 265 | ( [ -d libetpan ] && cd libetpan ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
266 | endif | 266 | ( [ -d kmicromail/libmailwrapper ] && cd kmicromail/libmailwrapper ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
267 | mkipks pimTABicon.control | 267 | ( [ -d kmicromail ] && cd kmicromail ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
268 | zip kdepim_$(KDEPIM_VERSION)_for_SharpRom.ipk.zip *.ipk ReleaseNotes.txt | 268 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
269 | mv *.ipk ../kdepimpi_$(KDEPIM_VERSION)/ipk/ | 269 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
270 | mv *for_SharpRom.ipk.zip ../kdepimpi_$(KDEPIM_VERSION)/ | 270 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
271 | mv ../kdepimpi-$(KDEPIM_VERSION).tar.gz ../kdepimpi_$(KDEPIM_VERSION)/ | 271 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true |
272 | 272 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | |
273 | tmake: objects \ | 273 | |
274 | qtcompat/Makefile$(PLATFORM) \ | 274 | install: install_subdirs |
275 | microkde/Makefile$(PLATFORM) \ | 275 | |
276 | libkcal/Makefile$(PLATFORM) \ | 276 | uninstall: uninstall_subdirs |
277 | libkdepim/Makefile$(PLATFORM) \ | 277 | |
278 | korganizer/Makefile$(PLATFORM) \ | 278 | FORCE: |
279 | kalarmd/Makefile$(PLATFORM) \ | ||
280 | libical/src/libical/Makefile$(PLATFORM) \ | ||
281 | libical/src/libicalss/Makefile$(PLATFORM) \ | ||
282 | kabc/Makefile$(PLATFORM) \ | ||
283 | kabc/formats/binary/Makefile$(PLATFORM) \ | ||
284 | kabc/plugins/file/Makefile$(PLATFORM) \ | ||
285 | kabc/plugins/dir/Makefile$(PLATFORM) \ | ||
286 | kabc/plugins/ldap/Makefile$(PLATFORM) \ | ||
287 | kabc/plugins/opie/Makefile$(PLATFORM) \ | ||
288 | kabc/plugins/qtopia/Makefile$(PLATFORM) \ | ||
289 | kabc/plugins/sharpdtm/Makefile$(PLATFORM) \ | ||
290 | kaddressbook/Makefile$(PLATFORM) \ | ||
291 | kmicromail/Makefile$(PLATFORM) \ | ||
292 | libetpan/Makefile$(PLATFORM) \ | ||
293 | kmicromail/libmailwrapper/Makefile$(PLATFORM) \ | ||
294 | gammu/emb/common/Makefile$(PLATFORM) \ | ||
295 | gammu/emb/gammu/Makefile$(PLATFORM) \ | ||
296 | pwmanager/pwmanager/Makefile$(PLATFORM) \ | ||
297 | pwmanager/libcrypt/mpi/Makefile$(PLATFORM) \ | ||
298 | pwmanager/libcrypt/error/Makefile$(PLATFORM) \ | ||
299 | pwmanager/libcrypt/cipher/Makefile$(PLATFORM) \ | ||
300 | pwmanager/libcrypt/zlib/Makefile$(PLATFORM) | ||
301 | |||
302 | qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro | ||
303 | cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtcompat.pro -o Makefile$(PLATFORM) | ||
304 | |||
305 | microkde/Makefile$(PLATFORM): microkde/microkdeE.pro | ||
306 | cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" microkdeE.pro -o Makefile$(PLATFORM) | ||
307 | |||
308 | libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro | ||
309 | cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkcalE.pro -o Makefile$(PLATFORM) | ||
310 | |||
311 | |||
312 | libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro | ||
313 | cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkdepimE.pro -o Makefile$(PLATFORM) | ||
314 | |||
315 | kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro | ||
316 | cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kalarmdE.pro -o Makefile$(PLATFORM) | ||
317 | |||
318 | korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro | ||
319 | cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" korganizerE.pro -o Makefile$(PLATFORM) | ||
320 | |||
321 | libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro | ||
322 | cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalE.pro -o Makefile$(PLATFORM) | ||
323 | |||
324 | libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro | ||
325 | cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalssE.pro -o Makefile$(PLATFORM) | ||
326 | |||
327 | kabc/Makefile$(PLATFORM): kabc/kabcE.pro | ||
328 | cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcE.pro -o Makefile$(PLATFORM) | ||
329 | |||
330 | kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro | ||
331 | cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcformat_binaryE.pro -o Makefile$(PLATFORM) | ||
332 | |||
333 | kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro | ||
334 | cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" fileE.pro -o Makefile$(PLATFORM) | ||
335 | |||
336 | kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro | ||
337 | cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" dirE.pro -o Makefile$(PLATFORM) | ||
338 | |||
339 | kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro | ||
340 | cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" ldapE.pro -o Makefile$(PLATFORM) | ||
341 | |||
342 | kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro | ||
343 | cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" opieE.pro -o Makefile$(PLATFORM) | ||
344 | |||
345 | kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro | ||
346 | cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtopiaE.pro -o Makefile$(PLATFORM) | ||
347 | |||
348 | kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro | ||
349 | cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" sharpdtmE.pro -o Makefile$(PLATFORM) | ||
350 | |||
351 | kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro | ||
352 | cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kaddressbookE.pro -o Makefile$(PLATFORM) | ||
353 | |||
354 | kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro | ||
355 | cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kmicromailE.pro -o Makefile$(PLATFORM) | ||
356 | |||
357 | libetpan/Makefile$(PLATFORM): libetpan/libetpanE.pro | ||
358 | cd libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libetpanE.pro -o Makefile$(PLATFORM) | ||
359 | |||
360 | kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro | ||
361 | cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libmailwrapperE.pro -o Makefile$(PLATFORM) | ||
362 | |||
363 | gammu/emb/common/Makefile$(PLATFORM): gammu/emb/common/commonE.pro | ||
364 | cd gammu/emb/common; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" commonE.pro -o Makefile$(PLATFORM) | ||
365 | |||
366 | gammu/emb/gammu/Makefile$(PLATFORM): gammu/emb/gammu/gammuE.pro | ||
367 | cd gammu/emb/gammu; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" gammuE.pro -o Makefile$(PLATFORM) | ||
368 | |||
369 | pwmanager/pwmanager/Makefile$(PLATFORM): pwmanager/pwmanager/pwmanagerE.pro | ||
370 | cd pwmanager/pwmanager; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" pwmanagerE.pro -o Makefile$(PLATFORM) | ||
371 | |||
372 | |||
373 | pwmanager/libcrypt/mpi/Makefile$(PLATFORM): pwmanager/libcrypt/mpi/mpi.pro | ||
374 | cd pwmanager/libcrypt/mpi;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" mpi.pro -o Makefile$(PLATFORM) | ||
375 | |||
376 | pwmanager/libcrypt/error/Makefile$(PLATFORM): pwmanager/libcrypt/error/error.pro | ||
377 | cd pwmanager/libcrypt/error;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" error.pro -o Makefile$(PLATFORM) | ||
378 | |||
379 | pwmanager/libcrypt/cipher/Makefile$(PLATFORM): pwmanager/libcrypt/cipher/cipher.pro | ||
380 | cd pwmanager/libcrypt/cipher;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" cipher.pro -o Makefile$(PLATFORM) | ||
381 | |||
382 | pwmanager/libcrypt/zlib/Makefile$(PLATFORM): pwmanager/libcrypt/zlib/zlib.pro | ||
383 | cd pwmanager/libcrypt/zlib;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" zlib.pro -o Makefile$(PLATFORM) | ||
384 | |||
385 | 279 | ||
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index bdad248..fefc778 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -266,301 +266,319 @@ void KOEventViewer::addTag(const QString & tag,const QString & text) | |||
266 | tmpStr+="</" + tag + ">"; | 266 | tmpStr+="</" + tag + ">"; |
267 | mText.append(tmpStr); | 267 | mText.append(tmpStr); |
268 | } | 268 | } |
269 | else | 269 | else |
270 | { | 270 | { |
271 | str += text + "</" + tag + ">"; | 271 | str += text + "</" + tag + ">"; |
272 | mText.append(str); | 272 | mText.append(str); |
273 | } | 273 | } |
274 | } | 274 | } |
275 | 275 | ||
276 | void KOEventViewer::setColorMode( int m ) | 276 | void KOEventViewer::setColorMode( int m ) |
277 | { | 277 | { |
278 | mColorMode = m; | 278 | mColorMode = m; |
279 | } | 279 | } |
280 | void KOEventViewer::appendEvent(Event *event, int mode ) | 280 | void KOEventViewer::appendEvent(Event *event, int mode ) |
281 | { | 281 | { |
282 | mMailSubject = ""; | 282 | mMailSubject = ""; |
283 | mCurrentIncidence = event; | 283 | mCurrentIncidence = event; |
284 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; | 284 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; |
285 | topLevelWidget()->setCaption(i18n("Event Viewer")); | 285 | topLevelWidget()->setCaption(i18n("Event Viewer")); |
286 | if ( mode == 0 ) { | 286 | if ( mode == 0 ) { |
287 | addTag("h2",deTag(event->summary())); | 287 | addTag("h2",deTag(event->summary())); |
288 | } | 288 | } |
289 | else { | 289 | else { |
290 | if ( mColorMode == 1 ) { | 290 | if ( mColorMode == 1 ) { |
291 | mText +="<font color=\"#00A000\">"; | 291 | mText +="<font color=\"#00A000\">"; |
292 | } | 292 | } |
293 | if ( mColorMode == 2 ) { | 293 | if ( mColorMode == 2 ) { |
294 | mText +="<font color=\"#C00000\">"; | 294 | mText +="<font color=\"#C00000\">"; |
295 | } | 295 | } |
296 | // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; | 296 | // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; |
297 | if ( mode == 1 ) { | 297 | if ( mode == 1 ) { |
298 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); | 298 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); |
299 | } else { | 299 | } else { |
300 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); | 300 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); |
301 | } | 301 | } |
302 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); | 302 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); |
303 | if ( mColorMode ) | 303 | if ( mColorMode ) |
304 | mText += "</font>"; | 304 | mText += "</font>"; |
305 | } | 305 | } |
306 | mMailSubject += i18n( "Meeting " )+ event->summary(); | 306 | mMailSubject += i18n( "Meeting " )+ event->summary(); |
307 | if (event->cancelled ()) { | 307 | if (event->cancelled ()) { |
308 | mText +="<font color=\"#B00000\">"; | 308 | mText +="<font color=\"#B00000\">"; |
309 | addTag("i",i18n("This event has been cancelled!")); | 309 | addTag("i",i18n("This event has been cancelled!")); |
310 | mText.append("<br>"); | 310 | mText.append("<br>"); |
311 | mText += "</font>"; | 311 | mText += "</font>"; |
312 | mMailSubject += i18n("(cancelled)"); | 312 | mMailSubject += i18n("(cancelled)"); |
313 | } | 313 | } |
314 | if (!event->location().isEmpty()) { | 314 | |
315 | addTag("b",i18n("Location: ")); | ||
316 | mText.append(deTag(event->location())+"<br>"); | ||
317 | mMailSubject += i18n(" at ") + event->location(); | ||
318 | } | ||
319 | if (event->doesFloat()) { | 315 | if (event->doesFloat()) { |
320 | if (event->isMultiDay()) { | 316 | if (event->isMultiDay()) { |
321 | mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") | 317 | mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") |
322 | .arg(event->dtStartDateStr(shortDate)) | 318 | .arg(event->dtStartDateStr(shortDate)) |
323 | .arg(event->dtEndDateStr(shortDate))); | 319 | .arg(event->dtEndDateStr(shortDate))); |
324 | } else { | 320 | } else { |
325 | mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); | 321 | mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); |
326 | } | 322 | } |
327 | } else { | 323 | } else { |
328 | if (event->isMultiDay()) { | 324 | if (event->isMultiDay()) { |
329 | mText.append(i18n("<p><b>From:</b> %1</p> ") | 325 | mText.append(i18n("<p><b>From:</b> %1</p> ") |
330 | .arg(event->dtStartStr( shortDate))); | 326 | .arg(event->dtStartStr( shortDate))); |
331 | mText.append(i18n("<p><b>To:</b> %1</p>") | 327 | mText.append(i18n("<p><b>To:</b> %1</p>") |
332 | .arg(event->dtEndStr(shortDate))); | 328 | .arg(event->dtEndStr(shortDate))); |
333 | } else { | 329 | } else { |
334 | mText.append(i18n("<p><b>On:</b> %1</p> ") | ||
335 | .arg(event->dtStartDateStr( shortDate ))); | ||
336 | mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") | 330 | mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") |
337 | .arg(event->dtStartTimeStr()) | 331 | .arg(event->dtStartTimeStr()) |
338 | .arg(event->dtEndTimeStr())); | 332 | .arg(event->dtEndTimeStr())); |
333 | mText.append(i18n("<p><b>On:</b> %1</p> ") | ||
334 | .arg(event->dtStartDateStr( shortDate ))); | ||
339 | } | 335 | } |
340 | } | 336 | } |
341 | 337 | if (!event->location().isEmpty()) { | |
338 | addTag("b",i18n("Location: ")); | ||
339 | mText.append(deTag(event->location())+"<br>"); | ||
340 | mMailSubject += i18n(" at ") + event->location(); | ||
341 | } | ||
342 | if (event->recurrence()->doesRecur()) { | 342 | if (event->recurrence()->doesRecur()) { |
343 | 343 | ||
344 | QString recurText = event->recurrence()->recurrenceText(); | 344 | QString recurText = event->recurrence()->recurrenceText(); |
345 | addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); | 345 | addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); |
346 | bool ok; | 346 | bool ok; |
347 | QDate start = QDate::currentDate(); | 347 | QDate start = QDate::currentDate(); |
348 | QDateTime next; | 348 | QDateTime next; |
349 | next = event->getNextOccurence( QDateTime::currentDateTime() , &ok ); | 349 | next = event->getNextOccurence( QDateTime::currentDateTime() , &ok ); |
350 | if ( ok ) { | 350 | if ( ok ) { |
351 | addTag("p",i18n("<b>Next recurrence is on:</b>") ); | 351 | addTag("p",i18n("<b>Next recurrence is on:</b>") ); |
352 | addTag("p", KGlobal::locale()->formatDate( next.date(), shortDate )); | 352 | addTag("p", KGlobal::locale()->formatDate( next.date(), shortDate )); |
353 | mMailSubject += i18n(" - " )+ KGlobal::locale()->formatDateTime( next, true ); | 353 | mMailSubject += i18n(" - " )+ KGlobal::locale()->formatDateTime( next, true ); |
354 | 354 | ||
355 | } else { | 355 | } else { |
356 | bool last; | 356 | bool last; |
357 | QDate nextd; | 357 | QDate nextd; |
358 | nextd = event->recurrence()->getPreviousDate( QDate::currentDate() , &last ); | 358 | nextd = event->recurrence()->getPreviousDate( QDate::currentDate() , &last ); |
359 | if ( last ) { | 359 | if ( last ) { |
360 | addTag("p",i18n("<b>Last recurrence was on:</b>") ); | 360 | addTag("p",i18n("<b>Last recurrence was on:</b>") ); |
361 | addTag("p", KGlobal::locale()->formatDate( nextd, shortDate )); | 361 | addTag("p", KGlobal::locale()->formatDate( nextd, shortDate )); |
362 | } | 362 | } |
363 | } | 363 | } |
364 | } else { | 364 | } else { |
365 | mMailSubject += i18n(" - " )+event->dtStartStr( true ); | 365 | mMailSubject += i18n(" - " )+event->dtStartStr( true ); |
366 | 366 | ||
367 | } | 367 | } |
368 | 368 | ||
369 | 369 | ||
370 | if (event->isAlarmEnabled()) { | 370 | if (event->isAlarmEnabled()) { |
371 | Alarm *alarm =event->alarms().first() ; | 371 | Alarm *alarm =event->alarms().first() ; |
372 | QDateTime t = alarm->time(); | 372 | QDateTime t = alarm->time(); |
373 | QString s =i18n("( %1 before )").arg( alarm->offsetText() ); | 373 | QString s =i18n("( %1 before )").arg( alarm->offsetText() ); |
374 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); | 374 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); |
375 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); | 375 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); |
376 | //addTag("p",s); | 376 | //addTag("p",s); |
377 | } | 377 | } |
378 | 378 | ||
379 | addTag("b",i18n("Access: ")); | 379 | addTag("b",i18n("Access: ")); |
380 | mText.append(event->secrecyStr()+"<br>"); | 380 | mText.append(event->secrecyStr()+"<br>"); |
381 | 381 | ||
382 | 382 | ||
383 | if ( KOPrefs::instance()->mEVshowDetails ) { | 383 | |
384 | if (!event->description().isEmpty()) { | ||
385 | addTag("p",i18n("<b>Details: </b>")); | ||
386 | addTag("p",deTag(event->description())); | ||
387 | } | ||
388 | } | ||
389 | formatCategories(event); | 384 | formatCategories(event); |
390 | 385 | ||
391 | formatReadOnly(event); | 386 | formatReadOnly(event); |
392 | formatAttendees(event); | 387 | formatAttendees(event); |
393 | 388 | ||
394 | if ( KOPrefs::instance()->mEVshowCreated ) { | 389 | if ( KOPrefs::instance()->mEVshowCreated ) { |
390 | #ifdef DESKTOP_VERSION | ||
391 | addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); | ||
392 | #else | ||
395 | addTag("p",i18n("<b>Created: ") +" </b>"); | 393 | addTag("p",i18n("<b>Created: ") +" </b>"); |
396 | addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); | 394 | addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); |
395 | #endif | ||
397 | 396 | ||
398 | } | 397 | } |
399 | if ( KOPrefs::instance()->mEVshowChanged ) { | 398 | if ( KOPrefs::instance()->mEVshowChanged ) { |
399 | #ifdef DESKTOP_VERSION | ||
400 | addTag("p",i18n("<b>Last modified: ") +" </b>" + KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); | ||
401 | #else | ||
400 | addTag("p",i18n("<b>Last modified: ") +" </b>"); | 402 | addTag("p",i18n("<b>Last modified: ") +" </b>"); |
401 | addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); | 403 | addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); |
404 | #endif | ||
402 | 405 | ||
403 | } | 406 | } |
407 | if ( KOPrefs::instance()->mEVshowDetails ) { | ||
408 | if (!event->description().isEmpty()) { | ||
409 | addTag("p",i18n("<b>Details: </b>")); | ||
410 | addTag("p",deTag(event->description())); | ||
411 | } | ||
412 | } | ||
404 | setText(mText); | 413 | setText(mText); |
405 | //QWhatsThis::add(this,mText); | 414 | //QWhatsThis::add(this,mText); |
406 | 415 | ||
407 | } | 416 | } |
408 | 417 | ||
409 | void KOEventViewer::appendTodo(Todo *event, int mode ) | 418 | void KOEventViewer::appendTodo(Todo *event, int mode ) |
410 | { | 419 | { |
411 | mMailSubject = ""; | 420 | mMailSubject = ""; |
412 | mCurrentIncidence = event; | 421 | mCurrentIncidence = event; |
413 | topLevelWidget()->setCaption(i18n("Todo Viewer")); | 422 | topLevelWidget()->setCaption(i18n("Todo Viewer")); |
414 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; | 423 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; |
415 | if (mode == 0 ) | 424 | if (mode == 0 ) |
416 | addTag("h2",deTag(event->summary())); | 425 | addTag("h2",deTag(event->summary())); |
417 | else { | 426 | else { |
418 | if ( mColorMode == 1 ) { | 427 | if ( mColorMode == 1 ) { |
419 | mText +="<font color=\"#00A000\">"; | 428 | mText +="<font color=\"#00A000\">"; |
420 | } | 429 | } |
421 | if ( mColorMode == 2 ) { | 430 | if ( mColorMode == 2 ) { |
422 | mText +="<font color=\"#B00000\">"; | 431 | mText +="<font color=\"#B00000\">"; |
423 | } | 432 | } |
424 | if ( mode == 1 ) { | 433 | if ( mode == 1 ) { |
425 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); | 434 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); |
426 | } else { | 435 | } else { |
427 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); | 436 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); |
428 | } | 437 | } |
429 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); | 438 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); |
430 | if ( mColorMode ) | 439 | if ( mColorMode ) |
431 | mText += "</font>"; | 440 | mText += "</font>"; |
432 | } | 441 | } |
433 | mMailSubject += i18n( "Todo " )+ event->summary(); | 442 | mMailSubject += i18n( "Todo " )+ event->summary(); |
434 | 443 | ||
435 | if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { | 444 | if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { |
436 | mText +="<font color=\"#B00000\">"; | 445 | mText +="<font color=\"#B00000\">"; |
437 | addTag("i", i18n("<p><i>Completed on %1</i></p>").arg( event->completedStr(KOPrefs::instance()->mShortDateInViewer) ) ); | 446 | addTag("i", i18n("<p><i>Completed on %1</i></p>").arg( event->completedStr(KOPrefs::instance()->mShortDateInViewer) ) ); |
438 | mText += "</font>"; | 447 | mText += "</font>"; |
439 | } else { | 448 | } else { |
440 | mText.append(i18n("<p><i>%1 % completed</i></p>") | 449 | mText.append(i18n("<p><i>%1 % completed</i></p>") |
441 | .arg(event->percentComplete())); | 450 | .arg(event->percentComplete())); |
442 | } | 451 | } |
443 | 452 | ||
444 | if (event->cancelled ()) { | 453 | if (event->cancelled ()) { |
445 | mText +="<font color=\"#B00000\">"; | 454 | mText +="<font color=\"#B00000\">"; |
446 | addTag("i",i18n("This todo has been cancelled!")); | 455 | addTag("i",i18n("This todo has been cancelled!")); |
447 | mText.append("<br>"); | 456 | mText.append("<br>"); |
448 | mText += "</font>"; | 457 | mText += "</font>"; |
449 | mMailSubject += i18n("(cancelled)"); | 458 | mMailSubject += i18n("(cancelled)"); |
450 | } | 459 | } |
451 | 460 | ||
452 | if (!event->location().isEmpty()) { | 461 | |
453 | addTag("b",i18n("Location: ")); | ||
454 | mText.append(deTag(event->location())+"<br>"); | ||
455 | mMailSubject += i18n(" at ") + event->location(); | ||
456 | } | ||
457 | 462 | ||
458 | if (event->recurrence()->doesRecur()) { | 463 | if (event->recurrence()->doesRecur()) { |
459 | 464 | ||
460 | QString recurText = event->recurrence()->recurrenceText(); | 465 | QString recurText = event->recurrence()->recurrenceText(); |
461 | addTag("p","<em>" + i18n("This is a %1 recurring todo.").arg(recurText ) + "</em>"); | 466 | addTag("p","<em>" + i18n("This is a %1 recurring todo.").arg(recurText ) + "</em>"); |
462 | 467 | ||
463 | } | 468 | } |
464 | if (event->hasStartDate()) { | 469 | if (event->hasStartDate()) { |
465 | mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); | 470 | mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); |
466 | } | 471 | } |
467 | if (event->hasDueDate()) { | 472 | if (event->hasDueDate()) { |
468 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); | 473 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); |
469 | mMailSubject += i18n(" - " )+event->dtDueStr( true ); | 474 | mMailSubject += i18n(" - " )+event->dtDueStr( true ); |
470 | } | 475 | } |
471 | 476 | if (!event->location().isEmpty()) { | |
477 | addTag("b",i18n("Location: ")); | ||
478 | mText.append(deTag(event->location())+"<br>"); | ||
479 | mMailSubject += i18n(" at ") + event->location(); | ||
480 | } | ||
481 | mText.append(i18n("<p><b>Priority:</b> %2</p>") | ||
482 | .arg(QString::number(event->priority()))); | ||
472 | 483 | ||
473 | if (event->isAlarmEnabled()) { | 484 | if (event->isAlarmEnabled()) { |
474 | Alarm *alarm =event->alarms().first() ; | 485 | Alarm *alarm =event->alarms().first() ; |
475 | QDateTime t = alarm->time(); | 486 | QDateTime t = alarm->time(); |
476 | QString s =i18n("( %1 before )").arg( alarm->offsetText() ); | 487 | QString s =i18n("( %1 before )").arg( alarm->offsetText() ); |
477 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); | 488 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); |
478 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); | 489 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); |
479 | //addTag("p",s); | 490 | //addTag("p",s); |
480 | } | 491 | } |
481 | 492 | ||
482 | addTag("b",i18n("Access: ")); | 493 | addTag("b",i18n("Access: ")); |
483 | mText.append(event->secrecyStr()+"<br>"); | 494 | mText.append(event->secrecyStr()+"<br>"); |
484 | if ( KOPrefs::instance()->mEVshowDetails ) { | ||
485 | if (!event->description().isEmpty()) { | ||
486 | addTag("p",i18n("<b>Details: </b>")); | ||
487 | addTag("p",deTag(event->description())); | ||
488 | } | ||
489 | } | ||
490 | 495 | ||
491 | formatCategories(event); | 496 | formatCategories(event); |
492 | 497 | ||
493 | mText.append(i18n("<p><b>Priority:</b> %2</p>") | ||
494 | .arg(QString::number(event->priority()))); | ||
495 | |||
496 | formatReadOnly(event); | 498 | formatReadOnly(event); |
497 | formatAttendees(event); | 499 | formatAttendees(event); |
500 | |||
501 | if ( KOPrefs::instance()->mEVshowCreated ) { | ||
502 | #ifdef DESKTOP_VERSION | ||
503 | addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); | ||
504 | #else | ||
505 | addTag("p",i18n("<b>Created: ") +" </b>"); | ||
506 | addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); | ||
507 | #endif | ||
508 | |||
509 | } | ||
510 | if ( KOPrefs::instance()->mEVshowChanged ) { | ||
511 | #ifdef DESKTOP_VERSION | ||
512 | addTag("p",i18n("<b>Last modified: ") +" </b>" +KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); | ||
513 | #else | ||
514 | addTag("p",i18n("<b>Last modified: ") +" </b>"); | ||
515 | addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); | ||
516 | #endif | ||
517 | |||
518 | } | ||
498 | if ( event->relatedTo() ) { | 519 | if ( event->relatedTo() ) { |
499 | addTag("b",i18n("Parent todo:<br>")); | 520 | addTag("b",i18n("Parent todo:<br>")); |
500 | mText.append(deTag(event->relatedTo()->summary())+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); | 521 | mText.append(deTag(event->relatedTo()->summary())+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); |
501 | } | 522 | } |
502 | QPtrList<Incidence> Relations = event->relations(); | 523 | QPtrList<Incidence> Relations = event->relations(); |
503 | Incidence *to; | 524 | Incidence *to; |
504 | if ( Relations.first() ) | 525 | if ( Relations.first() ) |
505 | addTag("b",i18n("Sub todos:<br>")); | 526 | addTag("b",i18n("Sub todos:<br>")); |
506 | for (to=Relations.first();to;to=Relations.next()) { | 527 | for (to=Relations.first();to;to=Relations.next()) { |
507 | mText.append( deTag(to->summary())+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); | 528 | mText.append( deTag(to->summary())+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); |
508 | 529 | ||
509 | } | 530 | } |
510 | if ( KOPrefs::instance()->mEVshowCreated ) { | ||
511 | addTag("p",i18n("<b>Created: ") +" </b>"); | ||
512 | addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); | ||
513 | 531 | ||
532 | if ( KOPrefs::instance()->mEVshowDetails ) { | ||
533 | if (!event->description().isEmpty()) { | ||
534 | addTag("p",i18n("<b>Details: </b>")); | ||
535 | addTag("p",deTag(event->description())); | ||
514 | } | 536 | } |
515 | if ( KOPrefs::instance()->mEVshowChanged ) { | ||
516 | addTag("p",i18n("<b>Last modified: ") +" </b>"); | ||
517 | addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); | ||
518 | |||
519 | } | 537 | } |
520 | setText(mText); | 538 | setText(mText); |
521 | } | 539 | } |
522 | 540 | ||
523 | void KOEventViewer::formatCategories(Incidence *event) | 541 | void KOEventViewer::formatCategories(Incidence *event) |
524 | { | 542 | { |
525 | if (!event->categoriesStr().isEmpty()) { | 543 | if (!event->categoriesStr().isEmpty()) { |
526 | if (event->categories().count() == 1) { | 544 | if (event->categories().count() == 1) { |
527 | addTag("h3",i18n("Category")); | 545 | addTag("h3",i18n("Category")); |
528 | } else { | 546 | } else { |
529 | addTag("h3",i18n("Categories")); | 547 | addTag("h3",i18n("Categories")); |
530 | } | 548 | } |
531 | addTag("p",event->categoriesStr()); | 549 | addTag("p",event->categoriesStr()); |
532 | } | 550 | } |
533 | } | 551 | } |
534 | void KOEventViewer::formatAttendees(Incidence *event) | 552 | void KOEventViewer::formatAttendees(Incidence *event) |
535 | { | 553 | { |
536 | QPtrList<Attendee> attendees = event->attendees(); | 554 | QPtrList<Attendee> attendees = event->attendees(); |
537 | if (attendees.count()) { | 555 | if (attendees.count()) { |
538 | 556 | ||
539 | 557 | ||
540 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); | 558 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); |
541 | QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); | 559 | QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); |
542 | addTag("h3",i18n("Organizer")); | 560 | addTag("h3",i18n("Organizer")); |
543 | mText.append("<ul><li>"); | 561 | mText.append("<ul><li>"); |
544 | #ifndef KORG_NOKABC | 562 | #ifndef KORG_NOKABC |
545 | 563 | ||
546 | #ifdef DESKTOP_VERSION | 564 | #ifdef DESKTOP_VERSION |
547 | KABC::AddressBook *add_book = KABC::StdAddressBook::self(); | 565 | KABC::AddressBook *add_book = KABC::StdAddressBook::self(); |
548 | KABC::Addressee::List addressList; | 566 | KABC::Addressee::List addressList; |
549 | addressList = add_book->findByEmail(event->organizer()); | 567 | addressList = add_book->findByEmail(event->organizer()); |
550 | KABC::Addressee o = addressList.first(); | 568 | KABC::Addressee o = addressList.first(); |
551 | if (!o.isEmpty() && addressList.size()<2) { | 569 | if (!o.isEmpty() && addressList.size()<2) { |
552 | mText += "<a href=\"uid:" + o.uid() + "\">"; | 570 | mText += "<a href=\"uid:" + o.uid() + "\">"; |
553 | mText += o.formattedName(); | 571 | mText += o.formattedName(); |
554 | mText += "</a>\n"; | 572 | mText += "</a>\n"; |
555 | } else { | 573 | } else { |
556 | mText.append(event->organizer()); | 574 | mText.append(event->organizer()); |
557 | } | 575 | } |
558 | #else //DESKTOP_VERSION | 576 | #else //DESKTOP_VERSION |
559 | mText += "<a href=\"uid:organizer\">"; | 577 | mText += "<a href=\"uid:organizer\">"; |
560 | mText += event->organizer(); | 578 | mText += event->organizer(); |
561 | mText += "</a>\n"; | 579 | mText += "</a>\n"; |
562 | #endif //DESKTOP_VERSION | 580 | #endif //DESKTOP_VERSION |
563 | 581 | ||
564 | 582 | ||
565 | #else | 583 | #else |
566 | mText.append(event->organizer()); | 584 | mText.append(event->organizer()); |
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 65d6acf..b175f9a 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -597,97 +597,97 @@ void MonthViewCell::startUpdateCell() | |||
597 | mitem->setBlockRepaint( true ); | 597 | mitem->setBlockRepaint( true ); |
598 | mitem = (MonthViewItem *)mitem->next(); | 598 | mitem = (MonthViewItem *)mitem->next(); |
599 | } | 599 | } |
600 | if ( mAvailItemList.count() > 20 ) { | 600 | if ( mAvailItemList.count() > 20 ) { |
601 | mAvailItemList.setAutoDelete( true ); | 601 | mAvailItemList.setAutoDelete( true ); |
602 | mAvailItemList.clear(); | 602 | mAvailItemList.clear(); |
603 | mAvailItemList.setAutoDelete( false ); | 603 | mAvailItemList.setAutoDelete( false ); |
604 | } | 604 | } |
605 | /* | 605 | /* |
606 | if ( !isVisible() ){ | 606 | if ( !isVisible() ){ |
607 | return; | 607 | return; |
608 | } | 608 | } |
609 | */ | 609 | */ |
610 | // qDebug("MonthViewCell::updateCell() "); | 610 | // qDebug("MonthViewCell::updateCell() "); |
611 | setPrimary( mDate.month()%2 ); | 611 | setPrimary( mDate.month()%2 ); |
612 | setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() || ( mDate.dayOfWeek() == 6 ) && KOPrefs::instance()-> mExcludeSaturdays); | 612 | setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() || ( mDate.dayOfWeek() == 6 ) && KOPrefs::instance()-> mExcludeSaturdays); |
613 | if ( mDate == QDate::currentDate() ) { | 613 | if ( mDate == QDate::currentDate() ) { |
614 | setLineWidth( 3 ); | 614 | setLineWidth( 3 ); |
615 | } else { | 615 | } else { |
616 | setLineWidth( 1 ); | 616 | setLineWidth( 1 ); |
617 | } | 617 | } |
618 | MonthViewItem* CurrentAvailItem = (MonthViewItem*) firstItem (); | 618 | MonthViewItem* CurrentAvailItem = (MonthViewItem*) firstItem (); |
619 | //clear(); | 619 | //clear(); |
620 | while ( CurrentAvailItem ) { | 620 | while ( CurrentAvailItem ) { |
621 | MonthViewItem *item = CurrentAvailItem; | 621 | MonthViewItem *item = CurrentAvailItem; |
622 | CurrentAvailItem = (MonthViewItem *)item->next(); | 622 | CurrentAvailItem = (MonthViewItem *)item->next(); |
623 | mAvailItemList.append( item ); | 623 | mAvailItemList.append( item ); |
624 | takeItem ( item ); | 624 | takeItem ( item ); |
625 | } | 625 | } |
626 | 626 | ||
627 | #ifdef DESKTOP_VERSION | 627 | #ifdef DESKTOP_VERSION |
628 | QToolTip::remove(this); | 628 | QToolTip::remove(this); |
629 | #endif | 629 | #endif |
630 | mToolTip.clear(); | 630 | mToolTip.clear(); |
631 | //qApp->processEvents(); | 631 | //qApp->processEvents(); |
632 | #if 0 | 632 | #if 0 |
633 | if ( !mHolidayString.isEmpty() ) { | 633 | if ( !mHolidayString.isEmpty() ) { |
634 | MonthViewItem *item = new MonthViewItem( 0, mDate, mHolidayString ); | 634 | MonthViewItem *item = new MonthViewItem( 0, mDate, mHolidayString ); |
635 | item->setPalette( mHolidayPalette ); | 635 | item->setPalette( mHolidayPalette ); |
636 | insertItem( item ); | 636 | insertItem( item ); |
637 | mToolTip.append ( mHolidayString ); | 637 | mToolTip.append ( mHolidayString ); |
638 | } | 638 | } |
639 | #endif | 639 | #endif |
640 | } | 640 | } |
641 | 641 | ||
642 | int MonthViewCell::insertEvent(Event *event) | 642 | int MonthViewCell::insertEvent(Event *event) |
643 | { | 643 | { |
644 | bool useToolTips = true; | 644 | bool useToolTips = true; |
645 | #ifndef DEKSTOP_VERSION | 645 | #ifndef DESKTOP_VERSION |
646 | useToolTips = false; | 646 | useToolTips = false; |
647 | #endif | 647 | #endif |
648 | QString mToolTipText; | 648 | QString mToolTipText; |
649 | setFocusPolicy(WheelFocus); | 649 | setFocusPolicy(WheelFocus); |
650 | if ( !(event->doesRecur() == Recurrence::rNone) ) { | 650 | if ( !(event->doesRecur() == Recurrence::rNone) ) { |
651 | if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily ) | 651 | if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily ) |
652 | return mdayCount; | 652 | return mdayCount; |
653 | else | 653 | else |
654 | if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly ) | 654 | if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly ) |
655 | return mdayCount; | 655 | return mdayCount; |
656 | } | 656 | } |
657 | 657 | ||
658 | if ( event->isHoliday()) { | 658 | if ( event->isHoliday()) { |
659 | setHoliday( true ); | 659 | setHoliday( true ); |
660 | if ( mDate.dayOfWeek() == 7 ) | 660 | if ( mDate.dayOfWeek() == 7 ) |
661 | setLineWidth( 3 ); | 661 | setLineWidth( 3 ); |
662 | } | 662 | } |
663 | QString text; | 663 | QString text; |
664 | int multiday = 0;// 1 = start, 2 = midddle, 3 = end day | 664 | int multiday = 0;// 1 = start, 2 = midddle, 3 = end day |
665 | if (event->isMultiDay()) { | 665 | if (event->isMultiDay()) { |
666 | QString prefix = "<->";multiday = 2; | 666 | QString prefix = "<->";multiday = 2; |
667 | QString time; | 667 | QString time; |
668 | if ( event->doesRecur() ) { | 668 | if ( event->doesRecur() ) { |
669 | if ( event->recursOn( mDate) ) { | 669 | if ( event->recursOn( mDate) ) { |
670 | prefix ="->" ;multiday = 1; | 670 | prefix ="->" ;multiday = 1; |
671 | } | 671 | } |
672 | else { | 672 | else { |
673 | int days = event->dtStart().date().daysTo ( event->dtEnd().date() ); | 673 | int days = event->dtStart().date().daysTo ( event->dtEnd().date() ); |
674 | if ( event->recursOn( mDate.addDays( -days)) ) { | 674 | if ( event->recursOn( mDate.addDays( -days)) ) { |
675 | prefix ="<-" ;multiday = 3; | 675 | prefix ="<-" ;multiday = 3; |
676 | } | 676 | } |
677 | } | 677 | } |
678 | 678 | ||
679 | } else { | 679 | } else { |
680 | if (mDate == event->dtStart().date()) { | 680 | if (mDate == event->dtStart().date()) { |
681 | prefix ="->" ;multiday = 1; | 681 | prefix ="->" ;multiday = 1; |
682 | } else if (mDate == event->dtEnd().date()) { | 682 | } else if (mDate == event->dtEnd().date()) { |
683 | prefix ="<-" ;multiday = 3; | 683 | prefix ="<-" ;multiday = 3; |
684 | } | 684 | } |
685 | } | 685 | } |
686 | if ( !event->doesFloat() ) { | 686 | if ( !event->doesFloat() ) { |
687 | if ( mDate == event->dtStart().date () ) | 687 | if ( mDate == event->dtStart().date () ) |
688 | time = KGlobal::locale()->formatTime(event->dtStart().time())+" "; | 688 | time = KGlobal::locale()->formatTime(event->dtStart().time())+" "; |
689 | else if ( mDate == event->dtEnd().date () ) | 689 | else if ( mDate == event->dtEnd().date () ) |
690 | time = KGlobal::locale()->formatTime(event->dtEnd().time())+" "; | 690 | time = KGlobal::locale()->formatTime(event->dtEnd().time())+" "; |
691 | 691 | ||
692 | } | 692 | } |
693 | text = time + event->summary(); | 693 | text = time + event->summary(); |
@@ -729,98 +729,99 @@ int MonthViewCell::insertEvent(Event *event) | |||
729 | pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); | 729 | pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); |
730 | } else { | 730 | } else { |
731 | pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); | 731 | pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); |
732 | } | 732 | } |
733 | 733 | ||
734 | } else { | 734 | } else { |
735 | if (cat.isEmpty()) { | 735 | if (cat.isEmpty()) { |
736 | pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); | 736 | pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); |
737 | } else { | 737 | } else { |
738 | pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); | 738 | pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); |
739 | } | 739 | } |
740 | } | 740 | } |
741 | 741 | ||
742 | } else { | 742 | } else { |
743 | pal = mStandardPalette ; | 743 | pal = mStandardPalette ; |
744 | } | 744 | } |
745 | item->setPalette( pal ); | 745 | item->setPalette( pal ); |
746 | item->setRecur( event->recurrence()->doesRecur() ); | 746 | item->setRecur( event->recurrence()->doesRecur() ); |
747 | item->setAlarm( event->isAlarmEnabled() && multiday < 2 ); | 747 | item->setAlarm( event->isAlarmEnabled() && multiday < 2 ); |
748 | item->setMoreInfo( event->description().length() > 0 ); | 748 | item->setMoreInfo( event->description().length() > 0 ); |
749 | #ifdef DESKTOP_VERSION | 749 | #ifdef DESKTOP_VERSION |
750 | Attendee *me = event->attendeeByMails(KOPrefs::instance()->mAdditionalMails, | 750 | Attendee *me = event->attendeeByMails(KOPrefs::instance()->mAdditionalMails, |
751 | KOPrefs::instance()->email()); | 751 | KOPrefs::instance()->email()); |
752 | if ( me != 0 ) { | 752 | if ( me != 0 ) { |
753 | if ( me->status() == Attendee::NeedsAction && me->RSVP()) | 753 | if ( me->status() == Attendee::NeedsAction && me->RSVP()) |
754 | item->setReply(true && multiday < 2); | 754 | item->setReply(true && multiday < 2); |
755 | else | 755 | else |
756 | item->setReply(false); | 756 | item->setReply(false); |
757 | } else | 757 | } else |
758 | item->setReply(false); | 758 | item->setReply(false); |
759 | #endif | 759 | #endif |
760 | item->setMultiDay( multiday ); | 760 | item->setMultiDay( multiday ); |
761 | if ( multiday ) { | 761 | if ( multiday ) { |
762 | insertItem( item ,mdayCount); | 762 | insertItem( item ,mdayCount); |
763 | ++mdayCount; | 763 | ++mdayCount; |
764 | } else { | 764 | } else { |
765 | uint i; | 765 | uint i; |
766 | int pos = mdayCount; | 766 | int pos = mdayCount; |
767 | for ( i = mdayCount; i < count();++i ) { | 767 | for ( i = mdayCount; i < count();++i ) { |
768 | QListBoxItem* it = this->item ( i ); | 768 | QListBoxItem* it = this->item ( i ); |
769 | if ( text < it->text() ) { | 769 | if ( text < it->text() ) { |
770 | pos = i; | 770 | pos = i; |
771 | break; | 771 | break; |
772 | } | 772 | } |
773 | ++pos; | 773 | ++pos; |
774 | } | 774 | } |
775 | insertItem( item ,pos); | 775 | insertItem( item ,pos); |
776 | } | 776 | } |
777 | if ( useToolTips ) | 777 | if ( useToolTips ) { |
778 | mToolTip.append( mToolTipText ); | 778 | mToolTip.append( mToolTipText ); |
779 | } | ||
779 | return mdayCount; | 780 | return mdayCount; |
780 | } | 781 | } |
781 | void MonthViewCell::insertTodo(Todo *todo) | 782 | void MonthViewCell::insertTodo(Todo *todo) |
782 | { | 783 | { |
783 | setFocusPolicy(WheelFocus); | 784 | setFocusPolicy(WheelFocus); |
784 | QString text; | 785 | QString text; |
785 | if (todo->hasDueDate()) { | 786 | if (todo->hasDueDate()) { |
786 | if (!todo->doesFloat()) { | 787 | if (!todo->doesFloat()) { |
787 | text += KGlobal::locale()->formatTime(todo->dtDue().time()); | 788 | text += KGlobal::locale()->formatTime(todo->dtDue().time()); |
788 | text += " "; | 789 | text += " "; |
789 | } | 790 | } |
790 | } | 791 | } |
791 | text += todo->summary(); | 792 | text += todo->summary(); |
792 | MonthViewItem *item ; | 793 | MonthViewItem *item ; |
793 | if ( mAvailItemList.count() ) { | 794 | if ( mAvailItemList.count() ) { |
794 | item = mAvailItemList.first(); | 795 | item = mAvailItemList.first(); |
795 | mAvailItemList.remove( item ); | 796 | mAvailItemList.remove( item ); |
796 | item->recycle( todo, mDate, text ); | 797 | item->recycle( todo, mDate, text ); |
797 | } else { | 798 | } else { |
798 | item = new MonthViewItem( todo, mDate, text ); | 799 | item = new MonthViewItem( todo, mDate, text ); |
799 | } | 800 | } |
800 | //MonthViewItem *item = new MonthViewItem( todo, mDate, text ); | 801 | //MonthViewItem *item = new MonthViewItem( todo, mDate, text ); |
801 | //item->setPalette( mStandardPalette ); | 802 | //item->setPalette( mStandardPalette ); |
802 | QPalette pal; | 803 | QPalette pal; |
803 | if (KOPrefs::instance()->mMonthViewUsesCategoryColor) { | 804 | if (KOPrefs::instance()->mMonthViewUsesCategoryColor) { |
804 | QStringList categories = todo->categories(); | 805 | QStringList categories = todo->categories(); |
805 | QString cat = categories.first(); | 806 | QString cat = categories.first(); |
806 | if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) { | 807 | if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) { |
807 | pal = getPalette(); | 808 | pal = getPalette(); |
808 | if (cat.isEmpty()) { | 809 | if (cat.isEmpty()) { |
809 | pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); | 810 | pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); |
810 | } else { | 811 | } else { |
811 | pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); | 812 | pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); |
812 | } | 813 | } |
813 | 814 | ||
814 | } else { | 815 | } else { |
815 | if (cat.isEmpty()) { | 816 | if (cat.isEmpty()) { |
816 | pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); | 817 | pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); |
817 | } else { | 818 | } else { |
818 | pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); | 819 | pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); |
819 | } | 820 | } |
820 | } | 821 | } |
821 | 822 | ||
822 | } else { | 823 | } else { |
823 | pal = mStandardPalette ; | 824 | pal = mStandardPalette ; |
824 | } | 825 | } |
825 | item->setPalette( pal ); | 826 | item->setPalette( pal ); |
826 | item->setRecur( todo->recurrence()->doesRecur() ); | 827 | item->setRecur( todo->recurrence()->doesRecur() ); |
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp index d67ad52..8ae5b46 100644 --- a/libkcal/kincidenceformatter.cpp +++ b/libkcal/kincidenceformatter.cpp | |||
@@ -31,274 +31,293 @@ QString KIncidenceFormatter::getFormattedText( Incidence * inc, bool details, bo | |||
31 | KIncidenceFormatter* KIncidenceFormatter::instance() | 31 | KIncidenceFormatter* KIncidenceFormatter::instance() |
32 | { | 32 | { |
33 | if (!mInstance) { | 33 | if (!mInstance) { |
34 | mInstance = insd.setObject(new KIncidenceFormatter()); | 34 | mInstance = insd.setObject(new KIncidenceFormatter()); |
35 | } | 35 | } |
36 | return mInstance; | 36 | return mInstance; |
37 | } | 37 | } |
38 | KIncidenceFormatter::~KIncidenceFormatter() | 38 | KIncidenceFormatter::~KIncidenceFormatter() |
39 | { | 39 | { |
40 | if (mInstance == this) | 40 | if (mInstance == this) |
41 | mInstance = insd.setObject(0); | 41 | mInstance = insd.setObject(0); |
42 | //qDebug("KIncidenceFormatter::~KIncidenceFormatter "); | 42 | //qDebug("KIncidenceFormatter::~KIncidenceFormatter "); |
43 | } | 43 | } |
44 | KIncidenceFormatter::KIncidenceFormatter() | 44 | KIncidenceFormatter::KIncidenceFormatter() |
45 | { | 45 | { |
46 | mColorMode = 0; | 46 | mColorMode = 0; |
47 | } | 47 | } |
48 | void KIncidenceFormatter::setEvent(Event *event) | 48 | void KIncidenceFormatter::setEvent(Event *event) |
49 | { | 49 | { |
50 | int mode = 0; | 50 | int mode = 0; |
51 | mCurrentIncidence = event; | 51 | mCurrentIncidence = event; |
52 | bool shortDate = true; | 52 | bool shortDate = true; |
53 | if ( mode == 0 ) { | 53 | if ( mode == 0 ) { |
54 | addTag("h3",deTag(event->summary())); | 54 | addTag("h3",deTag(event->summary())); |
55 | } | 55 | } |
56 | else { | 56 | else { |
57 | if ( mColorMode == 1 ) { | 57 | if ( mColorMode == 1 ) { |
58 | mText +="<font color=\"#00A000\">"; | 58 | mText +="<font color=\"#00A000\">"; |
59 | } | 59 | } |
60 | if ( mColorMode == 2 ) { | 60 | if ( mColorMode == 2 ) { |
61 | mText +="<font color=\"#C00000\">"; | 61 | mText +="<font color=\"#C00000\">"; |
62 | } | 62 | } |
63 | // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; | 63 | // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; |
64 | if ( mode == 1 ) { | 64 | if ( mode == 1 ) { |
65 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); | 65 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); |
66 | } else { | 66 | } else { |
67 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); | 67 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); |
68 | } | 68 | } |
69 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); | 69 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); |
70 | if ( mColorMode ) | 70 | if ( mColorMode ) |
71 | mText += "</font>"; | 71 | mText += "</font>"; |
72 | } | 72 | } |
73 | if (event->cancelled ()) { | 73 | if (event->cancelled ()) { |
74 | mText +="<font color=\"#B00000\">"; | 74 | mText +="<font color=\"#B00000\">"; |
75 | addTag("i",i18n("This event has been cancelled!")); | 75 | addTag("i",i18n("This event has been cancelled!")); |
76 | mText.append("<br>"); | 76 | mText.append("<br>"); |
77 | mText += "</font>"; | 77 | mText += "</font>"; |
78 | } | 78 | } |
79 | if (!event->location().isEmpty()) { | ||
80 | addTag("b",i18n("Location: ")); | ||
81 | mText.append(deTag(event->location())+"<br>"); | ||
82 | } | ||
83 | if (event->doesFloat()) { | 79 | if (event->doesFloat()) { |
84 | if (event->isMultiDay()) { | 80 | if (event->isMultiDay()) { |
85 | mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") | 81 | mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") |
86 | .arg(event->dtStartDateStr(shortDate)) | 82 | .arg(event->dtStartDateStr(shortDate)) |
87 | .arg(event->dtEndDateStr(shortDate))); | 83 | .arg(event->dtEndDateStr(shortDate))); |
88 | } else { | 84 | } else { |
89 | mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); | 85 | mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); |
90 | } | 86 | } |
91 | } else { | 87 | } else { |
92 | if (event->isMultiDay()) { | 88 | if (event->isMultiDay()) { |
93 | mText.append(i18n("<p><b>From:</b> %1</p> ") | 89 | mText.append(i18n("<p><b>From:</b> %1</p> ") |
94 | .arg(event->dtStartStr( shortDate))); | 90 | .arg(event->dtStartStr( shortDate))); |
95 | mText.append(i18n("<p><b>To:</b> %1</p>") | 91 | mText.append(i18n("<p><b>To:</b> %1</p>") |
96 | .arg(event->dtEndStr(shortDate))); | 92 | .arg(event->dtEndStr(shortDate))); |
97 | } else { | 93 | } else { |
98 | mText.append(i18n("<p><b>On:</b> %1</p> ") | ||
99 | .arg(event->dtStartDateStr( shortDate ))); | ||
100 | mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") | 94 | mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") |
101 | .arg(event->dtStartTimeStr()) | 95 | .arg(event->dtStartTimeStr()) |
102 | .arg(event->dtEndTimeStr())); | 96 | .arg(event->dtEndTimeStr())); |
97 | mText.append(i18n("<p><b>On:</b> %1</p> ") | ||
98 | .arg(event->dtStartDateStr( shortDate ))); | ||
103 | } | 99 | } |
104 | } | 100 | } |
101 | if (!event->location().isEmpty()) { | ||
102 | addTag("b",i18n("Location: ")); | ||
103 | mText.append(deTag(event->location())+"<br>"); | ||
104 | } | ||
105 | 105 | ||
106 | if (event->recurrence()->doesRecur()) { | 106 | if (event->recurrence()->doesRecur()) { |
107 | 107 | ||
108 | QString recurText = event->recurrence()->recurrenceText(); | 108 | QString recurText = event->recurrence()->recurrenceText(); |
109 | addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); | 109 | addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); |
110 | 110 | ||
111 | bool ok; | 111 | bool ok; |
112 | QDate start = QDate::currentDate(); | 112 | QDate start = QDate::currentDate(); |
113 | QDateTime next; | 113 | QDateTime next; |
114 | next = event->getNextOccurence( QDateTime::currentDateTime() , &ok ); | 114 | next = event->getNextOccurence( QDateTime::currentDateTime() , &ok ); |
115 | if ( ok ) { | 115 | if ( ok ) { |
116 | addTag("p",i18n("<b>Next recurrence is on:</b>") ); | 116 | addTag("p",i18n("<b>Next recurrence is on:</b>") ); |
117 | addTag("p", KGlobal::locale()->formatDate( next.date(), shortDate )); | 117 | addTag("p", KGlobal::locale()->formatDate( next.date(), shortDate )); |
118 | 118 | ||
119 | } else { | 119 | } else { |
120 | bool last; | 120 | bool last; |
121 | QDate nextd; | 121 | QDate nextd; |
122 | nextd = event->recurrence()->getPreviousDate( QDate::currentDate() , &last ); | 122 | nextd = event->recurrence()->getPreviousDate( QDate::currentDate() , &last ); |
123 | if ( last ) { | 123 | if ( last ) { |
124 | addTag("p",i18n("<b>Last recurrence was on:</b>") ); | 124 | addTag("p",i18n("<b>Last recurrence was on:</b>") ); |
125 | addTag("p", KGlobal::locale()->formatDate( nextd, shortDate )); | 125 | addTag("p", KGlobal::locale()->formatDate( nextd, shortDate )); |
126 | } | 126 | } |
127 | } | 127 | } |
128 | } | 128 | } |
129 | 129 | ||
130 | 130 | ||
131 | if (event->isAlarmEnabled()) { | 131 | if (event->isAlarmEnabled()) { |
132 | Alarm *alarm =event->alarms().first() ; | 132 | Alarm *alarm =event->alarms().first() ; |
133 | QDateTime t = alarm->time(); | 133 | QDateTime t = alarm->time(); |
134 | QString s =i18n("( %1 before )").arg( alarm->offsetText() ); | 134 | QString s =i18n("( %1 before )").arg( alarm->offsetText() ); |
135 | addTag("p",i18n("<b>Alarm on: </b>") + s + ": "+KGlobal::locale()->formatDateTime( t, shortDate )); | 135 | addTag("p",i18n("<b>Alarm on: </b>") + s + ": "+KGlobal::locale()->formatDateTime( t, shortDate )); |
136 | //addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); | 136 | //addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); |
137 | //addTag("p",s); | 137 | //addTag("p",s); |
138 | } | 138 | } |
139 | 139 | ||
140 | 140 | ||
141 | 141 | ||
142 | addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); | 142 | addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); |
143 | // mText.append(event->secrecyStr()+"<br>"); | 143 | // mText.append(event->secrecyStr()+"<br>"); |
144 | formatCategories(event); | 144 | formatCategories(event); |
145 | if ( mDetails ) { | ||
146 | if (!event->description().isEmpty()) { | ||
147 | addTag("p",i18n("<b>Details: </b>")); | ||
148 | addTag("p",deTag(event->description())); | ||
149 | } | ||
150 | } | ||
151 | 145 | ||
152 | formatReadOnly(event); | 146 | formatReadOnly(event); |
153 | formatAttendees(event); | 147 | formatAttendees(event); |
154 | 148 | ||
155 | if ( mCreated ) { | 149 | if ( mCreated ) { |
150 | #ifdef DESKTOP_VERSION | ||
151 | addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); | ||
152 | #else | ||
156 | addTag("p",i18n("<b>Created: ") +" </b>"); | 153 | addTag("p",i18n("<b>Created: ") +" </b>"); |
157 | addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); | 154 | addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); |
155 | #endif | ||
158 | 156 | ||
159 | } | 157 | } |
160 | if ( mModified ) { | 158 | if ( mModified ) { |
159 | #ifdef DESKTOP_VERSION | ||
160 | addTag("p",i18n("<b>Last modified: ") +" </b>"+KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); | ||
161 | #else | ||
161 | addTag("p",i18n("<b>Last modified: ") +" </b>"); | 162 | addTag("p",i18n("<b>Last modified: ") +" </b>"); |
162 | addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); | 163 | addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); |
164 | #endif | ||
163 | 165 | ||
164 | } | 166 | } |
167 | if ( mDetails ) { | ||
168 | if (!event->description().isEmpty()) { | ||
169 | addTag("p",i18n("<b>Details: </b>")); | ||
170 | addTag("p",deTag(event->description())); | ||
171 | } | ||
172 | } | ||
165 | 173 | ||
166 | } | 174 | } |
167 | 175 | ||
168 | void KIncidenceFormatter::setTodo(Todo *event ) | 176 | void KIncidenceFormatter::setTodo(Todo *event ) |
169 | { | 177 | { |
170 | int mode = 0; | 178 | int mode = 0; |
171 | mCurrentIncidence = event; | 179 | mCurrentIncidence = event; |
172 | bool shortDate = true; | 180 | bool shortDate = true; |
173 | if (mode == 0 ) | 181 | if (mode == 0 ) |
174 | addTag("h3",deTag(event->summary())); | 182 | addTag("h3",deTag(event->summary())); |
175 | else { | 183 | else { |
176 | if ( mColorMode == 1 ) { | 184 | if ( mColorMode == 1 ) { |
177 | mText +="<font color=\"#00A000\">"; | 185 | mText +="<font color=\"#00A000\">"; |
178 | } | 186 | } |
179 | if ( mColorMode == 2 ) { | 187 | if ( mColorMode == 2 ) { |
180 | mText +="<font color=\"#B00000\">"; | 188 | mText +="<font color=\"#B00000\">"; |
181 | } | 189 | } |
182 | if ( mode == 1 ) { | 190 | if ( mode == 1 ) { |
183 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); | 191 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); |
184 | } else { | 192 | } else { |
185 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); | 193 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); |
186 | } | 194 | } |
187 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); | 195 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); |
188 | if ( mColorMode ) | 196 | if ( mColorMode ) |
189 | mText += "</font>"; | 197 | mText += "</font>"; |
190 | } | 198 | } |
191 | if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { | 199 | if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { |
192 | mText +="<font color=\"#B00000\">"; | 200 | mText +="<font color=\"#B00000\">"; |
193 | addTag("i", i18n("<p><i>Completed on %1</i></p>").arg( event->completedStr(shortDate) ) ); | 201 | addTag("i", i18n("<p><i>Completed on %1</i></p>").arg( event->completedStr(shortDate) ) ); |
194 | mText += "</font>"; | 202 | mText += "</font>"; |
195 | } else { | 203 | } else { |
196 | mText.append(i18n("<p><i>%1 % completed</i></p>") | 204 | mText.append(i18n("<p><i>%1 % completed</i></p>") |
197 | .arg(event->percentComplete())); | 205 | .arg(event->percentComplete())); |
198 | } | 206 | } |
199 | if (event->cancelled ()) { | 207 | if (event->cancelled ()) { |
200 | mText +="<font color=\"#B00000\">"; | 208 | mText +="<font color=\"#B00000\">"; |
201 | addTag("i",i18n("This todo has been cancelled!")); | 209 | addTag("i",i18n("This todo has been cancelled!")); |
202 | mText.append("<br>"); | 210 | mText.append("<br>"); |
203 | mText += "</font>"; | 211 | mText += "</font>"; |
204 | } | 212 | } |
205 | 213 | ||
206 | if (!event->location().isEmpty()) { | ||
207 | addTag("b",i18n("Location: ")); | ||
208 | mText.append(deTag(event->location())+"<br>"); | ||
209 | } | ||
210 | 214 | ||
211 | if (event->recurrence()->doesRecur()) { | 215 | if (event->recurrence()->doesRecur()) { |
212 | 216 | ||
213 | QString recurText = event->recurrence()->recurrenceText(); | 217 | QString recurText = event->recurrence()->recurrenceText(); |
214 | addTag("p","<em>" + i18n("This is a %1 recurring todo.").arg(recurText ) + "</em>"); | 218 | addTag("p","<em>" + i18n("This is a %1 recurring todo.").arg(recurText ) + "</em>"); |
215 | } | 219 | } |
216 | 220 | ||
217 | if (event->hasStartDate()) { | 221 | if (event->hasStartDate()) { |
218 | mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(shortDate))); | 222 | mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(shortDate))); |
219 | } | 223 | } |
220 | 224 | ||
221 | 225 | ||
222 | if (event->hasDueDate()) { | 226 | if (event->hasDueDate()) { |
223 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(shortDate))); | 227 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(shortDate))); |
224 | } | 228 | } |
229 | |||
230 | if (!event->location().isEmpty()) { | ||
231 | addTag("b",i18n("Location: ")); | ||
232 | mText.append(deTag(event->location())+"<br>"); | ||
233 | } | ||
234 | |||
225 | mText.append(i18n("<p><b>Priority:</b> %2</p>") | 235 | mText.append(i18n("<p><b>Priority:</b> %2</p>") |
226 | .arg(QString::number(event->priority()))); | 236 | .arg(QString::number(event->priority()))); |
227 | 237 | ||
228 | if (event->isAlarmEnabled()) { | 238 | if (event->isAlarmEnabled()) { |
229 | Alarm *alarm =event->alarms().first() ; | 239 | Alarm *alarm =event->alarms().first() ; |
230 | QDateTime t = alarm->time(); | 240 | QDateTime t = alarm->time(); |
231 | QString s =i18n("( %1 before )").arg( alarm->offsetText() ); | 241 | QString s =i18n("( %1 before )").arg( alarm->offsetText() ); |
232 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); | 242 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); |
233 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); | 243 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); |
234 | //addTag("p",s); | 244 | //addTag("p",s); |
235 | } | 245 | } |
236 | 246 | ||
237 | addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); | 247 | addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); |
238 | formatCategories(event); | 248 | formatCategories(event); |
239 | if ( mDetails ) { | 249 | |
240 | if (!event->description().isEmpty()) { | ||
241 | addTag("p",i18n("<b>Details: </b>")); | ||
242 | addTag("p",deTag(event->description())); | ||
243 | } | ||
244 | } | ||
245 | formatReadOnly(event); | 250 | formatReadOnly(event); |
246 | formatAttendees(event); | 251 | formatAttendees(event); |
247 | if ( mCreated ) { | 252 | if ( mCreated ) { |
253 | #ifdef DESKTOP_VERSION | ||
254 | addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); | ||
255 | #else | ||
248 | addTag("p",i18n("<b>Created: ") +" </b>"); | 256 | addTag("p",i18n("<b>Created: ") +" </b>"); |
249 | addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); | 257 | addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); |
258 | #endif | ||
250 | 259 | ||
251 | } | 260 | } |
252 | if ( mModified ) { | 261 | if ( mModified ) { |
262 | #ifdef DESKTOP_VERSION | ||
263 | addTag("p",i18n("<b>Last modified: ") +" </b>"+KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); | ||
264 | #else | ||
253 | addTag("p",i18n("<b>Last modified: ") +" </b>"); | 265 | addTag("p",i18n("<b>Last modified: ") +" </b>"); |
254 | addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); | 266 | addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); |
267 | #endif | ||
255 | 268 | ||
256 | } | 269 | } |
270 | if ( mDetails ) { | ||
271 | if (!event->description().isEmpty()) { | ||
272 | addTag("p",i18n("<b>Details: </b>")); | ||
273 | addTag("p",deTag(event->description())); | ||
274 | } | ||
275 | } | ||
257 | } | 276 | } |
258 | 277 | ||
259 | void KIncidenceFormatter::setJournal(Journal* ) | 278 | void KIncidenceFormatter::setJournal(Journal* ) |
260 | { | 279 | { |
261 | 280 | ||
262 | } | 281 | } |
263 | 282 | ||
264 | void KIncidenceFormatter::formatCategories(Incidence *event) | 283 | void KIncidenceFormatter::formatCategories(Incidence *event) |
265 | { | 284 | { |
266 | if (!event->categoriesStr().isEmpty()) { | 285 | if (!event->categoriesStr().isEmpty()) { |
267 | addTag("p",i18n("<b>Categories: </b>")+event->categoriesStr() ); | 286 | addTag("p",i18n("<b>Categories: </b>")+event->categoriesStr() ); |
268 | //mText.append(event->categoriesStr()); | 287 | //mText.append(event->categoriesStr()); |
269 | } | 288 | } |
270 | } | 289 | } |
271 | void KIncidenceFormatter::addTag(const QString & tag,const QString & text) | 290 | void KIncidenceFormatter::addTag(const QString & tag,const QString & text) |
272 | { | 291 | { |
273 | int number=text.contains("\n"); | 292 | int number=text.contains("\n"); |
274 | QString str = "<" + tag + ">"; | 293 | QString str = "<" + tag + ">"; |
275 | QString tmpText=text; | 294 | QString tmpText=text; |
276 | QString tmpStr=str; | 295 | QString tmpStr=str; |
277 | if(number !=-1) | 296 | if(number !=-1) |
278 | { | 297 | { |
279 | if (number > 0) { | 298 | if (number > 0) { |
280 | int pos=0; | 299 | int pos=0; |
281 | QString tmp; | 300 | QString tmp; |
282 | for(int i=0;i<=number;i++) { | 301 | for(int i=0;i<=number;i++) { |
283 | pos=tmpText.find("\n"); | 302 | pos=tmpText.find("\n"); |
284 | tmp=tmpText.left(pos); | 303 | tmp=tmpText.left(pos); |
285 | tmpText=tmpText.right(tmpText.length()-pos-1); | 304 | tmpText=tmpText.right(tmpText.length()-pos-1); |
286 | tmpStr+=tmp+"<br>"; | 305 | tmpStr+=tmp+"<br>"; |
287 | } | 306 | } |
288 | } | 307 | } |
289 | else tmpStr += tmpText; | 308 | else tmpStr += tmpText; |
290 | tmpStr+="</" + tag + ">"; | 309 | tmpStr+="</" + tag + ">"; |
291 | mText.append(tmpStr); | 310 | mText.append(tmpStr); |
292 | } | 311 | } |
293 | else | 312 | else |
294 | { | 313 | { |
295 | str += text + "</" + tag + ">"; | 314 | str += text + "</" + tag + ">"; |
296 | mText.append(str); | 315 | mText.append(str); |
297 | } | 316 | } |
298 | } | 317 | } |
299 | 318 | ||
300 | void KIncidenceFormatter::formatAttendees(Incidence *event) | 319 | void KIncidenceFormatter::formatAttendees(Incidence *event) |
301 | { | 320 | { |
302 | QPtrList<Attendee> attendees = event->attendees(); | 321 | QPtrList<Attendee> attendees = event->attendees(); |
303 | if (attendees.count()) { | 322 | if (attendees.count()) { |
304 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); | 323 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); |