author | zautrix <zautrix> | 2004-10-14 06:42:01 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-14 06:42:01 (UTC) |
commit | a6dff815a9c6d3a91094573d23c28a8553fc7cc2 (patch) (unidiff) | |
tree | a8830e9adcd72faa8178d4ee2517bfc31cda8653 /gammu | |
parent | 909d25797c50fc38c435834a68aaf60bf87e32f9 (diff) | |
download | kdepimpi-a6dff815a9c6d3a91094573d23c28a8553fc7cc2.zip kdepimpi-a6dff815a9c6d3a91094573d23c28a8553fc7cc2.tar.gz kdepimpi-a6dff815a9c6d3a91094573d23c28a8553fc7cc2.tar.bz2 |
fixes umlaute in beaming
-rw-r--r-- | gammu/emb/common/service/gsmcal.c | 15 | ||||
-rw-r--r-- | gammu/emb/common/service/gsmcal.h | 1 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gammu/emb/common/service/gsmcal.c b/gammu/emb/common/service/gsmcal.c index 0ea8e06..0375fee 100644 --- a/gammu/emb/common/service/gsmcal.c +++ b/gammu/emb/common/service/gsmcal.c | |||
@@ -59,24 +59,27 @@ void GSM_CalendarFindDefaultTextTimeAlarmPhoneRecurrance(GSM_CalendarEntry *entr | |||
59 | break; | 59 | break; |
60 | case CAL_END_DATETIME : | 60 | case CAL_END_DATETIME : |
61 | if (*EndTime == -1) *EndTime = i; | 61 | if (*EndTime == -1) *EndTime = i; |
62 | break; | 62 | break; |
63 | case CAL_ALARM_DATETIME : | 63 | case CAL_ALARM_DATETIME : |
64 | case CAL_SILENT_ALARM_DATETIME: | 64 | case CAL_SILENT_ALARM_DATETIME: |
65 | if (*Alarm == -1) *Alarm = i; | 65 | if (*Alarm == -1) *Alarm = i; |
66 | break; | 66 | break; |
67 | case CAL_RECURRANCE: | 67 | case CAL_RECURRANCE: |
68 | if (*Recurrance == -1) *Recurrance = i; | 68 | if (*Recurrance == -1) *Recurrance = i; |
69 | break; | 69 | break; |
70 | case CAL_TEXT: | 70 | case CAL_TEXT: |
71 | *Text = i; | ||
72 | break; | ||
73 | case CAL_DESCRIPTION: | ||
71 | if (*Text == -1) *Text = i; | 74 | if (*Text == -1) *Text = i; |
72 | break; | 75 | break; |
73 | case CAL_PHONE: | 76 | case CAL_PHONE: |
74 | if (*Phone == -1) *Phone = i; | 77 | if (*Phone == -1) *Phone = i; |
75 | break; | 78 | break; |
76 | case CAL_LOCATION: | 79 | case CAL_LOCATION: |
77 | if (*Location == -1) *Location = i; | 80 | if (*Location == -1) *Location = i; |
78 | break; | 81 | break; |
79 | default: | 82 | default: |
80 | break; | 83 | break; |
81 | } | 84 | } |
82 | } | 85 | } |
@@ -188,27 +191,27 @@ GSM_Error GSM_EncodeVCALENDAR(char *Buffer, int *Length, GSM_CalendarEntry *note | |||
188 | case 365 : *Length+=sprintf(Buffer+(*Length), "RRULE:YD1%c%c",13,10);break; | 191 | case 365 : *Length+=sprintf(Buffer+(*Length), "RRULE:YD1%c%c",13,10);break; |
189 | } | 192 | } |
190 | } | 193 | } |
191 | 194 | ||
192 | if (note->Type == GSM_CAL_CALL) { | 195 | if (note->Type == GSM_CAL_CALL) { |
193 | buffer[0] = 0; | 196 | buffer[0] = 0; |
194 | buffer[1] = 0; | 197 | buffer[1] = 0; |
195 | if (Phone != -1) CopyUnicodeString(buffer,note->Entries[Phone].Text); | 198 | if (Phone != -1) CopyUnicodeString(buffer,note->Entries[Phone].Text); |
196 | if (Text != -1) { | 199 | if (Text != -1) { |
197 | if (Phone != -1) EncodeUnicode(buffer+UnicodeLength(buffer)*2," ",1); | 200 | if (Phone != -1) EncodeUnicode(buffer+UnicodeLength(buffer)*2," ",1); |
198 | CopyUnicodeString(buffer+UnicodeLength(buffer)*2,note->Entries[Text].Text); | 201 | CopyUnicodeString(buffer+UnicodeLength(buffer)*2,note->Entries[Text].Text); |
199 | } | 202 | } |
200 | SaveVCALText(Buffer, Length, buffer, "DESCRIPTION"); | 203 | SaveVCALText(Buffer, Length, buffer, "SUMMARY"); |
201 | } else { | 204 | } else { |
202 | SaveVCALText(Buffer, Length, note->Entries[Text].Text, "DESCRIPTION"); | 205 | SaveVCALText(Buffer, Length, note->Entries[Text].Text, "SUMMARY"); |
203 | } | 206 | } |
204 | } else if (Version == SonyEricsson_VCalendar) { | 207 | } else if (Version == SonyEricsson_VCalendar) { |
205 | *Length+=sprintf(Buffer+(*Length), "CATEGORIES:"); | 208 | *Length+=sprintf(Buffer+(*Length), "CATEGORIES:"); |
206 | switch (note->Type) { | 209 | switch (note->Type) { |
207 | case GSM_CAL_MEETING: | 210 | case GSM_CAL_MEETING: |
208 | *Length+=sprintf(Buffer+(*Length), "Meeting%c%c",13,10); | 211 | *Length+=sprintf(Buffer+(*Length), "Meeting%c%c",13,10); |
209 | break; | 212 | break; |
210 | case GSM_CAL_REMINDER: | 213 | case GSM_CAL_REMINDER: |
211 | *Length+=sprintf(Buffer+(*Length), "Date%c%c",13,10); | 214 | *Length+=sprintf(Buffer+(*Length), "Date%c%c",13,10); |
212 | break; | 215 | break; |
213 | case GSM_CAL_TRAVEL: | 216 | case GSM_CAL_TRAVEL: |
214 | *Length+=sprintf(Buffer+(*Length), "Travel%c%c",13,10); | 217 | *Length+=sprintf(Buffer+(*Length), "Travel%c%c",13,10); |
@@ -407,29 +410,35 @@ GSM_Error GSM_DecodeVCALENDAR_VTODO(unsigned char *Buffer, int *Pos, GSM_Calenda | |||
407 | Calendar->EntriesNum++; | 410 | Calendar->EntriesNum++; |
408 | } | 411 | } |
409 | if (strstr(Line,"RRULE:MD1")) { | 412 | if (strstr(Line,"RRULE:MD1")) { |
410 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_RECURRANCE; | 413 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_RECURRANCE; |
411 | Calendar->Entries[Calendar->EntriesNum].Number = 30*24; | 414 | Calendar->Entries[Calendar->EntriesNum].Number = 30*24; |
412 | Calendar->EntriesNum++; | 415 | Calendar->EntriesNum++; |
413 | } | 416 | } |
414 | if (strstr(Line,"RRULE:YD1")) { | 417 | if (strstr(Line,"RRULE:YD1")) { |
415 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_RECURRANCE; | 418 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_RECURRANCE; |
416 | Calendar->Entries[Calendar->EntriesNum].Number = 365*24; | 419 | Calendar->Entries[Calendar->EntriesNum].Number = 365*24; |
417 | Calendar->EntriesNum++; | 420 | Calendar->EntriesNum++; |
418 | } | 421 | } |
419 | if ((ReadVCALText(Line, "SUMMARY", Buff)) || (ReadVCALText(Line, "DESCRIPTION", Buff))) { | 422 | // LR |
423 | if ((ReadVCALText(Line, "SUMMARY", Buff)) ) { | ||
420 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_TEXT; | 424 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_TEXT; |
421 | CopyUnicodeString(Calendar->Entries[Calendar->EntriesNum].Text,Buff); | 425 | CopyUnicodeString(Calendar->Entries[Calendar->EntriesNum].Text,Buff); |
422 | Calendar->EntriesNum++; | 426 | Calendar->EntriesNum++; |
423 | } | 427 | } |
428 | if (ReadVCALText(Line, "DESCRIPTION", Buff)) { | ||
429 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_DESCRIPTION; | ||
430 | CopyUnicodeString(Calendar->Entries[Calendar->EntriesNum].Text,Buff); | ||
431 | Calendar->EntriesNum++; | ||
432 | } | ||
424 | if (ReadVCALText(Line, "LOCATION", Buff)) { | 433 | if (ReadVCALText(Line, "LOCATION", Buff)) { |
425 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_LOCATION; | 434 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_LOCATION; |
426 | CopyUnicodeString(Calendar->Entries[Calendar->EntriesNum].Text,Buff); | 435 | CopyUnicodeString(Calendar->Entries[Calendar->EntriesNum].Text,Buff); |
427 | Calendar->EntriesNum++; | 436 | Calendar->EntriesNum++; |
428 | } | 437 | } |
429 | if (ReadVCALText(Line, "DTSTART", Buff)) { | 438 | if (ReadVCALText(Line, "DTSTART", Buff)) { |
430 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_START_DATETIME; | 439 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_START_DATETIME; |
431 | ReadVCALDateTime(DecodeUnicodeString(Buff), &Calendar->Entries[Calendar->EntriesNum].Date); | 440 | ReadVCALDateTime(DecodeUnicodeString(Buff), &Calendar->Entries[Calendar->EntriesNum].Date); |
432 | Calendar->EntriesNum++; | 441 | Calendar->EntriesNum++; |
433 | } | 442 | } |
434 | if (ReadVCALText(Line, "DTEND", Buff)) { | 443 | if (ReadVCALText(Line, "DTEND", Buff)) { |
435 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_END_DATETIME; | 444 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_END_DATETIME; |
diff --git a/gammu/emb/common/service/gsmcal.h b/gammu/emb/common/service/gsmcal.h index 0a41b7b..c69fdbe 100644 --- a/gammu/emb/common/service/gsmcal.h +++ b/gammu/emb/common/service/gsmcal.h | |||
@@ -148,24 +148,25 @@ typedef enum { | |||
148 | /** | 148 | /** |
149 | * Date and time of silent alarm. | 149 | * Date and time of silent alarm. |
150 | */ | 150 | */ |
151 | CAL_SILENT_ALARM_DATETIME, | 151 | CAL_SILENT_ALARM_DATETIME, |
152 | /** | 152 | /** |
153 | * Recurrance. | 153 | * Recurrance. |
154 | */ | 154 | */ |
155 | CAL_RECURRANCE, | 155 | CAL_RECURRANCE, |
156 | /** | 156 | /** |
157 | * Text. | 157 | * Text. |
158 | */ | 158 | */ |
159 | CAL_TEXT, | 159 | CAL_TEXT, |
160 | CAL_DESCRIPTION, // LR added | ||
160 | /** | 161 | /** |
161 | * Location. | 162 | * Location. |
162 | */ | 163 | */ |
163 | CAL_LOCATION, | 164 | CAL_LOCATION, |
164 | /** | 165 | /** |
165 | * Phone number. | 166 | * Phone number. |
166 | */ | 167 | */ |
167 | CAL_PHONE, | 168 | CAL_PHONE, |
168 | /** | 169 | /** |
169 | * Whether this entry is private. | 170 | * Whether this entry is private. |
170 | */ | 171 | */ |
171 | CAL_PRIVATE, | 172 | CAL_PRIVATE, |