author | zautrix <zautrix> | 2005-03-29 14:23:43 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-29 14:23:43 (UTC) |
commit | 3116f249fc6ccd0e067213e826d3d924f6986972 (patch) (unidiff) | |
tree | fe37b19450279d07b6767d56ef0deeff51f7485e | |
parent | c873163eca527625ce22ed461ee5d4fec61b3b18 (diff) | |
download | kdepimpi-3116f249fc6ccd0e067213e826d3d924f6986972.zip kdepimpi-3116f249fc6ccd0e067213e826d3d924f6986972.tar.gz kdepimpi-3116f249fc6ccd0e067213e826d3d924f6986972.tar.bz2 |
fix
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 3 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 1 | ||||
-rw-r--r-- | libkdepim/externalapphandler.cpp | 5 |
3 files changed, 8 insertions, 1 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index b5285bf..03aec7b 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,217 +1,220 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.0.22 ************ | 3 | ********** VERSION 2.0.22 ************ |
4 | 4 | ||
5 | KO/Pi: | 5 | KO/Pi: |
6 | Fix for creating events/todos via the abgenda context menu. | 6 | Fix for creating events/todos via the abgenda context menu. |
7 | Added option to split toolbar to 3 toolbars. | 7 | Added option to split toolbar to 3 toolbars. |
8 | Added option to show one small filter-view-toolbar. | 8 | Added option to show one small filter-view-toolbar. |
9 | Added a print option to the desktop version: | 9 | Added a print option to the desktop version: |
10 | Now you can print out the view of the "Event Viewer". | 10 | Now you can print out the view of the "Event Viewer". |
11 | That means you can print all data of one particular event/todo. | 11 | That means you can print all data of one particular event/todo. |
12 | Added scaling options to printout of Event Viewer and What'sNext View. | 12 | Added scaling options to printout of Event Viewer and What'sNext View. |
13 | Fixed some problems in the month view in "week start sunday" mode. | 13 | Fixed some problems in the month view in "week start sunday" mode. |
14 | KA/Pi: | ||
15 | Added two more config options. | ||
16 | Fixed resizing problem of address request dialog when orientation was switched. | ||
14 | 17 | ||
15 | ********** VERSION 2.0.21 ************ | 18 | ********** VERSION 2.0.21 ************ |
16 | 19 | ||
17 | Fixed another SMTP problem in OM/Pi. | 20 | Fixed another SMTP problem in OM/Pi. |
18 | Some small changed in the new datenavigator in KO/Pi. | 21 | Some small changed in the new datenavigator in KO/Pi. |
19 | Changed default setting for new filter in KA/Pi to "exclude categories". | 22 | Changed default setting for new filter in KA/Pi to "exclude categories". |
20 | Changed the default font size for 640x480 display . | 23 | Changed the default font size for 640x480 display . |
21 | Changed popup menu behaviour in agenda and list view. | 24 | Changed popup menu behaviour in agenda and list view. |
22 | Fixed some layout problems of the date label size in the month view. | 25 | Fixed some layout problems of the date label size in the month view. |
23 | Made month view update faster. | 26 | Made month view update faster. |
24 | Made first datenavigator repainting faster. | 27 | Made first datenavigator repainting faster. |
25 | Changed the title of the event/todo edit dialogs. | 28 | Changed the title of the event/todo edit dialogs. |
26 | Timelabels in agenga changed from 22:00 to 22 oo. ( the oo higher, of course). | 29 | Timelabels in agenga changed from 22:00 to 22 oo. ( the oo higher, of course). |
27 | Many small usebility fixes in KO/Pi. | 30 | Many small usebility fixes in KO/Pi. |
28 | Pressing the "Calendar" button on the Z switches now to the next view in KO/Pi. | 31 | Pressing the "Calendar" button on the Z switches now to the next view in KO/Pi. |
29 | The set of possible "next views" are the views you have toolbar buttons for. | 32 | The set of possible "next views" are the views you have toolbar buttons for. |
30 | 33 | ||
31 | Made alarm sound working on Linux. | 34 | Made alarm sound working on Linux. |
32 | 35 | ||
33 | KO/Pi alarm applet changed: | 36 | KO/Pi alarm applet changed: |
34 | Made buttons in alarm dialog much bigger. | 37 | Made buttons in alarm dialog much bigger. |
35 | Made setting of timer more user friendly by showing the actual timer fire time and making the buttons in the timer settings much bigger. | 38 | Made setting of timer more user friendly by showing the actual timer fire time and making the buttons in the timer settings much bigger. |
36 | The goal was it to make it possible to use a finger tip ( and not the stylus ) on the touchscreen to adjust the settings. | 39 | The goal was it to make it possible to use a finger tip ( and not the stylus ) on the touchscreen to adjust the settings. |
37 | 40 | ||
38 | And because this version is realeased at Easter, I added an Easter-egg: | 41 | And because this version is realeased at Easter, I added an Easter-egg: |
39 | With a new undocumented command you can get a message box about the next alarm. | 42 | With a new undocumented command you can get a message box about the next alarm. |
40 | Good luck to find it! | 43 | Good luck to find it! |
41 | 44 | ||
42 | 45 | ||
43 | 46 | ||
44 | ********** VERSION 2.0.20 ************ | 47 | ********** VERSION 2.0.20 ************ |
45 | 48 | ||
46 | Two small fixes in OM/Pi. | 49 | Two small fixes in OM/Pi. |
47 | 50 | ||
48 | Better resizing of the new datenavigator in KO/Pi. | 51 | Better resizing of the new datenavigator in KO/Pi. |
49 | 52 | ||
50 | ********** VERSION 2.0.19 ************ | 53 | ********** VERSION 2.0.19 ************ |
51 | KO/Pi: | 54 | KO/Pi: |
52 | Enhancements and bugfixes in the new datenavigator. | 55 | Enhancements and bugfixes in the new datenavigator. |
53 | Bugfix in this changelog: | 56 | Bugfix in this changelog: |
54 | The datenavigator was changed in version 2.0.18, not the datepicker. | 57 | The datenavigator was changed in version 2.0.18, not the datepicker. |
55 | 58 | ||
56 | ********** VERSION 2.0.18 ************ | 59 | ********** VERSION 2.0.18 ************ |
57 | KO/Pi: | 60 | KO/Pi: |
58 | Fixed some minor problems. | 61 | Fixed some minor problems. |
59 | Cleaned up the KO/Pi config dialog. | 62 | Cleaned up the KO/Pi config dialog. |
60 | Fixed problem moving events in aganda view. | 63 | Fixed problem moving events in aganda view. |
61 | Made datepicker scaleable, i.e. if the datenavigator shows now a | 64 | Made datepicker scaleable, i.e. if the datenavigator shows now a |
62 | datenavigator matrix depending on its size. | 65 | datenavigator matrix depending on its size. |
63 | Birthdays are now displayed green in the datenavigator. | 66 | Birthdays are now displayed green in the datenavigator. |
64 | What'sThis Help in datenavigator shows all events of the day. | 67 | What'sThis Help in datenavigator shows all events of the day. |
65 | 68 | ||
66 | OM/Pi: | 69 | OM/Pi: |
67 | Updated the backend mail library to the latest version. | 70 | Updated the backend mail library to the latest version. |
68 | Please backup your mail before using this version. | 71 | Please backup your mail before using this version. |
69 | 72 | ||
70 | ********** VERSION 2.0.17 ************ | 73 | ********** VERSION 2.0.17 ************ |
71 | 74 | ||
72 | KO/Pi: | 75 | KO/Pi: |
73 | Tooltips in month view were not sorted. Fixed. | 76 | Tooltips in month view were not sorted. Fixed. |
74 | Daylabel in agenda view ( for display of one day ) was too short. Fixed. | 77 | Daylabel in agenda view ( for display of one day ) was too short. Fixed. |
75 | Conflict display dialog for syncing was not on top of other windows. Fixed. | 78 | Conflict display dialog for syncing was not on top of other windows. Fixed. |
76 | Fixed some minor problems. | 79 | Fixed some minor problems. |
77 | 80 | ||
78 | Fixed an endless loop when importing vcs file with RESOURCES entry. | 81 | Fixed an endless loop when importing vcs file with RESOURCES entry. |
79 | 82 | ||
80 | ********** VERSION 2.0.16 ************ | 83 | ********** VERSION 2.0.16 ************ |
81 | OM/Pi: | 84 | OM/Pi: |
82 | Fixed the SMTP account setting the option. | 85 | Fixed the SMTP account setting the option. |
83 | Fixed something in mail sending. | 86 | Fixed something in mail sending. |
84 | 87 | ||
85 | KO/Pi: | 88 | KO/Pi: |
86 | Added possibility to export selected events/todos as vcal file. | 89 | Added possibility to export selected events/todos as vcal file. |
87 | 90 | ||
88 | ********** VERSION 2.0.15 ************ | 91 | ********** VERSION 2.0.15 ************ |
89 | 92 | ||
90 | PwM/Pi: | 93 | PwM/Pi: |
91 | Added keyboard shorcuts for | 94 | Added keyboard shorcuts for |
92 | - toggling summary view (space bar) | 95 | - toggling summary view (space bar) |
93 | - delete item (delete + backspace key) | 96 | - delete item (delete + backspace key) |
94 | - add new item ( i + n key) | 97 | - add new item ( i + n key) |
95 | Fixed length of info in the title. | 98 | Fixed length of info in the title. |
96 | 99 | ||
97 | KO/Pi-KA/Pi: | 100 | KO/Pi-KA/Pi: |
98 | Changed "ME" menu bar entry to an icon. | 101 | Changed "ME" menu bar entry to an icon. |
99 | 102 | ||
100 | KO/Pi: | 103 | KO/Pi: |
101 | Fixed two minor bugs in displaying todos. | 104 | Fixed two minor bugs in displaying todos. |
102 | If in month view a cell is selected, the key shortcut "d" shows now that date. | 105 | If in month view a cell is selected, the key shortcut "d" shows now that date. |
103 | Added complete info for a todo in month view as an icon left of the text. | 106 | Added complete info for a todo in month view as an icon left of the text. |
104 | Fixed problems of displaying data when "<" or ">" are used in summary/location/description. | 107 | Fixed problems of displaying data when "<" or ">" are used in summary/location/description. |
105 | Fixed problem of search dialog size when switching displays. | 108 | Fixed problem of search dialog size when switching displays. |
106 | Cancel key now closes date picker. | 109 | Cancel key now closes date picker. |
107 | Rearranged KO/Pi file menu structure. | 110 | Rearranged KO/Pi file menu structure. |
108 | 111 | ||
109 | OM/Pi: | 112 | OM/Pi: |
110 | Added to the SMTP account setting the option | 113 | Added to the SMTP account setting the option |
111 | "No secure connection". | 114 | "No secure connection". |
112 | You have to configure your SMTP accounts again, sorry. | 115 | You have to configure your SMTP accounts again, sorry. |
113 | 116 | ||
114 | KA/Pi: | 117 | KA/Pi: |
115 | Added support for importing quoted-printable. | 118 | Added support for importing quoted-printable. |
116 | Support was added by Peter P.. Thanks, Peter! | 119 | Support was added by Peter P.. Thanks, Peter! |
117 | 120 | ||
118 | 121 | ||
119 | ********** VERSION 2.0.14 ************ | 122 | ********** VERSION 2.0.14 ************ |
120 | 123 | ||
121 | Made Passwordmanager PwM/Pi more userfriendly: | 124 | Made Passwordmanager PwM/Pi more userfriendly: |
122 | Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. | 125 | Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. |
123 | Fixed bug in KO/Pi todo printing. | 126 | Fixed bug in KO/Pi todo printing. |
124 | Made Qtopia calendar import possible on desktop . | 127 | Made Qtopia calendar import possible on desktop . |
125 | 128 | ||
126 | ********** VERSION 2.0.13 ************ | 129 | ********** VERSION 2.0.13 ************ |
127 | 130 | ||
128 | Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter. | 131 | Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter. |
129 | 132 | ||
130 | In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down". | 133 | In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down". |
131 | 134 | ||
132 | OM/Pi: | 135 | OM/Pi: |
133 | Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails. | 136 | Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails. |
134 | Added missing German translation. | 137 | Added missing German translation. |
135 | Added warning if path is specified in local folder settings of account config. | 138 | Added warning if path is specified in local folder settings of account config. |
136 | 139 | ||
137 | ********** VERSION 2.0.12 ************ | 140 | ********** VERSION 2.0.12 ************ |
138 | 141 | ||
139 | KO/Pi: | 142 | KO/Pi: |
140 | Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. | 143 | Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. |
141 | Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes. | 144 | Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes. |
142 | Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer. | 145 | Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer. |
143 | 146 | ||
144 | Fixed problem in pi-sync mode when wrong password was sent. | 147 | Fixed problem in pi-sync mode when wrong password was sent. |
145 | 148 | ||
146 | OM/Pi: | 149 | OM/Pi: |
147 | Fixed a crash when displaying mails with "Show mail as html" was checked in the config. | 150 | Fixed a crash when displaying mails with "Show mail as html" was checked in the config. |
148 | Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled. | 151 | Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled. |
149 | 152 | ||
150 | ********** VERSION 2.0.11 ************ | 153 | ********** VERSION 2.0.11 ************ |
151 | 154 | ||
152 | Fixed some problems in pi-sync mode | 155 | Fixed some problems in pi-sync mode |
153 | (e.g. details of events were not synced properly) | 156 | (e.g. details of events were not synced properly) |
154 | 157 | ||
155 | ********** VERSION 2.0.10 ************ | 158 | ********** VERSION 2.0.10 ************ |
156 | 159 | ||
157 | KO/Pi: | 160 | KO/Pi: |
158 | In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view. | 161 | In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view. |
159 | This is fixed. | 162 | This is fixed. |
160 | Changed the search dialog a bit to make it more user friendly. | 163 | Changed the search dialog a bit to make it more user friendly. |
161 | (E.g.: Removed message box about "no items found" and set key focus to search line edit after search). | 164 | (E.g.: Removed message box about "no items found" and set key focus to search line edit after search). |
162 | 165 | ||
163 | Added config option to hide the week number in KO/Pi toolbar. | 166 | Added config option to hide the week number in KO/Pi toolbar. |
164 | 167 | ||
165 | ********** VERSION 2.0.9 ************ | 168 | ********** VERSION 2.0.9 ************ |
166 | 169 | ||
167 | Made month view icons for multiday events a bit nicer. | 170 | Made month view icons for multiday events a bit nicer. |
168 | Some minor fixes in KO/Pi | 171 | Some minor fixes in KO/Pi |
169 | (e.g. go to today did not work for new week view properly). | 172 | (e.g. go to today did not work for new week view properly). |
170 | 173 | ||
171 | 174 | ||
172 | ********** VERSION 2.0.8 ************ | 175 | ********** VERSION 2.0.8 ************ |
173 | 176 | ||
174 | Fixed a problem in dependency info in the ipk files for the Zaurus. | 177 | Fixed a problem in dependency info in the ipk files for the Zaurus. |
175 | 178 | ||
176 | Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar. | 179 | Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar. |
177 | 180 | ||
178 | Added a "go today" button to the datepicker. | 181 | Added a "go today" button to the datepicker. |
179 | 182 | ||
180 | Added "created" and "last modified" to event/todo viewer (and What'sThis viewer) | 183 | Added "created" and "last modified" to event/todo viewer (and What'sThis viewer) |
181 | and made it configureable to show these values. | 184 | and made it configureable to show these values. |
182 | 185 | ||
183 | Fixed a problem for events (from external iCal files) that do have a duration but no end date. | 186 | Fixed a problem for events (from external iCal files) that do have a duration but no end date. |
184 | 187 | ||
185 | 188 | ||
186 | ********** VERSION 2.0.7 ************ | 189 | ********** VERSION 2.0.7 ************ |
187 | 190 | ||
188 | Added global application font settings | 191 | Added global application font settings |
189 | (for all KDE-Pim/Pi apps) to the general settings. | 192 | (for all KDE-Pim/Pi apps) to the general settings. |
190 | 193 | ||
191 | Fixed a problem in OM/Pi when trying to login to some IMAP servers | 194 | Fixed a problem in OM/Pi when trying to login to some IMAP servers |
192 | (like the IMAP server of Apple: mail.mac.com ) | 195 | (like the IMAP server of Apple: mail.mac.com ) |
193 | 196 | ||
194 | Added recurring todos to KO/Pi. | 197 | Added recurring todos to KO/Pi. |
195 | 198 | ||
196 | 199 | ||
197 | ********** VERSION 2.0.6 ************ | 200 | ********** VERSION 2.0.6 ************ |
198 | 201 | ||
199 | Stable release 2.0.6! | 202 | Stable release 2.0.6! |
200 | 203 | ||
201 | Some bugfixes in the pi-sync mode. | 204 | Some bugfixes in the pi-sync mode. |
202 | Added German translation for pi-sync mode. | 205 | Added German translation for pi-sync mode. |
203 | 206 | ||
204 | KO/Pi: | 207 | KO/Pi: |
205 | Made the todolist using alternate background. | 208 | Made the todolist using alternate background. |
206 | 209 | ||
207 | Other minor fixes in KO/Pi. | 210 | Other minor fixes in KO/Pi. |
208 | 211 | ||
209 | 212 | ||
210 | You can find the complete changelog | 213 | You can find the complete changelog |
211 | from version 1.7.7 to 2.0.5 | 214 | from version 1.7.7 to 2.0.5 |
212 | in the source package or on | 215 | in the source package or on |
213 | 216 | ||
214 | http://www.pi-sync.net/html/changelog.html | 217 | http://www.pi-sync.net/html/changelog.html |
215 | 218 | ||
216 | 219 | ||
217 | 220 | ||
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index db19dd5..27aca2d 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -2132,768 +2132,769 @@ void KABCore::addActionsManually() | |||
2132 | //Disable the following block if you do not want to have a menubar. | 2132 | //Disable the following block if you do not want to have a menubar. |
2133 | mb->insertItem( i18n("&File"), fileMenu ); | 2133 | mb->insertItem( i18n("&File"), fileMenu ); |
2134 | mb->insertItem( i18n("&Edit"), editMenu ); | 2134 | mb->insertItem( i18n("&Edit"), editMenu ); |
2135 | mb->insertItem( i18n("&View"), viewMenu ); | 2135 | mb->insertItem( i18n("&View"), viewMenu ); |
2136 | mb->insertItem( i18n("&Settings"), settingsMenu ); | 2136 | mb->insertItem( i18n("&Settings"), settingsMenu ); |
2137 | #ifdef DESKTOP_VERSION | 2137 | #ifdef DESKTOP_VERSION |
2138 | mb->insertItem( i18n("Synchronize"), syncMenu ); | 2138 | mb->insertItem( i18n("Synchronize"), syncMenu ); |
2139 | #else | 2139 | #else |
2140 | mb->insertItem( i18n("Sync"), syncMenu ); | 2140 | mb->insertItem( i18n("Sync"), syncMenu ); |
2141 | #endif | 2141 | #endif |
2142 | //mb->insertItem( i18n("&Change"), changeMenu ); | 2142 | //mb->insertItem( i18n("&Change"), changeMenu ); |
2143 | mb->insertItem( i18n("&Help"), helpMenu ); | 2143 | mb->insertItem( i18n("&Help"), helpMenu ); |
2144 | mIncSearchWidget = new IncSearchWidget( tb ); | 2144 | mIncSearchWidget = new IncSearchWidget( tb ); |
2145 | // tb->insertWidget(-1, 0, mIncSearchWidget); | 2145 | // tb->insertWidget(-1, 0, mIncSearchWidget); |
2146 | #ifndef DESKTOP_VERSION | 2146 | #ifndef DESKTOP_VERSION |
2147 | } else { | 2147 | } else { |
2148 | //US setup toolbar | 2148 | //US setup toolbar |
2149 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); | 2149 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); |
2150 | QPopupMenu *popupBarTB = new QPopupMenu( this ); | 2150 | QPopupMenu *popupBarTB = new QPopupMenu( this ); |
2151 | menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); | 2151 | menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); |
2152 | tb->insertWidget(-1, 0, menuBarTB); | 2152 | tb->insertWidget(-1, 0, menuBarTB); |
2153 | mIncSearchWidget = new IncSearchWidget( tb ); | 2153 | mIncSearchWidget = new IncSearchWidget( tb ); |
2154 | tb->enableMoving(false); | 2154 | tb->enableMoving(false); |
2155 | popupBarTB->insertItem( i18n("&File"), fileMenu ); | 2155 | popupBarTB->insertItem( i18n("&File"), fileMenu ); |
2156 | popupBarTB->insertItem( i18n("&Edit"), editMenu ); | 2156 | popupBarTB->insertItem( i18n("&Edit"), editMenu ); |
2157 | popupBarTB->insertItem( i18n("&View"), viewMenu ); | 2157 | popupBarTB->insertItem( i18n("&View"), viewMenu ); |
2158 | popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); | 2158 | popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); |
2159 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); | 2159 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); |
2160 | mViewManager->getFilterAction()->plug ( popupBarTB); | 2160 | mViewManager->getFilterAction()->plug ( popupBarTB); |
2161 | //popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); | 2161 | //popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); |
2162 | popupBarTB->insertItem( i18n("&Help"), helpMenu ); | 2162 | popupBarTB->insertItem( i18n("&Help"), helpMenu ); |
2163 | if (QApplication::desktop()->width() > 320 ) { | 2163 | if (QApplication::desktop()->width() > 320 ) { |
2164 | // mViewManager->getFilterAction()->plug ( tb); | 2164 | // mViewManager->getFilterAction()->plug ( tb); |
2165 | } | 2165 | } |
2166 | } | 2166 | } |
2167 | #endif | 2167 | #endif |
2168 | // mActionQuit->plug ( mMainWindow->toolBar()); | 2168 | // mActionQuit->plug ( mMainWindow->toolBar()); |
2169 | 2169 | ||
2170 | 2170 | ||
2171 | 2171 | ||
2172 | //US Now connect the actions with the menue entries. | 2172 | //US Now connect the actions with the menue entries. |
2173 | #ifdef DESKTOP_VERSION | 2173 | #ifdef DESKTOP_VERSION |
2174 | mActionPrint->plug( fileMenu ); | 2174 | mActionPrint->plug( fileMenu ); |
2175 | mActionPrintDetails->plug( fileMenu ); | 2175 | mActionPrintDetails->plug( fileMenu ); |
2176 | fileMenu->insertSeparator(); | 2176 | fileMenu->insertSeparator(); |
2177 | #endif | 2177 | #endif |
2178 | mActionMail->plug( fileMenu ); | 2178 | mActionMail->plug( fileMenu ); |
2179 | fileMenu->insertSeparator(); | 2179 | fileMenu->insertSeparator(); |
2180 | 2180 | ||
2181 | mActionNewContact->plug( fileMenu ); | 2181 | mActionNewContact->plug( fileMenu ); |
2182 | mActionNewContact->plug( tb ); | 2182 | mActionNewContact->plug( tb ); |
2183 | 2183 | ||
2184 | mActionEditAddressee->plug( fileMenu ); | 2184 | mActionEditAddressee->plug( fileMenu ); |
2185 | // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || | 2185 | // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || |
2186 | // (!KABPrefs::instance()->mMultipleViewsAtOnce )) | 2186 | // (!KABPrefs::instance()->mMultipleViewsAtOnce )) |
2187 | mActionEditAddressee->plug( tb ); | 2187 | mActionEditAddressee->plug( tb ); |
2188 | 2188 | ||
2189 | fileMenu->insertSeparator(); | 2189 | fileMenu->insertSeparator(); |
2190 | mActionSave->plug( fileMenu ); | 2190 | mActionSave->plug( fileMenu ); |
2191 | fileMenu->insertItem( "&Import", ImportMenu ); | 2191 | fileMenu->insertItem( "&Import", ImportMenu ); |
2192 | fileMenu->insertItem( "&Export", ExportMenu ); | 2192 | fileMenu->insertItem( "&Export", ExportMenu ); |
2193 | fileMenu->insertItem( i18n("&Change"), changeMenu ); | 2193 | fileMenu->insertItem( i18n("&Change"), changeMenu ); |
2194 | #ifndef DESKTOP_VERSION | 2194 | #ifndef DESKTOP_VERSION |
2195 | if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu ); | 2195 | if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu ); |
2196 | #endif | 2196 | #endif |
2197 | #if 0 | 2197 | #if 0 |
2198 | // PENDING fix MailVCard | 2198 | // PENDING fix MailVCard |
2199 | fileMenu->insertSeparator(); | 2199 | fileMenu->insertSeparator(); |
2200 | mActionMailVCard->plug( fileMenu ); | 2200 | mActionMailVCard->plug( fileMenu ); |
2201 | #endif | 2201 | #endif |
2202 | #ifndef DESKTOP_VERSION | 2202 | #ifndef DESKTOP_VERSION |
2203 | if ( Ir::supported() ) mActionBR->plug( beamMenu ); | 2203 | if ( Ir::supported() ) mActionBR->plug( beamMenu ); |
2204 | if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu ); | 2204 | if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu ); |
2205 | if ( Ir::supported() ) mActionBeam->plug( beamMenu ); | 2205 | if ( Ir::supported() ) mActionBeam->plug( beamMenu ); |
2206 | #endif | 2206 | #endif |
2207 | fileMenu->insertSeparator(); | 2207 | fileMenu->insertSeparator(); |
2208 | mActionQuit->plug( fileMenu ); | 2208 | mActionQuit->plug( fileMenu ); |
2209 | #ifdef _OL_IMPORT_ | 2209 | #ifdef _OL_IMPORT_ |
2210 | mActionImportOL->plug( ImportMenu ); | 2210 | mActionImportOL->plug( ImportMenu ); |
2211 | #endif | 2211 | #endif |
2212 | // edit menu | 2212 | // edit menu |
2213 | mActionUndo->plug( editMenu ); | 2213 | mActionUndo->plug( editMenu ); |
2214 | mActionRedo->plug( editMenu ); | 2214 | mActionRedo->plug( editMenu ); |
2215 | editMenu->insertSeparator(); | 2215 | editMenu->insertSeparator(); |
2216 | mActionCut->plug( editMenu ); | 2216 | mActionCut->plug( editMenu ); |
2217 | mActionCopy->plug( editMenu ); | 2217 | mActionCopy->plug( editMenu ); |
2218 | mActionPaste->plug( editMenu ); | 2218 | mActionPaste->plug( editMenu ); |
2219 | mActionDelete->plug( editMenu ); | 2219 | mActionDelete->plug( editMenu ); |
2220 | editMenu->insertSeparator(); | 2220 | editMenu->insertSeparator(); |
2221 | mActionSelectAll->plug( editMenu ); | 2221 | mActionSelectAll->plug( editMenu ); |
2222 | 2222 | ||
2223 | mActionSetFormattedName->plug( changeMenu ); | 2223 | mActionSetFormattedName->plug( changeMenu ); |
2224 | mActionRemoveVoice->plug( changeMenu ); | 2224 | mActionRemoveVoice->plug( changeMenu ); |
2225 | // settingsmings menu | 2225 | // settingsmings menu |
2226 | //US special menuentry to configure the addressbook resources. On KDE | 2226 | //US special menuentry to configure the addressbook resources. On KDE |
2227 | // you do that through the control center !!! | 2227 | // you do that through the control center !!! |
2228 | // settingsMenu->insertSeparator(); | 2228 | // settingsMenu->insertSeparator(); |
2229 | 2229 | ||
2230 | mActionConfigKAddressbook->plug( settingsMenu, 0 ); | 2230 | mActionConfigKAddressbook->plug( settingsMenu, 0 ); |
2231 | mActionConfigResources->plug( settingsMenu,1 ); | 2231 | mActionConfigResources->plug( settingsMenu,1 ); |
2232 | settingsMenu->insertSeparator(2); | 2232 | settingsMenu->insertSeparator(2); |
2233 | 2233 | ||
2234 | if ( mIsPart ) { | 2234 | if ( mIsPart ) { |
2235 | //US not implemented yet | 2235 | //US not implemented yet |
2236 | //mActionConfigShortcuts->plug( settingsMenu ); | 2236 | //mActionConfigShortcuts->plug( settingsMenu ); |
2237 | //mActionConfigureToolbars->plug( settingsMenu ); | 2237 | //mActionConfigureToolbars->plug( settingsMenu ); |
2238 | 2238 | ||
2239 | } else { | 2239 | } else { |
2240 | //US not implemented yet | 2240 | //US not implemented yet |
2241 | //mActionKeyBindings->plug( settingsMenu ); | 2241 | //mActionKeyBindings->plug( settingsMenu ); |
2242 | } | 2242 | } |
2243 | 2243 | ||
2244 | settingsMenu->insertSeparator(); | 2244 | settingsMenu->insertSeparator(); |
2245 | 2245 | ||
2246 | mActionJumpBar->plug( settingsMenu ); | 2246 | mActionJumpBar->plug( settingsMenu ); |
2247 | mActionDetails->plug( settingsMenu ); | 2247 | mActionDetails->plug( settingsMenu ); |
2248 | //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) | 2248 | //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) |
2249 | mActionDetails->plug( tb ); | 2249 | mActionDetails->plug( tb ); |
2250 | settingsMenu->insertSeparator(); | 2250 | settingsMenu->insertSeparator(); |
2251 | #ifndef DESKTOP_VERSION | 2251 | #ifndef DESKTOP_VERSION |
2252 | if ( Ir::supported() ) mActionBR->plug(settingsMenu ); | 2252 | if ( Ir::supported() ) mActionBR->plug(settingsMenu ); |
2253 | settingsMenu->insertSeparator(); | 2253 | settingsMenu->insertSeparator(); |
2254 | #endif | 2254 | #endif |
2255 | 2255 | ||
2256 | mActionWhoAmI->plug( settingsMenu ); | 2256 | mActionWhoAmI->plug( settingsMenu ); |
2257 | mActionEditCategories->plug( settingsMenu ); | 2257 | mActionEditCategories->plug( settingsMenu ); |
2258 | mActionEditCategories->plug( changeMenu ); | 2258 | mActionEditCategories->plug( changeMenu ); |
2259 | mActionCategories->plug( changeMenu ); | 2259 | mActionCategories->plug( changeMenu ); |
2260 | mActionManageCategories->plug( changeMenu ); | 2260 | mActionManageCategories->plug( changeMenu ); |
2261 | 2261 | ||
2262 | mActionCategories->plug( settingsMenu ); | 2262 | mActionCategories->plug( settingsMenu ); |
2263 | mActionManageCategories->plug( settingsMenu ); | 2263 | mActionManageCategories->plug( settingsMenu ); |
2264 | 2264 | ||
2265 | 2265 | ||
2266 | mActionWN->plug( helpMenu ); | 2266 | mActionWN->plug( helpMenu ); |
2267 | mActionSyncHowto->plug( helpMenu ); | 2267 | mActionSyncHowto->plug( helpMenu ); |
2268 | mActionKdeSyncHowto->plug( helpMenu ); | 2268 | mActionKdeSyncHowto->plug( helpMenu ); |
2269 | mActionMultiSyncHowto->plug( helpMenu ); | 2269 | mActionMultiSyncHowto->plug( helpMenu ); |
2270 | mActionFaq->plug( helpMenu ); | 2270 | mActionFaq->plug( helpMenu ); |
2271 | mActionLicence->plug( helpMenu ); | 2271 | mActionLicence->plug( helpMenu ); |
2272 | mActionAboutKAddressbook->plug( helpMenu ); | 2272 | mActionAboutKAddressbook->plug( helpMenu ); |
2273 | 2273 | ||
2274 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { | 2274 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { |
2275 | 2275 | ||
2276 | mActionSave->plug( tb ); | 2276 | mActionSave->plug( tb ); |
2277 | mViewManager->getFilterAction()->plug ( tb); | 2277 | mViewManager->getFilterAction()->plug ( tb); |
2278 | //LR hide filteraction on started in 480x640 | 2278 | //LR hide filteraction on started in 480x640 |
2279 | if (QApplication::desktop()->width() == 480 ) { | 2279 | if (QApplication::desktop()->width() == 480 ) { |
2280 | mViewManager->getFilterAction()->setComboWidth( 0 ); | 2280 | mViewManager->getFilterAction()->setComboWidth( 0 ); |
2281 | } | 2281 | } |
2282 | mActionUndo->plug( tb ); | 2282 | mActionUndo->plug( tb ); |
2283 | mActionDelete->plug( tb ); | 2283 | mActionDelete->plug( tb ); |
2284 | mActionRedo->plug( tb ); | 2284 | mActionRedo->plug( tb ); |
2285 | } else { | 2285 | } else { |
2286 | mActionSave->plug( tb ); | 2286 | mActionSave->plug( tb ); |
2287 | tb->enableMoving(false); | 2287 | tb->enableMoving(false); |
2288 | } | 2288 | } |
2289 | //mActionQuit->plug ( tb ); | 2289 | //mActionQuit->plug ( tb ); |
2290 | // tb->insertWidget(-1, 0, mIncSearchWidget, 6); | 2290 | // tb->insertWidget(-1, 0, mIncSearchWidget, 6); |
2291 | 2291 | ||
2292 | //US link the searchwidget first to this. | 2292 | //US link the searchwidget first to this. |
2293 | // The real linkage to the toolbar happens later. | 2293 | // The real linkage to the toolbar happens later. |
2294 | //US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); | 2294 | //US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); |
2295 | //US tb->insertItem( mIncSearchWidget ); | 2295 | //US tb->insertItem( mIncSearchWidget ); |
2296 | /*US | 2296 | /*US |
2297 | mIncSearchWidget = new IncSearchWidget( tb ); | 2297 | mIncSearchWidget = new IncSearchWidget( tb ); |
2298 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), | 2298 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), |
2299 | SLOT( incrementalSearch( const QString& ) ) ); | 2299 | SLOT( incrementalSearch( const QString& ) ) ); |
2300 | 2300 | ||
2301 | mJumpButtonBar = new JumpButtonBar( this, this ); | 2301 | mJumpButtonBar = new JumpButtonBar( this, this ); |
2302 | 2302 | ||
2303 | //US topLayout->addWidget( mJumpButtonBar ); | 2303 | //US topLayout->addWidget( mJumpButtonBar ); |
2304 | this->layout()->add( mJumpButtonBar ); | 2304 | this->layout()->add( mJumpButtonBar ); |
2305 | */ | 2305 | */ |
2306 | 2306 | ||
2307 | #endif //KAB_EMBEDDED | 2307 | #endif //KAB_EMBEDDED |
2308 | 2308 | ||
2309 | mActionExport2phone->plug( ExportMenu ); | 2309 | mActionExport2phone->plug( ExportMenu ); |
2310 | connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); | 2310 | connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); |
2311 | syncManager->fillSyncMenu(); | 2311 | syncManager->fillSyncMenu(); |
2312 | 2312 | ||
2313 | } | 2313 | } |
2314 | void KABCore::showLicence() | 2314 | void KABCore::showLicence() |
2315 | { | 2315 | { |
2316 | KApplication::showLicence(); | 2316 | KApplication::showLicence(); |
2317 | } | 2317 | } |
2318 | 2318 | ||
2319 | void KABCore::manageCategories( ) | 2319 | void KABCore::manageCategories( ) |
2320 | { | 2320 | { |
2321 | KABCatPrefs* cp = new KABCatPrefs(); | 2321 | KABCatPrefs* cp = new KABCatPrefs(); |
2322 | cp->show(); | 2322 | cp->show(); |
2323 | int w =cp->sizeHint().width() ; | 2323 | int w =cp->sizeHint().width() ; |
2324 | int h = cp->sizeHint().height() ; | 2324 | int h = cp->sizeHint().height() ; |
2325 | int dw = QApplication::desktop()->width(); | 2325 | int dw = QApplication::desktop()->width(); |
2326 | int dh = QApplication::desktop()->height(); | 2326 | int dh = QApplication::desktop()->height(); |
2327 | cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2327 | cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2328 | if ( !cp->exec() ) { | 2328 | if ( !cp->exec() ) { |
2329 | delete cp; | 2329 | delete cp; |
2330 | return; | 2330 | return; |
2331 | } | 2331 | } |
2332 | int count = 0; | 2332 | int count = 0; |
2333 | int cc = 0; | 2333 | int cc = 0; |
2334 | message( i18n("Please wait, processing categories...")); | 2334 | message( i18n("Please wait, processing categories...")); |
2335 | if ( cp->addCat() ) { | 2335 | if ( cp->addCat() ) { |
2336 | KABC::AddressBook::Iterator it; | 2336 | KABC::AddressBook::Iterator it; |
2337 | QStringList catList = KABPrefs::instance()->mCustomCategories; | 2337 | QStringList catList = KABPrefs::instance()->mCustomCategories; |
2338 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2338 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2339 | ++cc; | 2339 | ++cc; |
2340 | if ( cc %10 == 0) | 2340 | if ( cc %10 == 0) |
2341 | message(i18n("Processing contact #%1").arg(cc)); | 2341 | message(i18n("Processing contact #%1").arg(cc)); |
2342 | QStringList catIncList = (*it).categories(); | 2342 | QStringList catIncList = (*it).categories(); |
2343 | int i; | 2343 | int i; |
2344 | for( i = 0; i< catIncList.count(); ++i ) { | 2344 | for( i = 0; i< catIncList.count(); ++i ) { |
2345 | if ( !catList.contains (catIncList[i])) { | 2345 | if ( !catList.contains (catIncList[i])) { |
2346 | catList.append( catIncList[i] ); | 2346 | catList.append( catIncList[i] ); |
2347 | //qDebug("add cat %s ", catIncList[i].latin1()); | 2347 | //qDebug("add cat %s ", catIncList[i].latin1()); |
2348 | ++count; | 2348 | ++count; |
2349 | } | 2349 | } |
2350 | } | 2350 | } |
2351 | } | 2351 | } |
2352 | catList.sort(); | 2352 | catList.sort(); |
2353 | KABPrefs::instance()->mCustomCategories = catList; | 2353 | KABPrefs::instance()->mCustomCategories = catList; |
2354 | KABPrefs::instance()->writeConfig(); | 2354 | KABPrefs::instance()->writeConfig(); |
2355 | message(QString::number( count )+ i18n(" categories added to list! ")); | 2355 | message(QString::number( count )+ i18n(" categories added to list! ")); |
2356 | } else { | 2356 | } else { |
2357 | QStringList catList = KABPrefs::instance()->mCustomCategories; | 2357 | QStringList catList = KABPrefs::instance()->mCustomCategories; |
2358 | QStringList catIncList; | 2358 | QStringList catIncList; |
2359 | QStringList newCatList; | 2359 | QStringList newCatList; |
2360 | KABC::AddressBook::Iterator it; | 2360 | KABC::AddressBook::Iterator it; |
2361 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2361 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2362 | ++cc; | 2362 | ++cc; |
2363 | if ( cc %10 == 0) | 2363 | if ( cc %10 == 0) |
2364 | message(i18n("Processing contact #%1").arg(cc)); | 2364 | message(i18n("Processing contact #%1").arg(cc)); |
2365 | QStringList catIncList = (*it).categories(); | 2365 | QStringList catIncList = (*it).categories(); |
2366 | int i; | 2366 | int i; |
2367 | if ( catIncList.count() ) { | 2367 | if ( catIncList.count() ) { |
2368 | newCatList.clear(); | 2368 | newCatList.clear(); |
2369 | for( i = 0; i< catIncList.count(); ++i ) { | 2369 | for( i = 0; i< catIncList.count(); ++i ) { |
2370 | if ( catList.contains (catIncList[i])) { | 2370 | if ( catList.contains (catIncList[i])) { |
2371 | newCatList.append( catIncList[i] ); | 2371 | newCatList.append( catIncList[i] ); |
2372 | } | 2372 | } |
2373 | } | 2373 | } |
2374 | newCatList.sort(); | 2374 | newCatList.sort(); |
2375 | (*it).setCategories( newCatList ); | 2375 | (*it).setCategories( newCatList ); |
2376 | mAddressBook->insertAddressee( (*it) ); | 2376 | mAddressBook->insertAddressee( (*it) ); |
2377 | } | 2377 | } |
2378 | } | 2378 | } |
2379 | setModified( true ); | 2379 | setModified( true ); |
2380 | mViewManager->refreshView(); | 2380 | mViewManager->refreshView(); |
2381 | message( i18n("Removing categories done!")); | 2381 | message( i18n("Removing categories done!")); |
2382 | } | 2382 | } |
2383 | delete cp; | 2383 | delete cp; |
2384 | } | 2384 | } |
2385 | void KABCore::removeVoice() | 2385 | void KABCore::removeVoice() |
2386 | { | 2386 | { |
2387 | if ( KMessageBox::questionYesNo( this, i18n("After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as \"other\".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?") ) == KMessageBox::No ) | 2387 | if ( KMessageBox::questionYesNo( this, i18n("After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as \"other\".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?") ) == KMessageBox::No ) |
2388 | return; | 2388 | return; |
2389 | XXPortSelectDialog dlg( this, false, this ); | 2389 | XXPortSelectDialog dlg( this, false, this ); |
2390 | if ( !dlg.exec() ) | 2390 | if ( !dlg.exec() ) |
2391 | return; | 2391 | return; |
2392 | mAddressBook->setUntagged(); | 2392 | mAddressBook->setUntagged(); |
2393 | dlg.tagSelected(); | 2393 | dlg.tagSelected(); |
2394 | message(i18n("Removing voice..."), false ); | 2394 | message(i18n("Removing voice..."), false ); |
2395 | KABC::AddressBook::Iterator it; | 2395 | KABC::AddressBook::Iterator it; |
2396 | for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2396 | for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2397 | if ( (*it).tagged() ) { | 2397 | if ( (*it).tagged() ) { |
2398 | (*it).removeVoice(); | 2398 | (*it).removeVoice(); |
2399 | } | 2399 | } |
2400 | } | 2400 | } |
2401 | message(i18n("Refreshing view...") ); | 2401 | message(i18n("Refreshing view...") ); |
2402 | qApp->processEvents(); | 2402 | qApp->processEvents(); |
2403 | mViewManager->refreshView( "" ); | 2403 | mViewManager->refreshView( "" ); |
2404 | Addressee add; | 2404 | Addressee add; |
2405 | mDetails->setAddressee( add ); | 2405 | mDetails->setAddressee( add ); |
2406 | message(i18n("Remove voice completed!") ); | 2406 | message(i18n("Remove voice completed!") ); |
2407 | 2407 | ||
2408 | 2408 | ||
2409 | 2409 | ||
2410 | } | 2410 | } |
2411 | 2411 | ||
2412 | void KABCore::setFormattedName() | 2412 | void KABCore::setFormattedName() |
2413 | { | 2413 | { |
2414 | KABFormatPrefs setpref; | 2414 | KABFormatPrefs setpref; |
2415 | if ( !setpref.exec() ) { | 2415 | if ( !setpref.exec() ) { |
2416 | return; | 2416 | return; |
2417 | } | 2417 | } |
2418 | XXPortSelectDialog dlg( this, false, this ); | 2418 | XXPortSelectDialog dlg( this, false, this ); |
2419 | if ( !dlg.exec() ) | 2419 | if ( !dlg.exec() ) |
2420 | return; | 2420 | return; |
2421 | mAddressBook->setUntagged(); | 2421 | mAddressBook->setUntagged(); |
2422 | dlg.tagSelected(); | 2422 | dlg.tagSelected(); |
2423 | int count = 0; | 2423 | int count = 0; |
2424 | KABC::AddressBook::Iterator it; | 2424 | KABC::AddressBook::Iterator it; |
2425 | for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2425 | for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2426 | if ( (*it).tagged() ) { | 2426 | if ( (*it).tagged() ) { |
2427 | ++count; | 2427 | ++count; |
2428 | if ( count %10 == 0 ) | 2428 | if ( count %10 == 0 ) |
2429 | message(i18n("Changing contact #%1").arg( count ) ); | 2429 | message(i18n("Changing contact #%1").arg( count ) ); |
2430 | qApp->processEvents(); | 2430 | qApp->processEvents(); |
2431 | QString fName; | 2431 | QString fName; |
2432 | if ( setpref.simple->isChecked() ) | 2432 | if ( setpref.simple->isChecked() ) |
2433 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName ); | 2433 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName ); |
2434 | else if ( setpref.full->isChecked() ) | 2434 | else if ( setpref.full->isChecked() ) |
2435 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName ); | 2435 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName ); |
2436 | else if ( setpref.reverse->isChecked() ) | 2436 | else if ( setpref.reverse->isChecked() ) |
2437 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName ); | 2437 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName ); |
2438 | else | 2438 | else |
2439 | fName = (*it).organization(); | 2439 | fName = (*it).organization(); |
2440 | if ( setpref.setCompany->isChecked() ) | 2440 | if ( setpref.setCompany->isChecked() ) |
2441 | if ( fName.isEmpty() || fName =="," ) | 2441 | if ( fName.isEmpty() || fName =="," ) |
2442 | fName = (*it).organization(); | 2442 | fName = (*it).organization(); |
2443 | (*it).setFormattedName( fName ); | 2443 | (*it).setFormattedName( fName ); |
2444 | } | 2444 | } |
2445 | } | 2445 | } |
2446 | message(i18n("Refreshing view...") ); | 2446 | message(i18n("Refreshing view...") ); |
2447 | qApp->processEvents(); | 2447 | qApp->processEvents(); |
2448 | mViewManager->refreshView( "" ); | 2448 | mViewManager->refreshView( "" ); |
2449 | Addressee add; | 2449 | Addressee add; |
2450 | mDetails->setAddressee( add ); | 2450 | mDetails->setAddressee( add ); |
2451 | message(i18n("Setting formatted name completed!") ); | 2451 | message(i18n("Setting formatted name completed!") ); |
2452 | } | 2452 | } |
2453 | 2453 | ||
2454 | void KABCore::clipboardDataChanged() | 2454 | void KABCore::clipboardDataChanged() |
2455 | { | 2455 | { |
2456 | 2456 | ||
2457 | if ( mReadWrite ) | 2457 | if ( mReadWrite ) |
2458 | mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() ); | 2458 | mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() ); |
2459 | 2459 | ||
2460 | } | 2460 | } |
2461 | 2461 | ||
2462 | void KABCore::updateActionMenu() | 2462 | void KABCore::updateActionMenu() |
2463 | { | 2463 | { |
2464 | UndoStack *undo = UndoStack::instance(); | 2464 | UndoStack *undo = UndoStack::instance(); |
2465 | RedoStack *redo = RedoStack::instance(); | 2465 | RedoStack *redo = RedoStack::instance(); |
2466 | 2466 | ||
2467 | if ( undo->isEmpty() ) | 2467 | if ( undo->isEmpty() ) |
2468 | mActionUndo->setText( i18n( "Undo" ) ); | 2468 | mActionUndo->setText( i18n( "Undo" ) ); |
2469 | else | 2469 | else |
2470 | mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) ); | 2470 | mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) ); |
2471 | 2471 | ||
2472 | mActionUndo->setEnabled( !undo->isEmpty() ); | 2472 | mActionUndo->setEnabled( !undo->isEmpty() ); |
2473 | 2473 | ||
2474 | if ( !redo->top() ) | 2474 | if ( !redo->top() ) |
2475 | mActionRedo->setText( i18n( "Redo" ) ); | 2475 | mActionRedo->setText( i18n( "Redo" ) ); |
2476 | else | 2476 | else |
2477 | mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) ); | 2477 | mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) ); |
2478 | 2478 | ||
2479 | mActionRedo->setEnabled( !redo->isEmpty() ); | 2479 | mActionRedo->setEnabled( !redo->isEmpty() ); |
2480 | } | 2480 | } |
2481 | 2481 | ||
2482 | void KABCore::configureKeyBindings() | 2482 | void KABCore::configureKeyBindings() |
2483 | { | 2483 | { |
2484 | #ifndef KAB_EMBEDDED | 2484 | #ifndef KAB_EMBEDDED |
2485 | KKeyDialog::configure( actionCollection(), true ); | 2485 | KKeyDialog::configure( actionCollection(), true ); |
2486 | #else //KAB_EMBEDDED | 2486 | #else //KAB_EMBEDDED |
2487 | qDebug("KABCore::configureKeyBindings() not implemented"); | 2487 | qDebug("KABCore::configureKeyBindings() not implemented"); |
2488 | #endif //KAB_EMBEDDED | 2488 | #endif //KAB_EMBEDDED |
2489 | } | 2489 | } |
2490 | 2490 | ||
2491 | #ifdef KAB_EMBEDDED | 2491 | #ifdef KAB_EMBEDDED |
2492 | void KABCore::configureResources() | 2492 | void KABCore::configureResources() |
2493 | { | 2493 | { |
2494 | KRES::KCMKResources dlg( this, "" , 0 ); | 2494 | KRES::KCMKResources dlg( this, "" , 0 ); |
2495 | 2495 | ||
2496 | if ( !dlg.exec() ) | 2496 | if ( !dlg.exec() ) |
2497 | return; | 2497 | return; |
2498 | KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") ); | 2498 | KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") ); |
2499 | } | 2499 | } |
2500 | #endif //KAB_EMBEDDED | 2500 | #endif //KAB_EMBEDDED |
2501 | 2501 | ||
2502 | 2502 | ||
2503 | /* this method will be called through the QCop interface from Ko/Pi to select addresses | 2503 | /* this method will be called through the QCop interface from Ko/Pi to select addresses |
2504 | * for the attendees list of an event. | 2504 | * for the attendees list of an event. |
2505 | */ | 2505 | */ |
2506 | void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid) | 2506 | void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid) |
2507 | { | 2507 | { |
2508 | QStringList nameList; | 2508 | QStringList nameList; |
2509 | QStringList emailList; | 2509 | QStringList emailList; |
2510 | QStringList uidList; | 2510 | QStringList uidList; |
2511 | bool ok = false; | 2511 | bool ok = false; |
2512 | int wid = uid.toInt( &ok ); | 2512 | int wid = uid.toInt( &ok ); |
2513 | if ( ok ) { | 2513 | if ( ok ) { |
2514 | if ( wid != QApplication::desktop()->width() ) { | 2514 | if ( wid != QApplication::desktop()->width() ) { |
2515 | qDebug("KA/Pi: Request from different desktop geometry. Resizing ..."); | 2515 | qDebug("KA/Pi: Request from different desktop geometry. Resizing ..."); |
2516 | message( i18n("Resizing, please wait...") ); | ||
2516 | raise(); | 2517 | raise(); |
2517 | qApp->processEvents(); | 2518 | qApp->processEvents(); |
2518 | } | 2519 | } |
2519 | 2520 | ||
2520 | } else { | 2521 | } else { |
2521 | qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid "); | 2522 | qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid "); |
2522 | } | 2523 | } |
2523 | 2524 | ||
2524 | KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); | 2525 | KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); |
2525 | uint i=0; | 2526 | uint i=0; |
2526 | for (i=0; i < list.count(); i++) | 2527 | for (i=0; i < list.count(); i++) |
2527 | { | 2528 | { |
2528 | nameList.append(list[i].realName()); | 2529 | nameList.append(list[i].realName()); |
2529 | emailList.append(list[i].preferredEmail()); | 2530 | emailList.append(list[i].preferredEmail()); |
2530 | uidList.append(list[i].uid()); | 2531 | uidList.append(list[i].uid()); |
2531 | } | 2532 | } |
2532 | //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1()); | 2533 | //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1()); |
2533 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList); | 2534 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList); |
2534 | 2535 | ||
2535 | } | 2536 | } |
2536 | 2537 | ||
2537 | /* this method will be called through the QCop interface from Ko/Pi to select birthdays | 2538 | /* this method will be called through the QCop interface from Ko/Pi to select birthdays |
2538 | * to put them into the calendar. | 2539 | * to put them into the calendar. |
2539 | */ | 2540 | */ |
2540 | void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid) | 2541 | void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid) |
2541 | { | 2542 | { |
2542 | // qDebug("KABCore::requestForBirthdayList"); | 2543 | // qDebug("KABCore::requestForBirthdayList"); |
2543 | QStringList birthdayList; | 2544 | QStringList birthdayList; |
2544 | QStringList anniversaryList; | 2545 | QStringList anniversaryList; |
2545 | QStringList realNameList; | 2546 | QStringList realNameList; |
2546 | QStringList preferredEmailList; | 2547 | QStringList preferredEmailList; |
2547 | QStringList assembledNameList; | 2548 | QStringList assembledNameList; |
2548 | QStringList uidList; | 2549 | QStringList uidList; |
2549 | 2550 | ||
2550 | KABC::AddressBook::Iterator it; | 2551 | KABC::AddressBook::Iterator it; |
2551 | 2552 | ||
2552 | int count = 0; | 2553 | int count = 0; |
2553 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2554 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2554 | ++count; | 2555 | ++count; |
2555 | } | 2556 | } |
2556 | QProgressBar bar(count,0 ); | 2557 | QProgressBar bar(count,0 ); |
2557 | int w = 300; | 2558 | int w = 300; |
2558 | if ( QApplication::desktop()->width() < 320 ) | 2559 | if ( QApplication::desktop()->width() < 320 ) |
2559 | w = 220; | 2560 | w = 220; |
2560 | int h = bar.sizeHint().height() ; | 2561 | int h = bar.sizeHint().height() ; |
2561 | int dw = QApplication::desktop()->width(); | 2562 | int dw = QApplication::desktop()->width(); |
2562 | int dh = QApplication::desktop()->height(); | 2563 | int dh = QApplication::desktop()->height(); |
2563 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2564 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2564 | bar.show(); | 2565 | bar.show(); |
2565 | bar.setCaption (i18n("Collecting birthdays - close to abort!") ); | 2566 | bar.setCaption (i18n("Collecting birthdays - close to abort!") ); |
2566 | qApp->processEvents(); | 2567 | qApp->processEvents(); |
2567 | 2568 | ||
2568 | QDate bday; | 2569 | QDate bday; |
2569 | QString anni; | 2570 | QString anni; |
2570 | QString formattedbday; | 2571 | QString formattedbday; |
2571 | 2572 | ||
2572 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) | 2573 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) |
2573 | { | 2574 | { |
2574 | if ( ! bar.isVisible() ) | 2575 | if ( ! bar.isVisible() ) |
2575 | return; | 2576 | return; |
2576 | bar.setProgress( count++ ); | 2577 | bar.setProgress( count++ ); |
2577 | qApp->processEvents(); | 2578 | qApp->processEvents(); |
2578 | bday = (*it).birthday().date(); | 2579 | bday = (*it).birthday().date(); |
2579 | anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" ); | 2580 | anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" ); |
2580 | 2581 | ||
2581 | if ( bday.isValid() || !anni.isEmpty()) | 2582 | if ( bday.isValid() || !anni.isEmpty()) |
2582 | { | 2583 | { |
2583 | if (bday.isValid()) | 2584 | if (bday.isValid()) |
2584 | formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate); | 2585 | formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate); |
2585 | else | 2586 | else |
2586 | formattedbday = "NOTVALID"; | 2587 | formattedbday = "NOTVALID"; |
2587 | if (anni.isEmpty()) | 2588 | if (anni.isEmpty()) |
2588 | anni = "INVALID"; | 2589 | anni = "INVALID"; |
2589 | 2590 | ||
2590 | birthdayList.append(formattedbday); | 2591 | birthdayList.append(formattedbday); |
2591 | anniversaryList.append(anni); //should be ISODate | 2592 | anniversaryList.append(anni); //should be ISODate |
2592 | realNameList.append((*it).realName()); | 2593 | realNameList.append((*it).realName()); |
2593 | preferredEmailList.append((*it).preferredEmail()); | 2594 | preferredEmailList.append((*it).preferredEmail()); |
2594 | assembledNameList.append((*it).assembledName()); | 2595 | assembledNameList.append((*it).assembledName()); |
2595 | uidList.append((*it).uid()); | 2596 | uidList.append((*it).uid()); |
2596 | 2597 | ||
2597 | //qDebug("found birthday in KA/Pi: %s,%s,%s,%s: %s, %s", (*it).realName().latin1(), (*it).preferredEmail().latin1(), (*it).assembledName().latin1(), (*it).uid().latin1(), formattedbday.latin1(), anni.latin1() ); | 2598 | //qDebug("found birthday in KA/Pi: %s,%s,%s,%s: %s, %s", (*it).realName().latin1(), (*it).preferredEmail().latin1(), (*it).assembledName().latin1(), (*it).uid().latin1(), formattedbday.latin1(), anni.latin1() ); |
2598 | } | 2599 | } |
2599 | } | 2600 | } |
2600 | 2601 | ||
2601 | bool res = ExternalAppHandler::instance()->returnBirthdayListFromKAPI(sourceChannel, uid, birthdayList, anniversaryList, realNameList, preferredEmailList, assembledNameList, uidList); | 2602 | bool res = ExternalAppHandler::instance()->returnBirthdayListFromKAPI(sourceChannel, uid, birthdayList, anniversaryList, realNameList, preferredEmailList, assembledNameList, uidList); |
2602 | 2603 | ||
2603 | } | 2604 | } |
2604 | 2605 | ||
2605 | /* this method will be called through the QCop interface from other apps to show details of a contact. | 2606 | /* this method will be called through the QCop interface from other apps to show details of a contact. |
2606 | */ | 2607 | */ |
2607 | void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid) | 2608 | void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid) |
2608 | { | 2609 | { |
2609 | //qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1()); | 2610 | //qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1()); |
2610 | 2611 | ||
2611 | QString foundUid = QString::null; | 2612 | QString foundUid = QString::null; |
2612 | if ( ! uid.isEmpty() ) { | 2613 | if ( ! uid.isEmpty() ) { |
2613 | Addressee adrr = mAddressBook->findByUid( uid ); | 2614 | Addressee adrr = mAddressBook->findByUid( uid ); |
2614 | if ( !adrr.isEmpty() ) { | 2615 | if ( !adrr.isEmpty() ) { |
2615 | foundUid = uid; | 2616 | foundUid = uid; |
2616 | } | 2617 | } |
2617 | if ( email == "sendbacklist" ) { | 2618 | if ( email == "sendbacklist" ) { |
2618 | //qDebug("ssssssssssssssssssssssend "); | 2619 | //qDebug("ssssssssssssssssssssssend "); |
2619 | QStringList nameList; | 2620 | QStringList nameList; |
2620 | QStringList emailList; | 2621 | QStringList emailList; |
2621 | QStringList uidList; | 2622 | QStringList uidList; |
2622 | nameList.append(adrr.realName()); | 2623 | nameList.append(adrr.realName()); |
2623 | emailList = adrr.emails(); | 2624 | emailList = adrr.emails(); |
2624 | uidList.append( adrr.preferredEmail()); | 2625 | uidList.append( adrr.preferredEmail()); |
2625 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); | 2626 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); |
2626 | return; | 2627 | return; |
2627 | } | 2628 | } |
2628 | 2629 | ||
2629 | } | 2630 | } |
2630 | 2631 | ||
2631 | if ( email == "sendbacklist" ) | 2632 | if ( email == "sendbacklist" ) |
2632 | return; | 2633 | return; |
2633 | if (foundUid.isEmpty()) | 2634 | if (foundUid.isEmpty()) |
2634 | { | 2635 | { |
2635 | //find the uid of the person first | 2636 | //find the uid of the person first |
2636 | Addressee::List namelist; | 2637 | Addressee::List namelist; |
2637 | Addressee::List emaillist; | 2638 | Addressee::List emaillist; |
2638 | 2639 | ||
2639 | if (!name.isEmpty()) | 2640 | if (!name.isEmpty()) |
2640 | namelist = mAddressBook->findByName( name ); | 2641 | namelist = mAddressBook->findByName( name ); |
2641 | 2642 | ||
2642 | if (!email.isEmpty()) | 2643 | if (!email.isEmpty()) |
2643 | emaillist = mAddressBook->findByEmail( email ); | 2644 | emaillist = mAddressBook->findByEmail( email ); |
2644 | //qDebug("count %d %d ", namelist.count(),emaillist.count() ); | 2645 | //qDebug("count %d %d ", namelist.count(),emaillist.count() ); |
2645 | //check if we have a match in Namelist and Emaillist | 2646 | //check if we have a match in Namelist and Emaillist |
2646 | if ((namelist.count() == 0) && (emaillist.count() > 0)) { | 2647 | if ((namelist.count() == 0) && (emaillist.count() > 0)) { |
2647 | foundUid = emaillist[0].uid(); | 2648 | foundUid = emaillist[0].uid(); |
2648 | } | 2649 | } |
2649 | else if ((namelist.count() > 0) && (emaillist.count() == 0)) | 2650 | else if ((namelist.count() > 0) && (emaillist.count() == 0)) |
2650 | foundUid = namelist[0].uid(); | 2651 | foundUid = namelist[0].uid(); |
2651 | else | 2652 | else |
2652 | { | 2653 | { |
2653 | for (int i = 0; i < namelist.count(); i++) | 2654 | for (int i = 0; i < namelist.count(); i++) |
2654 | { | 2655 | { |
2655 | for (int j = 0; j < emaillist.count(); j++) | 2656 | for (int j = 0; j < emaillist.count(); j++) |
2656 | { | 2657 | { |
2657 | if (namelist[i] == emaillist[j]) | 2658 | if (namelist[i] == emaillist[j]) |
2658 | { | 2659 | { |
2659 | foundUid = namelist[i].uid(); | 2660 | foundUid = namelist[i].uid(); |
2660 | } | 2661 | } |
2661 | } | 2662 | } |
2662 | } | 2663 | } |
2663 | } | 2664 | } |
2664 | } | 2665 | } |
2665 | else | 2666 | else |
2666 | { | 2667 | { |
2667 | foundUid = uid; | 2668 | foundUid = uid; |
2668 | } | 2669 | } |
2669 | 2670 | ||
2670 | if (!foundUid.isEmpty()) | 2671 | if (!foundUid.isEmpty()) |
2671 | { | 2672 | { |
2672 | 2673 | ||
2673 | // raise Ka/Pi if it is in the background | 2674 | // raise Ka/Pi if it is in the background |
2674 | #ifndef DESKTOP_VERSION | 2675 | #ifndef DESKTOP_VERSION |
2675 | #ifndef KORG_NODCOP | 2676 | #ifndef KORG_NODCOP |
2676 | //QCopEnvelope e("QPE/Application/kapi", "raise()"); | 2677 | //QCopEnvelope e("QPE/Application/kapi", "raise()"); |
2677 | #endif | 2678 | #endif |
2678 | #endif | 2679 | #endif |
2679 | 2680 | ||
2680 | mMainWindow->showMaximized(); | 2681 | mMainWindow->showMaximized(); |
2681 | mMainWindow-> raise(); | 2682 | mMainWindow-> raise(); |
2682 | 2683 | ||
2683 | mViewManager->setSelected( "", false); | 2684 | mViewManager->setSelected( "", false); |
2684 | mViewManager->refreshView( "" ); | 2685 | mViewManager->refreshView( "" ); |
2685 | mViewManager->setSelected( foundUid, true ); | 2686 | mViewManager->setSelected( foundUid, true ); |
2686 | mViewManager->refreshView( foundUid ); | 2687 | mViewManager->refreshView( foundUid ); |
2687 | 2688 | ||
2688 | if ( !mMultipleViewsAtOnce ) | 2689 | if ( !mMultipleViewsAtOnce ) |
2689 | { | 2690 | { |
2690 | setDetailsVisible( true ); | 2691 | setDetailsVisible( true ); |
2691 | mActionDetails->setChecked(true); | 2692 | mActionDetails->setChecked(true); |
2692 | } | 2693 | } |
2693 | } | 2694 | } |
2694 | } | 2695 | } |
2695 | 2696 | ||
2696 | void KABCore::whatsnew() | 2697 | void KABCore::whatsnew() |
2697 | { | 2698 | { |
2698 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); | 2699 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); |
2699 | } | 2700 | } |
2700 | void KABCore::synchowto() | 2701 | void KABCore::synchowto() |
2701 | { | 2702 | { |
2702 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); | 2703 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); |
2703 | } | 2704 | } |
2704 | void KABCore::kdesynchowto() | 2705 | void KABCore::kdesynchowto() |
2705 | { | 2706 | { |
2706 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); | 2707 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); |
2707 | } | 2708 | } |
2708 | void KABCore::multisynchowto() | 2709 | void KABCore::multisynchowto() |
2709 | { | 2710 | { |
2710 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); | 2711 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); |
2711 | } | 2712 | } |
2712 | void KABCore::faq() | 2713 | void KABCore::faq() |
2713 | { | 2714 | { |
2714 | KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" ); | 2715 | KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" ); |
2715 | } | 2716 | } |
2716 | 2717 | ||
2717 | #include <libkcal/syncdefines.h> | 2718 | #include <libkcal/syncdefines.h> |
2718 | 2719 | ||
2719 | KABC::Addressee KABCore::getLastSyncAddressee() | 2720 | KABC::Addressee KABCore::getLastSyncAddressee() |
2720 | { | 2721 | { |
2721 | Addressee lse; | 2722 | Addressee lse; |
2722 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); | 2723 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); |
2723 | 2724 | ||
2724 | //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); | 2725 | //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); |
2725 | lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice ); | 2726 | lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice ); |
2726 | if (lse.isEmpty()) { | 2727 | if (lse.isEmpty()) { |
2727 | qDebug("KA: Creating new last-syncAddressee "); | 2728 | qDebug("KA: Creating new last-syncAddressee "); |
2728 | lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice ); | 2729 | lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice ); |
2729 | QString sum = ""; | 2730 | QString sum = ""; |
2730 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) | 2731 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) |
2731 | sum = "E: "; | 2732 | sum = "E: "; |
2732 | lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event")); | 2733 | lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event")); |
2733 | lse.setRevision( mLastAddressbookSync ); | 2734 | lse.setRevision( mLastAddressbookSync ); |
2734 | lse.setCategories( i18n("SyncEvent") ); | 2735 | lse.setCategories( i18n("SyncEvent") ); |
2735 | mAddressBook->insertAddressee( lse ); | 2736 | mAddressBook->insertAddressee( lse ); |
2736 | } | 2737 | } |
2737 | return lse; | 2738 | return lse; |
2738 | } | 2739 | } |
2739 | int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ) | 2740 | int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ) |
2740 | { | 2741 | { |
2741 | 2742 | ||
2742 | //void setZaurusId(int id); | 2743 | //void setZaurusId(int id); |
2743 | // int zaurusId() const; | 2744 | // int zaurusId() const; |
2744 | // void setZaurusUid(int id); | 2745 | // void setZaurusUid(int id); |
2745 | // int zaurusUid() const; | 2746 | // int zaurusUid() const; |
2746 | // void setZaurusStat(int id); | 2747 | // void setZaurusStat(int id); |
2747 | // int zaurusStat() const; | 2748 | // int zaurusStat() const; |
2748 | // 0 equal | 2749 | // 0 equal |
2749 | // 1 take local | 2750 | // 1 take local |
2750 | // 2 take remote | 2751 | // 2 take remote |
2751 | // 3 cancel | 2752 | // 3 cancel |
2752 | QDateTime lastSync = mLastAddressbookSync; | 2753 | QDateTime lastSync = mLastAddressbookSync; |
2753 | QDateTime localMod = local->revision(); | 2754 | QDateTime localMod = local->revision(); |
2754 | QDateTime remoteMod = remote->revision(); | 2755 | QDateTime remoteMod = remote->revision(); |
2755 | 2756 | ||
2756 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); | 2757 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); |
2757 | 2758 | ||
2758 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2759 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2759 | bool remCh, locCh; | 2760 | bool remCh, locCh; |
2760 | remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); | 2761 | remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); |
2761 | //if ( remCh ) | 2762 | //if ( remCh ) |
2762 | // qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); | 2763 | // qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); |
2763 | locCh = ( localMod > mLastAddressbookSync ); | 2764 | locCh = ( localMod > mLastAddressbookSync ); |
2764 | //qDebug("cahnged rem %d loc %d",remCh, locCh ); | 2765 | //qDebug("cahnged rem %d loc %d",remCh, locCh ); |
2765 | if ( !remCh && ! locCh ) { | 2766 | if ( !remCh && ! locCh ) { |
2766 | //qDebug("both not changed "); | 2767 | //qDebug("both not changed "); |
2767 | lastSync = localMod.addDays(1); | 2768 | lastSync = localMod.addDays(1); |
2768 | if ( mode <= SYNC_PREF_ASK ) | 2769 | if ( mode <= SYNC_PREF_ASK ) |
2769 | return 0; | 2770 | return 0; |
2770 | } else { | 2771 | } else { |
2771 | if ( locCh ) { | 2772 | if ( locCh ) { |
2772 | //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1()); | 2773 | //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1()); |
2773 | lastSync = localMod.addDays( -1 ); | 2774 | lastSync = localMod.addDays( -1 ); |
2774 | if ( !remCh ) | 2775 | if ( !remCh ) |
2775 | remoteMod =( lastSync.addDays( -1 ) ); | 2776 | remoteMod =( lastSync.addDays( -1 ) ); |
2776 | } else { | 2777 | } else { |
2777 | //qDebug(" not loc changed "); | 2778 | //qDebug(" not loc changed "); |
2778 | lastSync = localMod.addDays( 1 ); | 2779 | lastSync = localMod.addDays( 1 ); |
2779 | if ( remCh ) { | 2780 | if ( remCh ) { |
2780 | //qDebug("rem changed "); | 2781 | //qDebug("rem changed "); |
2781 | remoteMod =( lastSync.addDays( 1 ) ); | 2782 | remoteMod =( lastSync.addDays( 1 ) ); |
2782 | } | 2783 | } |
2783 | 2784 | ||
2784 | } | 2785 | } |
2785 | } | 2786 | } |
2786 | full = true; | 2787 | full = true; |
2787 | if ( mode < SYNC_PREF_ASK ) | 2788 | if ( mode < SYNC_PREF_ASK ) |
2788 | mode = SYNC_PREF_ASK; | 2789 | mode = SYNC_PREF_ASK; |
2789 | } else { | 2790 | } else { |
2790 | if ( localMod == remoteMod ) | 2791 | if ( localMod == remoteMod ) |
2791 | return 0; | 2792 | return 0; |
2792 | 2793 | ||
2793 | } | 2794 | } |
2794 | //qDebug("%s %s --- %d %d", localMod.toString().latin1() , remoteMod.toString().latin1(), localMod.time().msec(), remoteMod.time().msec()); | 2795 | //qDebug("%s %s --- %d %d", localMod.toString().latin1() , remoteMod.toString().latin1(), localMod.time().msec(), remoteMod.time().msec()); |
2795 | //qDebug("lastsync %s ", lastSync.toString().latin1() ); | 2796 | //qDebug("lastsync %s ", lastSync.toString().latin1() ); |
2796 | //full = true; //debug only | 2797 | //full = true; //debug only |
2797 | if ( full ) { | 2798 | if ( full ) { |
2798 | bool equ = ( (*local) == (*remote) ); | 2799 | bool equ = ( (*local) == (*remote) ); |
2799 | if ( equ ) { | 2800 | if ( equ ) { |
2800 | //qDebug("equal "); | 2801 | //qDebug("equal "); |
2801 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2802 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2802 | local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); | 2803 | local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); |
2803 | } | 2804 | } |
2804 | if ( mode < SYNC_PREF_FORCE_LOCAL ) | 2805 | if ( mode < SYNC_PREF_FORCE_LOCAL ) |
2805 | return 0; | 2806 | return 0; |
2806 | 2807 | ||
2807 | }//else //debug only | 2808 | }//else //debug only |
2808 | //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); | 2809 | //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); |
2809 | } | 2810 | } |
2810 | int result; | 2811 | int result; |
2811 | bool localIsNew; | 2812 | bool localIsNew; |
2812 | //qDebug("%s -- %s mLastCalendarSync %s lastsync %s --- local %s remote %s ",local->summary().latin1(), remote->summary().latin1(),mLastCalendarSync.toString().latin1() ,lastSync.toString().latin1() , local->lastModified().toString().latin1() , remote->lastModified().toString().latin1() ); | 2813 | //qDebug("%s -- %s mLastCalendarSync %s lastsync %s --- local %s remote %s ",local->summary().latin1(), remote->summary().latin1(),mLastCalendarSync.toString().latin1() ,lastSync.toString().latin1() , local->lastModified().toString().latin1() , remote->lastModified().toString().latin1() ); |
2813 | 2814 | ||
2814 | if ( full && mode < SYNC_PREF_NEWEST ) | 2815 | if ( full && mode < SYNC_PREF_NEWEST ) |
2815 | mode = SYNC_PREF_ASK; | 2816 | mode = SYNC_PREF_ASK; |
2816 | 2817 | ||
2817 | switch( mode ) { | 2818 | switch( mode ) { |
2818 | case SYNC_PREF_LOCAL: | 2819 | case SYNC_PREF_LOCAL: |
2819 | if ( lastSync > remoteMod ) | 2820 | if ( lastSync > remoteMod ) |
2820 | return 1; | 2821 | return 1; |
2821 | if ( lastSync > localMod ) | 2822 | if ( lastSync > localMod ) |
2822 | return 2; | 2823 | return 2; |
2823 | return 1; | 2824 | return 1; |
2824 | break; | 2825 | break; |
2825 | case SYNC_PREF_REMOTE: | 2826 | case SYNC_PREF_REMOTE: |
2826 | if ( lastSync > remoteMod ) | 2827 | if ( lastSync > remoteMod ) |
2827 | return 1; | 2828 | return 1; |
2828 | if ( lastSync > localMod ) | 2829 | if ( lastSync > localMod ) |
2829 | return 2; | 2830 | return 2; |
2830 | return 2; | 2831 | return 2; |
2831 | break; | 2832 | break; |
2832 | case SYNC_PREF_NEWEST: | 2833 | case SYNC_PREF_NEWEST: |
2833 | if ( localMod > remoteMod ) | 2834 | if ( localMod > remoteMod ) |
2834 | return 1; | 2835 | return 1; |
2835 | else | 2836 | else |
2836 | return 2; | 2837 | return 2; |
2837 | break; | 2838 | break; |
2838 | case SYNC_PREF_ASK: | 2839 | case SYNC_PREF_ASK: |
2839 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); | 2840 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); |
2840 | if ( lastSync > remoteMod ) | 2841 | if ( lastSync > remoteMod ) |
2841 | return 1; | 2842 | return 1; |
2842 | if ( lastSync > localMod ) { | 2843 | if ( lastSync > localMod ) { |
2843 | return 2; | 2844 | return 2; |
2844 | } | 2845 | } |
2845 | localIsNew = localMod >= remoteMod; | 2846 | localIsNew = localMod >= remoteMod; |
2846 | //qDebug("conflict! ************************************** "); | 2847 | //qDebug("conflict! ************************************** "); |
2847 | { | 2848 | { |
2848 | KABC::AddresseeChooser acd ( *local,*remote, localIsNew , this ); | 2849 | KABC::AddresseeChooser acd ( *local,*remote, localIsNew , this ); |
2849 | result = acd.executeD(localIsNew); | 2850 | result = acd.executeD(localIsNew); |
2850 | return result; | 2851 | return result; |
2851 | } | 2852 | } |
2852 | break; | 2853 | break; |
2853 | case SYNC_PREF_FORCE_LOCAL: | 2854 | case SYNC_PREF_FORCE_LOCAL: |
2854 | return 1; | 2855 | return 1; |
2855 | break; | 2856 | break; |
2856 | case SYNC_PREF_FORCE_REMOTE: | 2857 | case SYNC_PREF_FORCE_REMOTE: |
2857 | return 2; | 2858 | return 2; |
2858 | break; | 2859 | break; |
2859 | 2860 | ||
2860 | default: | 2861 | default: |
2861 | // SYNC_PREF_TAKE_BOTH not implemented | 2862 | // SYNC_PREF_TAKE_BOTH not implemented |
2862 | break; | 2863 | break; |
2863 | } | 2864 | } |
2864 | return 0; | 2865 | return 0; |
2865 | } | 2866 | } |
2866 | 2867 | ||
2867 | 2868 | ||
2868 | bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode) | 2869 | bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode) |
2869 | { | 2870 | { |
2870 | bool syncOK = true; | 2871 | bool syncOK = true; |
2871 | int addedAddressee = 0; | 2872 | int addedAddressee = 0; |
2872 | int addedAddresseeR = 0; | 2873 | int addedAddresseeR = 0; |
2873 | int deletedAddresseeR = 0; | 2874 | int deletedAddresseeR = 0; |
2874 | int deletedAddresseeL = 0; | 2875 | int deletedAddresseeL = 0; |
2875 | int changedLocal = 0; | 2876 | int changedLocal = 0; |
2876 | int changedRemote = 0; | 2877 | int changedRemote = 0; |
2877 | int filteredIN = 0; | 2878 | int filteredIN = 0; |
2878 | int filteredOUT = 0; | 2879 | int filteredOUT = 0; |
2879 | 2880 | ||
2880 | QString mCurrentSyncName = syncManager->getCurrentSyncName(); | 2881 | QString mCurrentSyncName = syncManager->getCurrentSyncName(); |
2881 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); | 2882 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); |
2882 | 2883 | ||
2883 | //QPtrList<Addressee> el = local->rawAddressees(); | 2884 | //QPtrList<Addressee> el = local->rawAddressees(); |
2884 | Addressee addresseeR; | 2885 | Addressee addresseeR; |
2885 | QString uid; | 2886 | QString uid; |
2886 | int take; | 2887 | int take; |
2887 | Addressee addresseeL; | 2888 | Addressee addresseeL; |
2888 | Addressee addresseeRSync; | 2889 | Addressee addresseeRSync; |
2889 | Addressee addresseeLSync; | 2890 | Addressee addresseeLSync; |
2890 | // KABC::Addressee::List addresseeRSyncSharp = remote->getExternLastSyncAddressees(); | 2891 | // KABC::Addressee::List addresseeRSyncSharp = remote->getExternLastSyncAddressees(); |
2891 | //KABC::Addressee::List addresseeLSyncSharp = local->getExternLastSyncAddressees(); | 2892 | //KABC::Addressee::List addresseeLSyncSharp = local->getExternLastSyncAddressees(); |
2892 | bool fullDateRange = false; | 2893 | bool fullDateRange = false; |
2893 | local->resetTempSyncStat(); | 2894 | local->resetTempSyncStat(); |
2894 | mLastAddressbookSync = QDateTime::currentDateTime(); | 2895 | mLastAddressbookSync = QDateTime::currentDateTime(); |
2895 | if ( syncManager->syncWithDesktop() ) { | 2896 | if ( syncManager->syncWithDesktop() ) { |
2896 | // remote->removeSyncInfo( QString());//remove all info | 2897 | // remote->removeSyncInfo( QString());//remove all info |
2897 | if ( KSyncManager::mRequestedSyncEvent.isValid() ) { | 2898 | if ( KSyncManager::mRequestedSyncEvent.isValid() ) { |
2898 | mLastAddressbookSync = KSyncManager::mRequestedSyncEvent; | 2899 | mLastAddressbookSync = KSyncManager::mRequestedSyncEvent; |
2899 | qDebug("KA: using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() ); | 2900 | qDebug("KA: using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() ); |
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp index 7200da9..f8f4c8a 100644 --- a/libkdepim/externalapphandler.cpp +++ b/libkdepim/externalapphandler.cpp | |||
@@ -771,431 +771,434 @@ bool ExternalAppHandler::mailToOneContact( const QString& adressline ) | |||
771 | return mailToOneContact( name, emailadress ); | 771 | return mailToOneContact( name, emailadress ); |
772 | 772 | ||
773 | } | 773 | } |
774 | 774 | ||
775 | 775 | ||
776 | /************************************************************************** | 776 | /************************************************************************** |
777 | * | 777 | * |
778 | **************************************************************************/ | 778 | **************************************************************************/ |
779 | 779 | ||
780 | //calls the phoneapplication with the number | 780 | //calls the phoneapplication with the number |
781 | bool ExternalAppHandler::callByPhone( const QString& phonenumber ) | 781 | bool ExternalAppHandler::callByPhone( const QString& phonenumber ) |
782 | { | 782 | { |
783 | #ifndef DESKTOP_VERSION | 783 | #ifndef DESKTOP_VERSION |
784 | QString channel; | 784 | QString channel; |
785 | QString message; | 785 | QString message; |
786 | QString parameters; | 786 | QString parameters; |
787 | 787 | ||
788 | 788 | ||
789 | int client = KPimGlobalPrefs::instance()->mPhoneClient; | 789 | int client = KPimGlobalPrefs::instance()->mPhoneClient; |
790 | if (client == KPimGlobalPrefs::OTHER_PHC) | 790 | if (client == KPimGlobalPrefs::OTHER_PHC) |
791 | { | 791 | { |
792 | channel = KPimGlobalPrefs::instance()->mPhoneOtherChannel; | 792 | channel = KPimGlobalPrefs::instance()->mPhoneOtherChannel; |
793 | message = KPimGlobalPrefs::instance()->mPhoneOtherMessage; | 793 | message = KPimGlobalPrefs::instance()->mPhoneOtherMessage; |
794 | parameters = KPimGlobalPrefs::instance()->mPhoneOtherMessageParameters; | 794 | parameters = KPimGlobalPrefs::instance()->mPhoneOtherMessageParameters; |
795 | } | 795 | } |
796 | else | 796 | else |
797 | { | 797 | { |
798 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PHONE, client); | 798 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PHONE, client); |
799 | if (!dai) | 799 | if (!dai) |
800 | { | 800 | { |
801 | qDebug("could not find configured phone application."); | 801 | qDebug("could not find configured phone application."); |
802 | return false; | 802 | return false; |
803 | } | 803 | } |
804 | channel = dai->_channel; | 804 | channel = dai->_channel; |
805 | message = dai->_message; | 805 | message = dai->_message; |
806 | parameters = dai->_parameters; | 806 | parameters = dai->_parameters; |
807 | } | 807 | } |
808 | 808 | ||
809 | 809 | ||
810 | //first check if one of the mailers need the emails right in the message. | 810 | //first check if one of the mailers need the emails right in the message. |
811 | message = translateMessage(message, phonenumber, ""); | 811 | message = translateMessage(message, phonenumber, ""); |
812 | 812 | ||
813 | 813 | ||
814 | #ifdef DEBUG_EXT_APP_HANDLER | 814 | #ifdef DEBUG_EXT_APP_HANDLER |
815 | qDebug("6Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); | 815 | qDebug("6Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); |
816 | qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1()); | 816 | qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1()); |
817 | #endif | 817 | #endif |
818 | 818 | ||
819 | QCopEnvelope e(channel.latin1(), message.latin1()); | 819 | QCopEnvelope e(channel.latin1(), message.latin1()); |
820 | //US we need no names in the To field. The emailadresses are enough | 820 | //US we need no names in the To field. The emailadresses are enough |
821 | 821 | ||
822 | passParameters(&e, parameters, phonenumber, ""); | 822 | passParameters(&e, parameters, phonenumber, ""); |
823 | 823 | ||
824 | 824 | ||
825 | #else | 825 | #else |
826 | KMessageBox::sorry( 0, i18n( "This version does not support phonecalls." ) ); | 826 | KMessageBox::sorry( 0, i18n( "This version does not support phonecalls." ) ); |
827 | #endif | 827 | #endif |
828 | 828 | ||
829 | 829 | ||
830 | return true; | 830 | return true; |
831 | } | 831 | } |
832 | 832 | ||
833 | /************************************************************************** | 833 | /************************************************************************** |
834 | * | 834 | * |
835 | **************************************************************************/ | 835 | **************************************************************************/ |
836 | 836 | ||
837 | //calls the smsapplication with the number | 837 | //calls the smsapplication with the number |
838 | bool ExternalAppHandler::callBySMS( const QString& phonenumber ) | 838 | bool ExternalAppHandler::callBySMS( const QString& phonenumber ) |
839 | { | 839 | { |
840 | #ifndef DESKTOP_VERSION | 840 | #ifndef DESKTOP_VERSION |
841 | QString channel; | 841 | QString channel; |
842 | QString message; | 842 | QString message; |
843 | QString parameters; | 843 | QString parameters; |
844 | 844 | ||
845 | 845 | ||
846 | int client = KPimGlobalPrefs::instance()->mSMSClient; | 846 | int client = KPimGlobalPrefs::instance()->mSMSClient; |
847 | if (client == KPimGlobalPrefs::OTHER_SMC) | 847 | if (client == KPimGlobalPrefs::OTHER_SMC) |
848 | { | 848 | { |
849 | channel = KPimGlobalPrefs::instance()->mSMSOtherChannel; | 849 | channel = KPimGlobalPrefs::instance()->mSMSOtherChannel; |
850 | message = KPimGlobalPrefs::instance()->mSMSOtherMessage; | 850 | message = KPimGlobalPrefs::instance()->mSMSOtherMessage; |
851 | parameters = KPimGlobalPrefs::instance()->mSMSOtherMessageParameters; | 851 | parameters = KPimGlobalPrefs::instance()->mSMSOtherMessageParameters; |
852 | } | 852 | } |
853 | else | 853 | else |
854 | { | 854 | { |
855 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(SMS, client); | 855 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(SMS, client); |
856 | if (!dai) | 856 | if (!dai) |
857 | { | 857 | { |
858 | qDebug("could not find configured sms application."); | 858 | qDebug("could not find configured sms application."); |
859 | return false; | 859 | return false; |
860 | } | 860 | } |
861 | channel = dai->_channel; | 861 | channel = dai->_channel; |
862 | message = dai->_message; | 862 | message = dai->_message; |
863 | parameters = dai->_parameters; | 863 | parameters = dai->_parameters; |
864 | } | 864 | } |
865 | 865 | ||
866 | 866 | ||
867 | //first check if one of the mailers need the emails right in the message. | 867 | //first check if one of the mailers need the emails right in the message. |
868 | message = translateMessage(message, phonenumber, ""); | 868 | message = translateMessage(message, phonenumber, ""); |
869 | 869 | ||
870 | 870 | ||
871 | #ifdef DEBUG_EXT_APP_HANDLER | 871 | #ifdef DEBUG_EXT_APP_HANDLER |
872 | qDebug("7Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); | 872 | qDebug("7Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); |
873 | qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1()); | 873 | qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1()); |
874 | #endif | 874 | #endif |
875 | 875 | ||
876 | QCopEnvelope e(channel.latin1(), message.latin1()); | 876 | QCopEnvelope e(channel.latin1(), message.latin1()); |
877 | //US we need no names in the To field. The emailadresses are enough | 877 | //US we need no names in the To field. The emailadresses are enough |
878 | 878 | ||
879 | passParameters(&e, parameters, phonenumber, ""); | 879 | passParameters(&e, parameters, phonenumber, ""); |
880 | 880 | ||
881 | 881 | ||
882 | #else | 882 | #else |
883 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of sms." ) ); | 883 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of sms." ) ); |
884 | #endif | 884 | #endif |
885 | 885 | ||
886 | 886 | ||
887 | return true; | 887 | return true; |
888 | } | 888 | } |
889 | 889 | ||
890 | /************************************************************************** | 890 | /************************************************************************** |
891 | * | 891 | * |
892 | **************************************************************************/ | 892 | **************************************************************************/ |
893 | 893 | ||
894 | //calls the pagerapplication with the number | 894 | //calls the pagerapplication with the number |
895 | bool ExternalAppHandler::callByPager( const QString& pagernumber ) | 895 | bool ExternalAppHandler::callByPager( const QString& pagernumber ) |
896 | { | 896 | { |
897 | #ifndef DESKTOP_VERSION | 897 | #ifndef DESKTOP_VERSION |
898 | QString channel; | 898 | QString channel; |
899 | QString message; | 899 | QString message; |
900 | QString parameters; | 900 | QString parameters; |
901 | 901 | ||
902 | 902 | ||
903 | int client = KPimGlobalPrefs::instance()->mPagerClient; | 903 | int client = KPimGlobalPrefs::instance()->mPagerClient; |
904 | if (client == KPimGlobalPrefs::OTHER_PAC) | 904 | if (client == KPimGlobalPrefs::OTHER_PAC) |
905 | { | 905 | { |
906 | channel = KPimGlobalPrefs::instance()->mPagerOtherChannel; | 906 | channel = KPimGlobalPrefs::instance()->mPagerOtherChannel; |
907 | message = KPimGlobalPrefs::instance()->mPagerOtherMessage; | 907 | message = KPimGlobalPrefs::instance()->mPagerOtherMessage; |
908 | parameters = KPimGlobalPrefs::instance()->mPagerOtherMessageParameters; | 908 | parameters = KPimGlobalPrefs::instance()->mPagerOtherMessageParameters; |
909 | } | 909 | } |
910 | else | 910 | else |
911 | { | 911 | { |
912 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PAGER, client); | 912 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PAGER, client); |
913 | if (!dai) | 913 | if (!dai) |
914 | { | 914 | { |
915 | qDebug("could not find configured pager application."); | 915 | qDebug("could not find configured pager application."); |
916 | return false; | 916 | return false; |
917 | } | 917 | } |
918 | channel = dai->_channel; | 918 | channel = dai->_channel; |
919 | message = dai->_message; | 919 | message = dai->_message; |
920 | parameters = dai->_parameters; | 920 | parameters = dai->_parameters; |
921 | } | 921 | } |
922 | 922 | ||
923 | 923 | ||
924 | //first check if one of the mailers need the emails right in the message. | 924 | //first check if one of the mailers need the emails right in the message. |
925 | message = translateMessage(message, pagernumber, ""); | 925 | message = translateMessage(message, pagernumber, ""); |
926 | 926 | ||
927 | 927 | ||
928 | #ifdef DEBUG_EXT_APP_HANDLER | 928 | #ifdef DEBUG_EXT_APP_HANDLER |
929 | qDebug("8Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); | 929 | qDebug("8Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); |
930 | qDebug("passing pagernumber(%s) as parameter in the form %s to QCopEnvelope", pagernumber.latin1(), parameters.latin1()); | 930 | qDebug("passing pagernumber(%s) as parameter in the form %s to QCopEnvelope", pagernumber.latin1(), parameters.latin1()); |
931 | #endif | 931 | #endif |
932 | 932 | ||
933 | QCopEnvelope e(channel.latin1(), message.latin1()); | 933 | QCopEnvelope e(channel.latin1(), message.latin1()); |
934 | //US we need no names in the To field. The emailadresses are enough | 934 | //US we need no names in the To field. The emailadresses are enough |
935 | 935 | ||
936 | passParameters(&e, parameters, pagernumber, ""); | 936 | passParameters(&e, parameters, pagernumber, ""); |
937 | 937 | ||
938 | 938 | ||
939 | #else | 939 | #else |
940 | KMessageBox::sorry( 0, i18n( "This version does not support paging." ) ); | 940 | KMessageBox::sorry( 0, i18n( "This version does not support paging." ) ); |
941 | #endif | 941 | #endif |
942 | 942 | ||
943 | 943 | ||
944 | return true; | 944 | return true; |
945 | } | 945 | } |
946 | 946 | ||
947 | /************************************************************************** | 947 | /************************************************************************** |
948 | * | 948 | * |
949 | **************************************************************************/ | 949 | **************************************************************************/ |
950 | 950 | ||
951 | //calls the faxapplication with the number | 951 | //calls the faxapplication with the number |
952 | bool ExternalAppHandler::callByFax( const QString& faxnumber ) | 952 | bool ExternalAppHandler::callByFax( const QString& faxnumber ) |
953 | { | 953 | { |
954 | #ifndef DESKTOP_VERSION | 954 | #ifndef DESKTOP_VERSION |
955 | QString channel; | 955 | QString channel; |
956 | QString message; | 956 | QString message; |
957 | QString parameters; | 957 | QString parameters; |
958 | 958 | ||
959 | 959 | ||
960 | int client = KPimGlobalPrefs::instance()->mFaxClient; | 960 | int client = KPimGlobalPrefs::instance()->mFaxClient; |
961 | if (client == KPimGlobalPrefs::OTHER_FAC) | 961 | if (client == KPimGlobalPrefs::OTHER_FAC) |
962 | { | 962 | { |
963 | channel = KPimGlobalPrefs::instance()->mFaxOtherChannel; | 963 | channel = KPimGlobalPrefs::instance()->mFaxOtherChannel; |
964 | message = KPimGlobalPrefs::instance()->mFaxOtherMessage; | 964 | message = KPimGlobalPrefs::instance()->mFaxOtherMessage; |
965 | parameters = KPimGlobalPrefs::instance()->mFaxOtherMessageParameters; | 965 | parameters = KPimGlobalPrefs::instance()->mFaxOtherMessageParameters; |
966 | } | 966 | } |
967 | else | 967 | else |
968 | { | 968 | { |
969 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(FAX, client); | 969 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(FAX, client); |
970 | if (!dai) | 970 | if (!dai) |
971 | { | 971 | { |
972 | qDebug("could not find configured fax application."); | 972 | qDebug("could not find configured fax application."); |
973 | return false; | 973 | return false; |
974 | } | 974 | } |
975 | channel = dai->_channel; | 975 | channel = dai->_channel; |
976 | message = dai->_message; | 976 | message = dai->_message; |
977 | parameters = dai->_parameters; | 977 | parameters = dai->_parameters; |
978 | } | 978 | } |
979 | 979 | ||
980 | 980 | ||
981 | //first check if one of the mailers need the emails right in the message. | 981 | //first check if one of the mailers need the emails right in the message. |
982 | message = translateMessage(message, faxnumber, ""); | 982 | message = translateMessage(message, faxnumber, ""); |
983 | 983 | ||
984 | 984 | ||
985 | #ifdef DEBUG_EXT_APP_HANDLER | 985 | #ifdef DEBUG_EXT_APP_HANDLER |
986 | qDebug("9Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); | 986 | qDebug("9Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); |
987 | qDebug("passing faxnumber(%s) as parameter in the form %s to QCopEnvelope", faxnumber.latin1(), parameters.latin1()); | 987 | qDebug("passing faxnumber(%s) as parameter in the form %s to QCopEnvelope", faxnumber.latin1(), parameters.latin1()); |
988 | #endif | 988 | #endif |
989 | 989 | ||
990 | QCopEnvelope e(channel.latin1(), message.latin1()); | 990 | QCopEnvelope e(channel.latin1(), message.latin1()); |
991 | //US we need no names in the To field. The emailadresses are enough | 991 | //US we need no names in the To field. The emailadresses are enough |
992 | 992 | ||
993 | passParameters(&e, parameters, faxnumber, ""); | 993 | passParameters(&e, parameters, faxnumber, ""); |
994 | 994 | ||
995 | 995 | ||
996 | #else | 996 | #else |
997 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of faxes." ) ); | 997 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of faxes." ) ); |
998 | #endif | 998 | #endif |
999 | 999 | ||
1000 | 1000 | ||
1001 | return true; | 1001 | return true; |
1002 | } | 1002 | } |
1003 | 1003 | ||
1004 | /************************************************************************** | 1004 | /************************************************************************** |
1005 | * | 1005 | * |
1006 | **************************************************************************/ | 1006 | **************************************************************************/ |
1007 | 1007 | ||
1008 | //calls the sipapplication with the number | 1008 | //calls the sipapplication with the number |
1009 | bool ExternalAppHandler::callBySIP( const QString& sipnumber ) | 1009 | bool ExternalAppHandler::callBySIP( const QString& sipnumber ) |
1010 | { | 1010 | { |
1011 | #ifndef DESKTOP_VERSION | 1011 | #ifndef DESKTOP_VERSION |
1012 | QString channel; | 1012 | QString channel; |
1013 | QString message; | 1013 | QString message; |
1014 | QString parameters; | 1014 | QString parameters; |
1015 | 1015 | ||
1016 | 1016 | ||
1017 | int client = KPimGlobalPrefs::instance()->mSipClient; | 1017 | int client = KPimGlobalPrefs::instance()->mSipClient; |
1018 | if (client == KPimGlobalPrefs::OTHER_SIC) | 1018 | if (client == KPimGlobalPrefs::OTHER_SIC) |
1019 | { | 1019 | { |
1020 | channel = KPimGlobalPrefs::instance()->mSipOtherChannel; | 1020 | channel = KPimGlobalPrefs::instance()->mSipOtherChannel; |
1021 | message = KPimGlobalPrefs::instance()->mSipOtherMessage; | 1021 | message = KPimGlobalPrefs::instance()->mSipOtherMessage; |
1022 | parameters = KPimGlobalPrefs::instance()->mSipOtherMessageParameters; | 1022 | parameters = KPimGlobalPrefs::instance()->mSipOtherMessageParameters; |
1023 | } | 1023 | } |
1024 | else | 1024 | else |
1025 | { | 1025 | { |
1026 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(SIP, client); | 1026 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(SIP, client); |
1027 | if (!dai) | 1027 | if (!dai) |
1028 | { | 1028 | { |
1029 | qDebug("could not find configured sip application."); | 1029 | qDebug("could not find configured sip application."); |
1030 | return false; | 1030 | return false; |
1031 | } | 1031 | } |
1032 | channel = dai->_channel; | 1032 | channel = dai->_channel; |
1033 | message = dai->_message; | 1033 | message = dai->_message; |
1034 | parameters = dai->_parameters; | 1034 | parameters = dai->_parameters; |
1035 | } | 1035 | } |
1036 | 1036 | ||
1037 | 1037 | ||
1038 | //first check if one of the sip apps need the emails right in the message. | 1038 | //first check if one of the sip apps need the emails right in the message. |
1039 | message = translateMessage(message, sipnumber, ""); | 1039 | message = translateMessage(message, sipnumber, ""); |
1040 | 1040 | ||
1041 | 1041 | ||
1042 | #ifdef DEBUG_EXT_APP_HANDLER | 1042 | #ifdef DEBUG_EXT_APP_HANDLER |
1043 | qDebug("10Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); | 1043 | qDebug("10Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); |
1044 | qDebug("passing sipnumber(%s) as parameter in the form %s to QCopEnvelope", sipnumber.latin1(), parameters.latin1()); | 1044 | qDebug("passing sipnumber(%s) as parameter in the form %s to QCopEnvelope", sipnumber.latin1(), parameters.latin1()); |
1045 | #endif | 1045 | #endif |
1046 | 1046 | ||
1047 | QCopEnvelope e(channel.latin1(), message.latin1()); | 1047 | QCopEnvelope e(channel.latin1(), message.latin1()); |
1048 | //US we need no names in the To field. The emailadresses are enough | 1048 | //US we need no names in the To field. The emailadresses are enough |
1049 | 1049 | ||
1050 | passParameters(&e, parameters, sipnumber, ""); | 1050 | passParameters(&e, parameters, sipnumber, ""); |
1051 | 1051 | ||
1052 | 1052 | ||
1053 | #else | 1053 | #else |
1054 | KMessageBox::sorry( 0, i18n( "This version does not support sip." ) ); | 1054 | KMessageBox::sorry( 0, i18n( "This version does not support sip." ) ); |
1055 | #endif | 1055 | #endif |
1056 | 1056 | ||
1057 | 1057 | ||
1058 | return true; | 1058 | return true; |
1059 | } | 1059 | } |
1060 | 1060 | ||
1061 | 1061 | ||
1062 | /************************************************************************** | 1062 | /************************************************************************** |
1063 | * | 1063 | * |
1064 | **************************************************************************/ | 1064 | **************************************************************************/ |
1065 | 1065 | ||
1066 | 1066 | ||
1067 | QString& ExternalAppHandler::translateMessage(QString& message, const QString& param1, const QString& param2 ) const | 1067 | QString& ExternalAppHandler::translateMessage(QString& message, const QString& param1, const QString& param2 ) const |
1068 | { | 1068 | { |
1069 | message = message.replace( QRegExp("%1"), param1 ); | 1069 | message = message.replace( QRegExp("%1"), param1 ); |
1070 | return message.replace( QRegExp("%2"), param2 ); | 1070 | return message.replace( QRegExp("%2"), param2 ); |
1071 | } | 1071 | } |
1072 | 1072 | ||
1073 | /************************************************************************** | 1073 | /************************************************************************** |
1074 | * | 1074 | * |
1075 | **************************************************************************/ | 1075 | **************************************************************************/ |
1076 | 1076 | ||
1077 | void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& parameters, const QString& param1 , const QString& param2) const | 1077 | void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& parameters, const QString& param1 , const QString& param2) const |
1078 | { | 1078 | { |
1079 | #ifndef DESKTOP_VERSION | 1079 | #ifndef DESKTOP_VERSION |
1080 | QMap<QString, QString> valmap; | 1080 | QMap<QString, QString> valmap; |
1081 | bool useValMap = false; | 1081 | bool useValMap = false; |
1082 | 1082 | ||
1083 | // first extract all parts of the parameters. | 1083 | // first extract all parts of the parameters. |
1084 | QStringList paramlist = QStringList::split(";", parameters); | 1084 | QStringList paramlist = QStringList::split(";", parameters); |
1085 | 1085 | ||
1086 | //Now check how many parts we have. | 1086 | //Now check how many parts we have. |
1087 | //=0 :no params to pass | 1087 | //=0 :no params to pass |
1088 | //>0 :parameters to pass | 1088 | //>0 :parameters to pass |
1089 | for ( QStringList::Iterator it = paramlist.begin(); it != paramlist.end(); ++it ) | 1089 | for ( QStringList::Iterator it = paramlist.begin(); it != paramlist.end(); ++it ) |
1090 | { | 1090 | { |
1091 | QString param = (*it); | 1091 | QString param = (*it); |
1092 | QStringList keyvallist = QStringList::split("=", param); | 1092 | QStringList keyvallist = QStringList::split("=", param); |
1093 | 1093 | ||
1094 | //if we have keyvalue pairs, we assume that we pass a map to the envelope | 1094 | //if we have keyvalue pairs, we assume that we pass a map to the envelope |
1095 | QStringList::Iterator it2 = keyvallist.begin(); | 1095 | QStringList::Iterator it2 = keyvallist.begin(); |
1096 | QString key = (*it2); | 1096 | QString key = (*it2); |
1097 | key = key.replace( QRegExp("%1"), param1 ); | 1097 | key = key.replace( QRegExp("%1"), param1 ); |
1098 | key = key.replace( QRegExp("%2"), param2 ); | 1098 | key = key.replace( QRegExp("%2"), param2 ); |
1099 | ++it2; | 1099 | ++it2; |
1100 | 1100 | ||
1101 | if(it2 != keyvallist.end()) | 1101 | if(it2 != keyvallist.end()) |
1102 | { | 1102 | { |
1103 | QString value = (*it2); | 1103 | QString value = (*it2); |
1104 | value = value.replace( QRegExp("%1"), param1 ); | 1104 | value = value.replace( QRegExp("%1"), param1 ); |
1105 | value = value.replace( QRegExp("%2"), param2 ); | 1105 | value = value.replace( QRegExp("%2"), param2 ); |
1106 | 1106 | ||
1107 | valmap.insert(key, value); | 1107 | valmap.insert(key, value); |
1108 | useValMap = true; | 1108 | useValMap = true; |
1109 | } | 1109 | } |
1110 | else | 1110 | else |
1111 | { | 1111 | { |
1112 | // qDebug("pass parameter << %s", key.latin1()); | 1112 | // qDebug("pass parameter << %s", key.latin1()); |
1113 | (*e) << key; | 1113 | (*e) << key; |
1114 | } | 1114 | } |
1115 | } | 1115 | } |
1116 | 1116 | ||
1117 | if (useValMap == true) | 1117 | if (useValMap == true) |
1118 | (*e) << valmap; | 1118 | (*e) << valmap; |
1119 | 1119 | ||
1120 | #endif | 1120 | #endif |
1121 | 1121 | ||
1122 | } | 1122 | } |
1123 | 1123 | ||
1124 | 1124 | ||
1125 | 1125 | ||
1126 | /************************************************************************** | 1126 | /************************************************************************** |
1127 | * | 1127 | * |
1128 | **************************************************************************/ | 1128 | **************************************************************************/ |
1129 | 1129 | ||
1130 | void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) | 1130 | void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) |
1131 | { | 1131 | { |
1132 | 1132 | ||
1133 | if ( cmsg == "nextView()" ) { | 1133 | if ( cmsg == "nextView()" ) { |
1134 | qDebug("nextView()"); | 1134 | qDebug("nextView()"); |
1135 | emit nextView(); | 1135 | emit nextView(); |
1136 | return; | 1136 | return; |
1137 | } | 1137 | } |
1138 | 1138 | ||
1139 | bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); | 1139 | bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); |
1140 | if (!res) | 1140 | if (!res) |
1141 | res = mBirthdayListFromKAPITransfer->appMessage( cmsg, data ); | 1141 | res = mBirthdayListFromKAPITransfer->appMessage( cmsg, data ); |
1142 | 1142 | ||
1143 | if (!res) | 1143 | if (!res) |
1144 | res = mDisplayDetails->appMessage( cmsg, data ); | 1144 | res = mDisplayDetails->appMessage( cmsg, data ); |
1145 | 1145 | ||
1146 | // if (!res) | 1146 | // if (!res) |
1147 | // res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); | 1147 | // res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); |
1148 | } | 1148 | } |
1149 | 1149 | ||
1150 | 1150 | ||
1151 | 1151 | ||
1152 | bool ExternalAppHandler::requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid) | 1152 | bool ExternalAppHandler::requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid) |
1153 | { | 1153 | { |
1154 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); | 1154 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); |
1155 | return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(sessionuid); | 1155 | // maybe we are sending to KA/Pi fom a different worldd... |
1156 | // it may be that the QAplication::desktop()->width() values in KA/Pi are not the same as in our application | ||
1157 | // for that reason we send the current QApplication::desktop()->width() to KA/Pi | ||
1158 | return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(QString::number ( QApplication::desktop()->width() )); | ||
1156 | } | 1159 | } |
1157 | 1160 | ||
1158 | bool ExternalAppHandler::returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) | 1161 | bool ExternalAppHandler::returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) |
1159 | { | 1162 | { |
1160 | QStringList list4, list5, list6; | 1163 | QStringList list4, list5, list6; |
1161 | 1164 | ||
1162 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); | 1165 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); |
1163 | return mNameEmailUidListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); | 1166 | return mNameEmailUidListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); |
1164 | } | 1167 | } |
1165 | 1168 | ||
1166 | bool ExternalAppHandler::requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email) | 1169 | bool ExternalAppHandler::requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email) |
1167 | { | 1170 | { |
1168 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); | 1171 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); |
1169 | return mFindByEmailFromKAPITransfer->sendMessageToTarget(sessionuid, email); | 1172 | return mFindByEmailFromKAPITransfer->sendMessageToTarget(sessionuid, email); |
1170 | } | 1173 | } |
1171 | 1174 | ||
1172 | bool ExternalAppHandler::returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) | 1175 | bool ExternalAppHandler::returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) |
1173 | { | 1176 | { |
1174 | QStringList list4, list5, list6; | 1177 | QStringList list4, list5, list6; |
1175 | 1178 | ||
1176 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); | 1179 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); |
1177 | return mFindByEmailFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); | 1180 | return mFindByEmailFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); |
1178 | } | 1181 | } |
1179 | 1182 | ||
1180 | bool ExternalAppHandler::requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid) | 1183 | bool ExternalAppHandler::requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid) |
1181 | { | 1184 | { |
1182 | mDisplayDetails->setSourceChannel(""); | 1185 | mDisplayDetails->setSourceChannel(""); |
1183 | return mDisplayDetails->sendMessageToTarget("", name, email, uid); | 1186 | return mDisplayDetails->sendMessageToTarget("", name, email, uid); |
1184 | } | 1187 | } |
1185 | 1188 | ||
1186 | bool ExternalAppHandler::requestBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid) | 1189 | bool ExternalAppHandler::requestBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid) |
1187 | { | 1190 | { |
1188 | mBirthdayListFromKAPITransfer->setSourceChannel(sourceChannel); | 1191 | mBirthdayListFromKAPITransfer->setSourceChannel(sourceChannel); |
1189 | return mBirthdayListFromKAPITransfer->sendMessageToTarget(sessionuid); | 1192 | return mBirthdayListFromKAPITransfer->sendMessageToTarget(sessionuid); |
1190 | } | 1193 | } |
1191 | 1194 | ||
1192 | bool ExternalAppHandler::returnBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6) | 1195 | bool ExternalAppHandler::returnBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6) |
1193 | { | 1196 | { |
1194 | mBirthdayListFromKAPITransfer->setSourceChannel(sourceChannel); | 1197 | mBirthdayListFromKAPITransfer->setSourceChannel(sourceChannel); |
1195 | return mBirthdayListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); | 1198 | return mBirthdayListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); |
1196 | } | 1199 | } |
1197 | 1200 | ||
1198 | 1201 | ||
1199 | 1202 | ||
1200 | 1203 | ||
1201 | 1204 | ||