summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--gammu/emb/common/service/gsmcal.c15
-rw-r--r--gammu/emb/common/service/gsmcal.h1
-rw-r--r--kaddressbook/kabcore.cpp6
-rw-r--r--korganizer/calendarview.cpp12
-rw-r--r--microkde/kapplication.cpp22
-rw-r--r--microkde/kapplication.h1
6 files changed, 50 insertions, 7 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
@@ -67,8 +67,11 @@ void GSM_CalendarFindDefaultTextTimeAlarmPhoneRecurrance(GSM_CalendarEntry *entr
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;
@@ -196,11 +199,11 @@ GSM_Error GSM_EncodeVCALENDAR(char *Buffer, int *Length, GSM_CalendarEntry *note
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) {
@@ -415,13 +418,19 @@ GSM_Error GSM_DecodeVCALENDAR_VTODO(unsigned char *Buffer, int *Pos, GSM_Calenda
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++;
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
@@ -156,8 +156,9 @@ typedef enum {
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,
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 47ed858..dae9cd2 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -812,10 +812,11 @@ void KABCore::beamVCard(const QStringList& uids)
812 QFile outFile(fileName); 812 QFile outFile(fileName);
813 if ( outFile.open(IO_WriteOnly) ) { 813 if ( outFile.open(IO_WriteOnly) ) {
814 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); 814 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" );
815 QTextStream t( &outFile ); // use a text stream 815 QTextStream t( &outFile ); // use a text stream
816 t.setEncoding( QTextStream::UnicodeUTF8 ); 816 //t.setEncoding( QTextStream::UnicodeUTF8 );
817 t <<datastream; 817 t.setEncoding( QTextStream::Latin1 );
818 t <<datastream.latin1();
818 outFile.close(); 819 outFile.close();
819 Ir *ir = new Ir( this ); 820 Ir *ir = new Ir( this );
820 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); 821 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
821 ir->send( fileName, description, "text/x-vCard" ); 822 ir->send( fileName, description, "text/x-vCard" );
@@ -831,8 +832,9 @@ void KABCore::beamDone( Ir *ir )
831{ 832{
832#ifndef DESKTOP_VERSION 833#ifndef DESKTOP_VERSION
833 delete ir; 834 delete ir;
834#endif 835#endif
836 topLevelWidget()->raise();
835} 837}
836 838
837 839
838void KABCore::browse( const QString& url ) 840void KABCore::browse( const QString& url )
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 1f2c6da..3e0a27d 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2322,8 +2322,14 @@ void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel )
2322 description.sprintf(i18n(" %d items?"),delSel.count() ); 2322 description.sprintf(i18n(" %d items?"),delSel.count() );
2323 } 2323 }
2324 while ( incidence ) { 2324 while ( incidence ) {
2325 Incidence *in = incidence->clone(); 2325 Incidence *in = incidence->clone();
2326 if ( ! in->summary().isEmpty() ) {
2327 in->setDescription("");
2328 } else {
2329 in->setSummary( in->description().left(20));
2330 in->setDescription("");
2331 }
2326 if ( addText ) 2332 if ( addText )
2327 description += in->summary() + "\n"; 2333 description += in->summary() + "\n";
2328 cal->addIncidence( in ); 2334 cal->addIncidence( in );
2329 incidence = delSel.next(); 2335 incidence = delSel.next();
@@ -2338,10 +2344,10 @@ void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel )
2338 storage.save(); 2344 storage.save();
2339 } 2345 }
2340 delete cal; 2346 delete cal;
2341 mes = i18n("KO/Pi: Ready for beaming"); 2347 mes = i18n("KO/Pi: Ready for beaming");
2342 setCaption(mes); 2348 topLevelWidget()->setCaption(mes);
2343 2349 KApplication::convert2latin1( fn );
2344#ifndef DESKTOP_VERSION 2350#ifndef DESKTOP_VERSION
2345 Ir *ir = new Ir( this ); 2351 Ir *ir = new Ir( this );
2346 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); 2352 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) );
2347 ir->send( fn, description, "text/x-vCalendar" ); 2353 ir->send( fn, description, "text/x-vCalendar" );
@@ -2352,8 +2358,10 @@ void CalendarView::beamDone( Ir *ir )
2352{ 2358{
2353#ifndef DESKTOP_VERSION 2359#ifndef DESKTOP_VERSION
2354 delete ir; 2360 delete ir;
2355#endif 2361#endif
2362 topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") );
2363 topLevelWidget()->raise();
2356} 2364}
2357 2365
2358void CalendarView::moveIncidence(Incidence * inc ) 2366void CalendarView::moveIncidence(Incidence * inc )
2359{ 2367{
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp
index 98ef2f2..56c01af 100644
--- a/microkde/kapplication.cpp
+++ b/microkde/kapplication.cpp
@@ -63,8 +63,30 @@ void KApplication::showFile(QString caption, QString fn)
63 KApplication::showText( caption, text ); 63 KApplication::showText( caption, text );
64 64
65} 65}
66 66
67bool KApplication::convert2latin1(QString fileName)
68{
69 QString text;
70 QFile file( fileName );
71 if (!file.open( IO_ReadOnly ) ) {
72 return false;
73
74 }
75 QTextStream ts( &file );
76 ts.setEncoding( QTextStream::UnicodeUTF8 );
77 text = ts.read();
78 file.close();
79 if (!file.open( IO_WriteOnly ) ) {
80 return false;
81 }
82 QTextStream tsIn( &file );
83 tsIn.setEncoding( QTextStream::Latin1 );
84 tsIn << text.latin1();
85 file.close();
86
87
88}
67void KApplication::showText(QString caption, QString text) 89void KApplication::showText(QString caption, QString text)
68{ 90{
69 QDialog dia( 0, "name", true ); ; 91 QDialog dia( 0, "name", true ); ;
70 dia.setCaption( caption ); 92 dia.setCaption( caption );
diff --git a/microkde/kapplication.h b/microkde/kapplication.h
index 79cdb33..41546a0 100644
--- a/microkde/kapplication.h
+++ b/microkde/kapplication.h
@@ -19,8 +19,9 @@ class KApplication
19 static int execDialog( QDialog* ); 19 static int execDialog( QDialog* );
20 static void showLicence(); 20 static void showLicence();
21 static void showFile(QString caption, QString file); 21 static void showFile(QString caption, QString file);
22 static void showText(QString caption, QString text); 22 static void showText(QString caption, QString text);
23 static bool convert2latin1(QString file);
23}; 24};
24 25
25 26
26#endif 27#endif