author | zautrix <zautrix> | 2004-10-14 06:42:01 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-14 06:42:01 (UTC) |
commit | a6dff815a9c6d3a91094573d23c28a8553fc7cc2 (patch) (side-by-side diff) | |
tree | a8830e9adcd72faa8178d4ee2517bfc31cda8653 | |
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 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 6 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 12 | ||||
-rw-r--r-- | microkde/kapplication.cpp | 22 | ||||
-rw-r--r-- | microkde/kapplication.h | 1 |
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 @@ -69,4 +69,7 @@ void GSM_CalendarFindDefaultTextTimeAlarmPhoneRecurrance(GSM_CalendarEntry *entr break; case CAL_TEXT: + *Text = i; + break; + case CAL_DESCRIPTION: if (*Text == -1) *Text = i; break; @@ -198,7 +201,7 @@ GSM_Error GSM_EncodeVCALENDAR(char *Buffer, int *Length, GSM_CalendarEntry *note CopyUnicodeString(buffer+UnicodeLength(buffer)*2,note->Entries[Text].Text); } - SaveVCALText(Buffer, Length, buffer, "DESCRIPTION"); + SaveVCALText(Buffer, Length, buffer, "SUMMARY"); } else { - SaveVCALText(Buffer, Length, note->Entries[Text].Text, "DESCRIPTION"); + SaveVCALText(Buffer, Length, note->Entries[Text].Text, "SUMMARY"); } } else if (Version == SonyEricsson_VCalendar) { @@ -417,9 +420,15 @@ GSM_Error GSM_DecodeVCALENDAR_VTODO(unsigned char *Buffer, int *Pos, GSM_Calenda Calendar->EntriesNum++; } - if ((ReadVCALText(Line, "SUMMARY", Buff)) || (ReadVCALText(Line, "DESCRIPTION", Buff))) { + // LR + if ((ReadVCALText(Line, "SUMMARY", Buff)) ) { Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_TEXT; CopyUnicodeString(Calendar->Entries[Calendar->EntriesNum].Text,Buff); Calendar->EntriesNum++; } + if (ReadVCALText(Line, "DESCRIPTION", Buff)) { + Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_DESCRIPTION; + CopyUnicodeString(Calendar->Entries[Calendar->EntriesNum].Text,Buff); + Calendar->EntriesNum++; + } if (ReadVCALText(Line, "LOCATION", Buff)) { Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_LOCATION; 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 @@ -158,4 +158,5 @@ typedef enum { */ CAL_TEXT, + CAL_DESCRIPTION, // LR added /** * Location. diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 47ed858..dae9cd2 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -814,6 +814,7 @@ void KABCore::beamVCard(const QStringList& uids) datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); QTextStream t( &outFile ); // use a text stream - t.setEncoding( QTextStream::UnicodeUTF8 ); - t <<datastream; + //t.setEncoding( QTextStream::UnicodeUTF8 ); + t.setEncoding( QTextStream::Latin1 ); + t <<datastream.latin1(); outFile.close(); Ir *ir = new Ir( this ); @@ -833,4 +834,5 @@ void KABCore::beamDone( Ir *ir ) delete ir; #endif + topLevelWidget()->raise(); } diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 1f2c6da..3e0a27d 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -2324,4 +2324,10 @@ void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) while ( incidence ) { Incidence *in = incidence->clone(); + if ( ! in->summary().isEmpty() ) { + in->setDescription(""); + } else { + in->setSummary( in->description().left(20)); + in->setDescription(""); + } if ( addText ) description += in->summary() + "\n"; @@ -2340,6 +2346,6 @@ void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) delete cal; mes = i18n("KO/Pi: Ready for beaming"); - setCaption(mes); - + topLevelWidget()->setCaption(mes); + KApplication::convert2latin1( fn ); #ifndef DESKTOP_VERSION Ir *ir = new Ir( this ); @@ -2354,4 +2360,6 @@ void CalendarView::beamDone( Ir *ir ) delete ir; #endif + topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); + topLevelWidget()->raise(); } diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp index 98ef2f2..56c01af 100644 --- a/microkde/kapplication.cpp +++ b/microkde/kapplication.cpp @@ -65,4 +65,26 @@ void KApplication::showFile(QString caption, QString fn) } +bool KApplication::convert2latin1(QString fileName) +{ + QString text; + QFile file( fileName ); + if (!file.open( IO_ReadOnly ) ) { + return false; + + } + QTextStream ts( &file ); + ts.setEncoding( QTextStream::UnicodeUTF8 ); + text = ts.read(); + file.close(); + if (!file.open( IO_WriteOnly ) ) { + return false; + } + QTextStream tsIn( &file ); + tsIn.setEncoding( QTextStream::Latin1 ); + tsIn << text.latin1(); + file.close(); + + +} void KApplication::showText(QString caption, QString text) { diff --git a/microkde/kapplication.h b/microkde/kapplication.h index 79cdb33..41546a0 100644 --- a/microkde/kapplication.h +++ b/microkde/kapplication.h @@ -21,4 +21,5 @@ class KApplication static void showFile(QString caption, QString file); static void showText(QString caption, QString text); + static bool convert2latin1(QString file); }; |