summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp2
-rw-r--r--kaddressbook/views/cardview.cpp8
-rw-r--r--kmicromail/koprefsdialog.cpp7
-rw-r--r--kmicromail/libmailwrapper/generatemail.cpp16
-rw-r--r--kmicromail/libmailwrapper/generatemail.h1
-rw-r--r--kmicromail/libmailwrapper/genericwrapper.cpp3
-rw-r--r--kmicromail/libmailwrapper/imapwrapper.cpp4
-rw-r--r--kmicromail/libmailwrapper/mailwrapper.h2
-rw-r--r--kmicromail/mainwindow.cpp3
-rw-r--r--microkde/kdecore/klocale.cpp3
-rw-r--r--microkde/kidmanager.cpp2
-rw-r--r--microkde/kresources/managerimpl.cpp4
12 files changed, 33 insertions, 22 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index d651224..c339244 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2734,25 +2734,25 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
2734 bool skipIncidence = false; 2734 bool skipIncidence = false;
2735 if ( uid.left(19) == QString("last-syncAddressee-") ) 2735 if ( uid.left(19) == QString("last-syncAddressee-") )
2736 skipIncidence = true; 2736 skipIncidence = true;
2737 QString idS,OidS; 2737 QString idS,OidS;
2738 qApp->processEvents(); 2738 qApp->processEvents();
2739 if ( !skipIncidence ) { 2739 if ( !skipIncidence ) {
2740 inL = local->findByUid( uid ); 2740 inL = local->findByUid( uid );
2741 inR = remote->findByUid( uid ); 2741 inR = remote->findByUid( uid );
2742 //inL.setResource( 0 ); 2742 //inL.setResource( 0 );
2743 //inR.setResource( 0 ); 2743 //inR.setResource( 0 );
2744 if ( !inL.isEmpty() ) { // maybe conflict - same uid in both calendars 2744 if ( !inL.isEmpty() ) { // maybe conflict - same uid in both calendars
2745 if ( !inL.resource() || inL.resource()->includeInSync() ) { 2745 if ( !inL.resource() || inL.resource()->includeInSync() ) {
2746 if ( take = takeAddressee( &inL, &inR, mode, fullDateRange ) ) { 2746 if ( (take = takeAddressee( &inL, &inR, mode, fullDateRange )) ) {
2747 //qDebug("take %d %s ", take, inL.summary().latin1()); 2747 //qDebug("take %d %s ", take, inL.summary().latin1());
2748 if ( take == 3 ) 2748 if ( take == 3 )
2749 return false; 2749 return false;
2750 if ( take == 1 ) {// take local ********************** 2750 if ( take == 1 ) {// take local **********************
2751 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2751 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2752 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); 2752 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) );
2753 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); 2753 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) );
2754 local->insertAddressee( inL, false ); 2754 local->insertAddressee( inL, false );
2755 idS = inR.externalUID(); 2755 idS = inR.externalUID();
2756 OidS = inR.originalExternalUID(); 2756 OidS = inR.originalExternalUID();
2757 } 2757 }
2758 else 2758 else
diff --git a/kaddressbook/views/cardview.cpp b/kaddressbook/views/cardview.cpp
index da552c3..03df444 100644
--- a/kaddressbook/views/cardview.cpp
+++ b/kaddressbook/views/cardview.cpp
@@ -145,27 +145,27 @@ class CardViewPrivate
145 mDrawFieldLabels( true ), 145 mDrawFieldLabels( true ),
146 mDrawSeparators( true), 146 mDrawSeparators( true),
147 mSepWidth( 2 ), 147 mSepWidth( 2 ),
148 mShowEmptyFields( false ), 148 mShowEmptyFields( false ),
149 mLayoutDirty( true ), 149 mLayoutDirty( true ),
150 mLastClickOnItem( false ), 150 mLastClickOnItem( false ),
151 mItemMargin( 0 ), 151 mItemMargin( 0 ),
152 mItemSpacing( 10 ), 152 mItemSpacing( 10 ),
153 mItemWidth( 200 ), 153 mItemWidth( 200 ),
154 mMaxFieldLines( INT_MAX ), 154 mMaxFieldLines( INT_MAX ),
155 mCurrentItem( 0L ), 155 mCurrentItem( 0L ),
156 mLastClickPos( QPoint(0, 0) ), 156 mLastClickPos( QPoint(0, 0) ),
157 mResizeAnchor(0),
157 mRubberBandAnchor( 0 ), 158 mRubberBandAnchor( 0 ),
158 mCompText( QString::null ), 159 mCompText( QString::null )
159 mResizeAnchor(0)
160 {}; 160 {};
161 161
162 CardViewItemList mItemList; 162 CardViewItemList mItemList;
163 QPtrList<CardViewSeparator> mSeparatorList; 163 QPtrList<CardViewSeparator> mSeparatorList;
164 QFontMetrics *mFm; 164 QFontMetrics *mFm;
165 QFontMetrics *mBFm; // bold font 165 QFontMetrics *mBFm; // bold font
166 QFont mHeaderFont; // custom header font 166 QFont mHeaderFont; // custom header font
167 CardView::SelectionMode mSelectionMode; 167 CardView::SelectionMode mSelectionMode;
168 bool mDrawCardBorder; 168 bool mDrawCardBorder;
169 bool mDrawFieldLabels; 169 bool mDrawFieldLabels;
170 bool mDrawSeparators; 170 bool mDrawSeparators;
171 int mSepWidth; 171 int mSepWidth;
@@ -192,27 +192,27 @@ class CardViewPrivate
192 int firstX; // X position of first in pixel 192 int firstX; // X position of first in pixel
193 int pressed; // the colummn that was pressed on at resizing start 193 int pressed; // the colummn that was pressed on at resizing start
194 int span; // pressed - first 194 int span; // pressed - first
195 // key completion 195 // key completion
196 QString mCompText; // current completion string 196 QString mCompText; // current completion string
197 QDateTime mCompUpdated; // ...was updated at this time 197 QDateTime mCompUpdated; // ...was updated at this time
198}; 198};
199 199
200class CardViewItemPrivate 200class CardViewItemPrivate
201{ 201{
202 public: 202 public:
203 CardViewItemPrivate() : 203 CardViewItemPrivate() :
204 mSelected( false ),
204 x( 0 ), 205 x( 0 ),
205 y( 0 ), 206 y( 0 ){};
206 mSelected( false ){};
207 207
208 208
209 QString mCaption; 209 QString mCaption;
210 QPtrList< CardViewItem::Field > mFieldList; 210 QPtrList< CardViewItem::Field > mFieldList;
211 bool mSelected; 211 bool mSelected;
212 int x; // horizontal position, set by the view 212 int x; // horizontal position, set by the view
213 int y; // vertical position, set by the view 213 int y; // vertical position, set by the view
214 int maxLabelWidth; // the width of the widest label, according to the view font. 214 int maxLabelWidth; // the width of the widest label, according to the view font.
215 int hcache; // height cache 215 int hcache; // height cache
216}; 216};
217//END Private Data 217//END Private Data
218 218
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 4abf859..13d6681 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -138,29 +138,30 @@ void KOPrefsDialog::setupMailTab()
138 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 138 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
139 topLayout->setSpacing(spacingHint()); 139 topLayout->setSpacing(spacingHint());
140 topLayout->setMargin(marginHint()); 140 topLayout->setMargin(marginHint());
141 141
142 KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), 142 KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"),
143 &(KOPrefs::instance()->mViewAsHtml),topFrame); 143 &(KOPrefs::instance()->mViewAsHtml),topFrame);
144 topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); 144 topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1);
145 145
146 146
147 ttt = addWidBool(i18n("Send mails later"), 147 ttt = addWidBool(i18n("Send mails later"),
148 &(KOPrefs::instance()->mSendLater),topFrame); 148 &(KOPrefs::instance()->mSendLater),topFrame);
149 topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); 149 topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1);
150 /*
150 mCodecEdit = new QLineEdit(topFrame); 151 mCodecEdit = new QLineEdit(topFrame);
151 topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1); 152 topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1);
152 topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1); 153 topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1);
153 topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1); 154 topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1);
154 155 */
155} 156}
156void KOPrefsDialog::setupFontsTab() 157void KOPrefsDialog::setupFontsTab()
157{ 158{
158 159
159 QFrame *topFrame = addPage(i18n("Fonts"),0,0); 160 QFrame *topFrame = addPage(i18n("Fonts"),0,0);
160 // DesktopIcon("fonts",KIcon::SizeMedium)); 161 // DesktopIcon("fonts",KIcon::SizeMedium));
161 162
162 QGridLayout *topLayout = new QGridLayout(topFrame,7,3); 163 QGridLayout *topLayout = new QGridLayout(topFrame,7,3);
163 topLayout->setSpacing(1); 164 topLayout->setSpacing(1);
164 topLayout->setMargin(3); 165 topLayout->setMargin(3);
165 KPrefsDialogWidFont * tVFont; 166 KPrefsDialogWidFont * tVFont;
166 int i = 0; 167 int i = 0;
@@ -189,32 +190,32 @@ void KOPrefsDialog::setupFontsTab()
189 topLayout->addWidget(timeBarFont->button(),i,2); 190 topLayout->addWidget(timeBarFont->button(),i,2);
190 ++i; 191 ++i;
191 192
192 topLayout->setColStretch(1,1); 193 topLayout->setColStretch(1,1);
193 topLayout->setRowStretch(4,1); 194 topLayout->setRowStretch(4,1);
194 195
195} 196}
196void KOPrefsDialog::usrReadConfig() 197void KOPrefsDialog::usrReadConfig()
197{ 198{
198 199
199 mNameEdit->setText(KOPrefs::instance()->mName); 200 mNameEdit->setText(KOPrefs::instance()->mName);
200 mEmailEdit->setText(KOPrefs::instance()->mEmail); 201 mEmailEdit->setText(KOPrefs::instance()->mEmail);
201 mCodecEdit->setText(KOPrefs::instance()->mSendCodec); 202 //mCodecEdit->setText(KOPrefs::instance()->mSendCodec);
202 kdelibcfg->readConfig(); 203 kdelibcfg->readConfig();
203} 204}
204void KOPrefsDialog::usrWriteConfig() 205void KOPrefsDialog::usrWriteConfig()
205{ 206{
206 KOPrefs::instance()->mName = mNameEdit->text(); 207 KOPrefs::instance()->mName = mNameEdit->text();
207 KOPrefs::instance()->mEmail = mEmailEdit->text(); 208 KOPrefs::instance()->mEmail = mEmailEdit->text();
208 KOPrefs::instance()->mSendCodec = mCodecEdit->text(); 209 //KOPrefs::instance()->mSendCodec = mCodecEdit->text();
209 kdelibcfg->writeConfig(); 210 kdelibcfg->writeConfig();
210 211
211 212
212} 213}
213 214
214#if 0 215#if 0
215void KOPrefsDialog::setupLocaleDateTab() 216void KOPrefsDialog::setupLocaleDateTab()
216{ 217{
217QFrame *topFrame = addPage(i18n("Date Format"),0,0); 218QFrame *topFrame = addPage(i18n("Date Format"),0,0);
218 QGridLayout *topLayout = new QGridLayout(topFrame,3,2); 219 QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
219 topLayout->setSpacing(spacingHint()); 220 topLayout->setSpacing(spacingHint());
220 topLayout->setMargin(marginHint()); 221 topLayout->setMargin(marginHint());
diff --git a/kmicromail/libmailwrapper/generatemail.cpp b/kmicromail/libmailwrapper/generatemail.cpp
index 32311d7..2d213fe 100644
--- a/kmicromail/libmailwrapper/generatemail.cpp
+++ b/kmicromail/libmailwrapper/generatemail.cpp
@@ -4,24 +4,25 @@
4#include <libetpan/libetpan.h> 4#include <libetpan/libetpan.h>
5 5
6//#include <qt.h> 6//#include <qt.h>
7 7
8#include <stdlib.h> 8#include <stdlib.h>
9#include <qfileinfo.h> 9#include <qfileinfo.h>
10 10
11using namespace Opie::Core; 11using namespace Opie::Core;
12const char* Generatemail::USER_AGENT="KOpieMail 33 1/3"; 12const char* Generatemail::USER_AGENT="KOpieMail 33 1/3";
13 13
14Generatemail::Generatemail() 14Generatemail::Generatemail()
15{ 15{
16 mCharset = "iso-8859-1";
16} 17}
17 18
18Generatemail::~Generatemail() 19Generatemail::~Generatemail()
19{ 20{
20} 21}
21 22
22void Generatemail::addRcpts( clist *list, mailimf_address_list *addr_list ) { 23void Generatemail::addRcpts( clist *list, mailimf_address_list *addr_list ) {
23 clistiter *it, *it2; 24 clistiter *it, *it2;
24 25
25 for ( it = clist_begin( addr_list->ad_list ); it; it = it->next ) { 26 for ( it = clist_begin( addr_list->ad_list ); it; it = it->next ) {
26 mailimf_address *addr; 27 mailimf_address *addr;
27 addr = (mailimf_address *) it->data; 28 addr = (mailimf_address *) it->data;
@@ -136,50 +137,51 @@ mailmime *Generatemail::buildFilePart(const QString&filename,const QString&mimet
136 137
137 if (filename.length()>0) { 138 if (filename.length()>0) {
138 QString tmp = filename.right( filename.length() - ( pos + 1 ) ); 139 QString tmp = filename.right( filename.length() - ( pos + 1 ) );
139 name = strdup( tmp.latin1() ); // just filename 140 name = strdup( tmp.latin1() ); // just filename
140 file = strdup( filename.latin1() ); // full name with path 141 file = strdup( filename.latin1() ); // full name with path
141 } 142 }
142 143
143 int disptype = MAILMIME_DISPOSITION_TYPE_ATTACHMENT; 144 int disptype = MAILMIME_DISPOSITION_TYPE_ATTACHMENT;
144 int mechanism = MAILMIME_MECHANISM_BASE64; 145 int mechanism = MAILMIME_MECHANISM_BASE64;
145 146
146 if ( mimetype.startsWith( "text/" ) ) { 147 if ( mimetype.startsWith( "text/" ) ) {
147 param = mailmime_parameter_new( strdup( "charset" ), 148 param = mailmime_parameter_new( strdup( "charset" ),
148 strdup( "iso-8859-1" ) ); 149 strdup( mCharset.latin1() ) );
149 mechanism = MAILMIME_MECHANISM_QUOTED_PRINTABLE; 150 mechanism = MAILMIME_MECHANISM_QUOTED_PRINTABLE;
150 } 151 }
151 152
152 fields = mailmime_fields_new_filename( 153 fields = mailmime_fields_new_filename(
153 disptype, name, 154 disptype, name,
154 mechanism ); 155 mechanism );
155 content = mailmime_content_new_with_str( (char*)mimetype.latin1() ); 156 content = mailmime_content_new_with_str( (char*)mimetype.latin1() );
156 if (content!=0 && fields != 0) { 157 if (content!=0 && fields != 0) {
157 if (param) { 158 if (param) {
158 clist_append(content->ct_parameters,param); 159 clist_append(content->ct_parameters,param);
159 param = 0; 160 param = 0;
160 } 161 }
161 if (filename.length()>0) { 162 if (filename.length()>0) {
162 QFileInfo f(filename); 163 QFileInfo f(filename);
163 param = mailmime_parameter_new(strdup("name"),strdup(f.fileName().latin1())); 164 param = mailmime_parameter_new(strdup("name"),strdup(f.fileName().latin1()));
164 clist_append(content->ct_parameters,param); 165 clist_append(content->ct_parameters,param);
165 param = 0; 166 param = 0;
166 } 167 }
167 filePart = mailmime_new_empty( content, fields ); 168 filePart = mailmime_new_empty( content, fields );
168 } 169 }
169 if (filePart) { 170 if (filePart) {
170 if (filename.length()>0) { 171 if (filename.length()>0) {
171 err = mailmime_set_body_file( filePart, file ); 172 err = mailmime_set_body_file( filePart, file );
172 } else { 173 } else {
173 err = mailmime_set_body_text(filePart,strdup( TextContent.utf8()),TextContent.utf8().length()); 174 err = mailmime_set_body_text(filePart,strdup( TextContent.utf8().data()),TextContent.utf8().length());
175 //err = mailmime_set_body_text(filePart,strdup( TextContent.latin1()),TextContent.length());
174 } 176 }
175 if (err != MAILIMF_NO_ERROR) { 177 if (err != MAILIMF_NO_ERROR) {
176 qDebug("Error setting body with file "); 178 qDebug("Error setting body with file ");
177 mailmime_free( filePart ); 179 mailmime_free( filePart );
178 filePart = 0; 180 filePart = 0;
179 } 181 }
180 } 182 }
181 183
182 if (!filePart) { 184 if (!filePart) {
183 if ( param != NULL ) { 185 if ( param != NULL ) {
184 mailmime_parameter_free( param ); 186 mailmime_parameter_free( param );
185 } 187 }
@@ -218,47 +220,49 @@ void Generatemail::addFileParts( mailmime *message,const QList<Attachment>&files
218 mailmime_free( filePart ); 220 mailmime_free( filePart );
219 } 221 }
220 } 222 }
221} 223}
222 224
223mailmime *Generatemail::buildTxtPart(const QString&str ) { 225mailmime *Generatemail::buildTxtPart(const QString&str ) {
224 mailmime *txtPart; 226 mailmime *txtPart;
225 mailmime_fields *fields; 227 mailmime_fields *fields;
226 mailmime_content *content; 228 mailmime_content *content;
227 mailmime_parameter *param; 229 mailmime_parameter *param;
228 int err; 230 int err;
229 QCString __str; 231 QCString __str;
232 //qDebug(" Generatemail::buildTxtPart %s", str.latin1());
230 param = mailmime_parameter_new( strdup( "charset" ), 233 param = mailmime_parameter_new( strdup( "charset" ),
231 strdup( "iso-8859-1" ) ); 234 strdup( mCharset.latin1() ) );
232 if ( param == NULL ) 235 if ( param == NULL )
233 goto err_free; 236 goto err_free;
234 237
235 content = mailmime_content_new_with_str( "text/plain" ); 238 content = mailmime_content_new_with_str( "text/plain" );
236 if ( content == NULL ) 239 if ( content == NULL )
237 goto err_free_param; 240 goto err_free_param;
238 241
239 err = clist_append( content->ct_parameters, param ); 242 err = clist_append( content->ct_parameters, param );
240 if ( err != MAILIMF_NO_ERROR ) 243 if ( err != MAILIMF_NO_ERROR )
241 goto err_free_content; 244 goto err_free_content;
242 245
243 fields = mailmime_fields_new_encoding(MAILMIME_MECHANISM_8BIT); 246 fields = mailmime_fields_new_encoding(MAILMIME_MECHANISM_8BIT);
244 if ( fields == NULL ) 247 if ( fields == NULL )
245 goto err_free_content; 248 goto err_free_content;
246 249
247 txtPart = mailmime_new_empty( content, fields ); 250 txtPart = mailmime_new_empty( content, fields );
248 if ( txtPart == NULL ) 251 if ( txtPart == NULL )
249 goto err_free_fields; 252 goto err_free_fields;
250 { 253 {
251 __str = str.utf8(); 254 //__str = str.utf8();
252 err = mailmime_set_body_text( txtPart, __str.data(), __str.length() ); 255 __str = QCString (str.latin1());
256 err = mailmime_set_body_text( txtPart, strdup(__str.data()), __str.length() );
253 } 257 }
254 if ( err != MAILIMF_NO_ERROR ) 258 if ( err != MAILIMF_NO_ERROR )
255 goto err_free_txtPart; 259 goto err_free_txtPart;
256 260
257 return txtPart; // Success :) 261 return txtPart; // Success :)
258 262
259err_free_txtPart: 263err_free_txtPart:
260 mailmime_free( txtPart ); 264 mailmime_free( txtPart );
261err_free_fields: 265err_free_fields:
262 mailmime_fields_free( fields ); 266 mailmime_fields_free( fields );
263err_free_content: 267err_free_content:
264 mailmime_content_free( content ); 268 mailmime_content_free( content );
@@ -389,24 +393,26 @@ mailimf_fields *Generatemail::createImfFields(const Opie::Core::OSmartPointer<Ma
389 free( subject ); 393 free( subject );
390 } 394 }
391 } 395 }
392 } 396 }
393 return fields; 397 return fields;
394} 398}
395 399
396mailmime *Generatemail::createMimeMail(const Opie::Core::OSmartPointer<Mail> &mail ) { 400mailmime *Generatemail::createMimeMail(const Opie::Core::OSmartPointer<Mail> &mail ) {
397 mailmime *message, *txtPart; 401 mailmime *message, *txtPart;
398 mailimf_fields *fields; 402 mailimf_fields *fields;
399 int err; 403 int err;
400 404
405 //LR disabled for now
406 //mCharset = mail->getCharset().lower();
401 fields = createImfFields( mail ); 407 fields = createImfFields( mail );
402 if ( fields == NULL ) 408 if ( fields == NULL )
403 goto err_free; 409 goto err_free;
404 410
405 message = mailmime_new_message_data( NULL ); 411 message = mailmime_new_message_data( NULL );
406 if ( message == NULL ) 412 if ( message == NULL )
407 goto err_free_fields; 413 goto err_free_fields;
408 414
409 mailmime_set_imf_fields( message, fields ); 415 mailmime_set_imf_fields( message, fields );
410 416
411 txtPart = buildTxtPart( mail->getMessage() ); 417 txtPart = buildTxtPart( mail->getMessage() );
412 418
diff --git a/kmicromail/libmailwrapper/generatemail.h b/kmicromail/libmailwrapper/generatemail.h
index b9f8285..a9fb648 100644
--- a/kmicromail/libmailwrapper/generatemail.h
+++ b/kmicromail/libmailwrapper/generatemail.h
@@ -33,15 +33,16 @@ protected:
33 static char *getFrom( mailimf_field *ffrom); 33 static char *getFrom( mailimf_field *ffrom);
34 static mailimf_field *getField( mailimf_fields *fields, int type ); 34 static mailimf_field *getField( mailimf_fields *fields, int type );
35 mailimf_address_list *parseAddresses(const QString&addr ); 35 mailimf_address_list *parseAddresses(const QString&addr );
36 void addFileParts( mailmime *message,const QList<Attachment>&files ); 36 void addFileParts( mailmime *message,const QList<Attachment>&files );
37 mailmime *buildFilePart(const QString&filename,const QString&mimetype,const QString&content); 37 mailmime *buildFilePart(const QString&filename,const QString&mimetype,const QString&content);
38 mailmime *buildTxtPart(const QString&str ); 38 mailmime *buildTxtPart(const QString&str );
39 mailimf_mailbox *newMailbox(const QString&name,const QString&mail ); 39 mailimf_mailbox *newMailbox(const QString&name,const QString&mail );
40 mailimf_fields *createImfFields(const Opie::Core::OSmartPointer<Mail> &mail ); 40 mailimf_fields *createImfFields(const Opie::Core::OSmartPointer<Mail> &mail );
41 mailmime *createMimeMail(const Opie::Core::OSmartPointer<Mail>&mail ); 41 mailmime *createMimeMail(const Opie::Core::OSmartPointer<Mail>&mail );
42 clist *createRcptList( mailimf_fields *fields ); 42 clist *createRcptList( mailimf_fields *fields );
43 43
44 static const char* USER_AGENT; 44 static const char* USER_AGENT;
45 QString mCharset;
45}; 46};
46 47
47#endif 48#endif
diff --git a/kmicromail/libmailwrapper/genericwrapper.cpp b/kmicromail/libmailwrapper/genericwrapper.cpp
index 28d45ce..eac05e5 100644
--- a/kmicromail/libmailwrapper/genericwrapper.cpp
+++ b/kmicromail/libmailwrapper/genericwrapper.cpp
@@ -216,25 +216,26 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m
216 bodyCache[b]=rs; 216 bodyCache[b]=rs;
217 target->addPart(part); 217 target->addPart(part);
218 } else { 218 } else {
219 delete rs; 219 delete rs;
220 } 220 }
221 b = QString(res->Content()); 221 b = QString(res->Content());
222 delete res; 222 delete res;
223 size_t index = 0; 223 size_t index = 0;
224 char*resu = 0; 224 char*resu = 0;
225 int err = MAILIMF_NO_ERROR; 225 int err = MAILIMF_NO_ERROR;
226 QString charset = part->searchParamter( "charset"); 226 QString charset = part->searchParamter( "charset");
227 qDebug("CHARSET %s ",charset.latin1() ); 227 qDebug("CHARSET %s ",charset.latin1() );
228 if ( !charset.isEmpty() ) { 228 if (false ) {
229 //if ( !charset.isEmpty() ) {
229 target->setCharset( charset ); 230 target->setCharset( charset );
230 err = mailmime_encoded_phrase_parse(charset.latin1(), 231 err = mailmime_encoded_phrase_parse(charset.latin1(),
231 b.latin1(), b.length(),&index, "utf-8",&resu); 232 b.latin1(), b.length(),&index, "utf-8",&resu);
232 if (err == MAILIMF_NO_ERROR && resu && strlen(resu)) { 233 if (err == MAILIMF_NO_ERROR && resu && strlen(resu)) {
233 //qDebug("res %d %s ", index, resu); 234 //qDebug("res %d %s ", index, resu);
234 b = QString::fromUtf8(resu); 235 b = QString::fromUtf8(resu);
235 } 236 }
236 if (resu) free(resu); 237 if (resu) free(resu);
237 } 238 }
238 target->setBodytext(b); 239 target->setBodytext(b);
239 target->setDescription(part); 240 target->setDescription(part);
240 } else { 241 } else {
diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp
index 2a54381..da7065f 100644
--- a/kmicromail/libmailwrapper/imapwrapper.cpp
+++ b/kmicromail/libmailwrapper/imapwrapper.cpp
@@ -750,26 +750,26 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t
750 fillSinglePart(currentPart,part1); 750 fillSinglePart(currentPart,part1);
751 /* important: Check for is NULL 'cause a body can be empty! 751 /* important: Check for is NULL 'cause a body can be empty!
752 And we put it only into the mail if it is the FIRST part */ 752 And we put it only into the mail if it is the FIRST part */
753 if (part1->bd_type==MAILIMAP_BODY_TYPE_1PART_TEXT && target_body->Bodytext().isNull() && countlist[0]==1) { 753 if (part1->bd_type==MAILIMAP_BODY_TYPE_1PART_TEXT && target_body->Bodytext().isNull() && countlist[0]==1) {
754 QString body_text = fetchTextPart(mail,countlist,true,currentPart->Encoding()); 754 QString body_text = fetchTextPart(mail,countlist,true,currentPart->Encoding());
755 755
756 size_t index = 0; 756 size_t index = 0;
757 char*res = 0; 757 char*res = 0;
758 int err = MAILIMF_NO_ERROR; 758 int err = MAILIMF_NO_ERROR;
759 759
760 QString charset = currentPart->searchParamter( "charset"); 760 QString charset = currentPart->searchParamter( "charset");
761 qDebug("CHARSET %s ",charset.latin1() ); 761 qDebug("CHARSET %s ",charset.latin1() );
762 //if ( false ) { 762 if ( false ) {
763 if ( !charset.isEmpty() ) { 763 //if ( !charset.isEmpty() ) {
764 target_body->setCharset( charset ); 764 target_body->setCharset( charset );
765 //err = mailmime_encoded_phrase_parse("iso-8859-1", 765 //err = mailmime_encoded_phrase_parse("iso-8859-1",
766 // text, strlen(text),&index, "iso-8859-1",&res); 766 // text, strlen(text),&index, "iso-8859-1",&res);
767 err = mailmime_encoded_phrase_parse(charset.latin1(), 767 err = mailmime_encoded_phrase_parse(charset.latin1(),
768 body_text.latin1(), body_text.length(),&index, "utf-8",&res); 768 body_text.latin1(), body_text.length(),&index, "utf-8",&res);
769 if (err == MAILIMF_NO_ERROR && res && strlen(res)) { 769 if (err == MAILIMF_NO_ERROR && res && strlen(res)) {
770 //qDebug("res %d %s ", index, res); 770 //qDebug("res %d %s ", index, res);
771 body_text = QString::fromUtf8(res); 771 body_text = QString::fromUtf8(res);
772 } 772 }
773 if (res) free(res); 773 if (res) free(res);
774 } 774 }
775 //qDebug("encoding %d text %s ",currentPart->Encoding().latin1(), body_text.latin1() ); 775 //qDebug("encoding %d text %s ",currentPart->Encoding().latin1(), body_text.latin1() );
diff --git a/kmicromail/libmailwrapper/mailwrapper.h b/kmicromail/libmailwrapper/mailwrapper.h
index ea6bf36..3e8b51f 100644
--- a/kmicromail/libmailwrapper/mailwrapper.h
+++ b/kmicromail/libmailwrapper/mailwrapper.h
@@ -74,25 +74,25 @@ public:
74 const QString&getBCC()const { return bcc; } 74 const QString&getBCC()const { return bcc; }
75 void setBCC( const QString&s ) { bcc = s; } 75 void setBCC( const QString&s ) { bcc = s; }
76 const QString&getMessage()const { return message; } 76 const QString&getMessage()const { return message; }
77 void setMessage( const QString&s ) { message = s; } 77 void setMessage( const QString&s ) { message = s; }
78 const QString&getSubject()const { return subject; } 78 const QString&getSubject()const { return subject; }
79 void setSubject( const QString&s ) { subject = s; } 79 void setSubject( const QString&s ) { subject = s; }
80 const QString&getReply()const{ return reply; } 80 const QString&getReply()const{ return reply; }
81 void setReply( const QString&a ) { reply = a; } 81 void setReply( const QString&a ) { reply = a; }
82 void setInreply(const QStringList&list){m_in_reply_to = list;} 82 void setInreply(const QStringList&list){m_in_reply_to = list;}
83 const QStringList&Inreply()const{return m_in_reply_to;} 83 const QStringList&Inreply()const{return m_in_reply_to;}
84 84
85 void setCharset( const QString&a ) { charset= a; } 85 void setCharset( const QString&a ) { charset= a; }
86 const QString& getCharset() { return charset; } 86 const QString& getCharset() const { return charset; }
87 87
88private: 88private:
89 QList<Attachment> attList; 89 QList<Attachment> attList;
90 QString name, mail, to, cc, bcc, reply, subject, message, charset; 90 QString name, mail, to, cc, bcc, reply, subject, message, charset;
91 QStringList m_in_reply_to; 91 QStringList m_in_reply_to;
92}; 92};
93 93
94class Folder:public Opie::Core::ORefCount 94class Folder:public Opie::Core::ORefCount
95{ 95{
96public: 96public:
97 Folder( const QString&init_name,const QString&sep ); 97 Folder( const QString&init_name,const QString&sep );
98 virtual ~Folder(); 98 virtual ~Folder();
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 3013931..8c0a4cb 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -98,25 +98,26 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
98 connect( editSettings, SIGNAL( activated() ), 98 connect( editSettings, SIGNAL( activated() ),
99 SLOT( slotEditSettings() ) ); 99 SLOT( slotEditSettings() ) );
100 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , 100 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") ,
101 0, 0, this ); 101 0, 0, this );
102 editAccounts->addTo( settingsMenu ); 102 editAccounts->addTo( settingsMenu );
103 codecMenu = new QPopupMenu( menuBar ); 103 codecMenu = new QPopupMenu( menuBar );
104 codecMenu->insertItem( "Western (iso-8859-1)",0,0); 104 codecMenu->insertItem( "Western (iso-8859-1)",0,0);
105 codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1); 105 codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1);
106 codecMenu->insertItem( "Western (iso-8859-15)",2,2); 106 codecMenu->insertItem( "Western (iso-8859-15)",2,2);
107 codecMenu->insertItem( "Chinese (big-5)",3,3); 107 codecMenu->insertItem( "Chinese (big-5)",3,3);
108 codecMenu->insertItem( "Unicode (utf-8)",4,4); 108 codecMenu->insertItem( "Unicode (utf-8)",4,4);
109 codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5); 109 codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5);
110 settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu); 110 //disabled
111 //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu);
111 //setCentralWidget( view ); 112 //setCentralWidget( view );
112 113
113 QVBox* wrapperBox = new QVBox( this ); 114 QVBox* wrapperBox = new QVBox( this );
114 setCentralWidget( wrapperBox ); 115 setCentralWidget( wrapperBox );
115 116
116 // QWidget *view = new QWidget( wrapperBox ); 117 // QWidget *view = new QWidget( wrapperBox );
117 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox); 118 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox);
118 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); 119 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left);
119 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); 120 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight );
120 121
121 folderView = new AccountView( split ); 122 folderView = new AccountView( split );
122 folderView->header()->hide(); 123 folderView->header()->hide();
diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp
index 1da1e99..d7e384c 100644
--- a/microkde/kdecore/klocale.cpp
+++ b/microkde/kdecore/klocale.cpp
@@ -875,25 +875,26 @@ QString KLocale::timeFormat(IntDateFormat intIntTimeFormat) const
875 875
876 else if ( tformat == Format1 ) 876 else if ( tformat == Format1 )
877 if ( mHourF24Format) 877 if ( mHourF24Format)
878 return "%H:%M:%S"; 878 return "%H:%M:%S";
879 else 879 else
880 return "%I:%M:%S%p"; 880 return "%I:%M:%S%p";
881 881
882 else if ( tformat == ISODate ) // = Qt::ISODate 882 else if ( tformat == ISODate ) // = Qt::ISODate
883 if ( mHourF24Format) 883 if ( mHourF24Format)
884 return "%H:%M:%S"; 884 return "%H:%M:%S";
885 else 885 else
886 return "%I:%M:%S%p"; 886 return "%I:%M:%S%p";
887 887 // to satisfy the compiler
888 return "%H:%M:%S";
888} 889}
889 890
890void KLocale::insertCatalogue ( const QString & ) 891void KLocale::insertCatalogue ( const QString & )
891{ 892{
892} 893}
893 894
894KCalendarSystem *KLocale::calendar() 895KCalendarSystem *KLocale::calendar()
895{ 896{
896 if ( !mCalendarSystem ) { 897 if ( !mCalendarSystem ) {
897 mCalendarSystem = new KCalendarSystemGregorian; 898 mCalendarSystem = new KCalendarSystemGregorian;
898 } 899 }
899 900
diff --git a/microkde/kidmanager.cpp b/microkde/kidmanager.cpp
index 8cf486a..e687e5d 100644
--- a/microkde/kidmanager.cpp
+++ b/microkde/kidmanager.cpp
@@ -112,25 +112,25 @@ bool KIdManager::getNumbers (const QString& idString,const QString& prof, int &s
112 bool ok; 112 bool ok;
113 lenID = idString.mid ( startIDnum,startIDnumlen).toInt( &ok ); 113 lenID = idString.mid ( startIDnum,startIDnumlen).toInt( &ok );
114 if (ok) { 114 if (ok) {
115 startCsum = startID+lenID+1; 115 startCsum = startID+lenID+1;
116 endall = idString.find( ":", startCsum )-1; 116 endall = idString.find( ":", startCsum )-1;
117 if ( endall < 0 ) { 117 if ( endall < 0 ) {
118 qDebug("Error getNumbers: andall not found "); 118 qDebug("Error getNumbers: andall not found ");
119 return false; 119 return false;
120 } 120 }
121 lenCsum = endall-startCsum+1; 121 lenCsum = endall-startCsum+1;
122 } 122 }
123 else { 123 else {
124 qDebug("Error getNumbers:length is no number:*%s* ", idString.mid ( startIDnum,startIDnumlen).toInt( &ok )); 124 qDebug("Error getNumbers:length is no number:*%s* ", idString.mid ( startIDnum,startIDnumlen).latin1());
125 return false; 125 return false;
126 } 126 }
127 } else { 127 } else {
128 qDebug("Error in KIdManager::getNumbers.startIDnum <= 0"); 128 qDebug("Error in KIdManager::getNumbers.startIDnum <= 0");
129 return false; 129 return false;
130 } 130 }
131 } else { 131 } else {
132 //qDebug("getnumbers: profile not found *%s* ",prof.latin1() ); 132 //qDebug("getnumbers: profile not found *%s* ",prof.latin1() );
133 return false; 133 return false;
134 } 134 }
135 return true; 135 return true;
136} 136}
diff --git a/microkde/kresources/managerimpl.cpp b/microkde/kresources/managerimpl.cpp
index 5bd9eb7..566b8f4 100644
--- a/microkde/kresources/managerimpl.cpp
+++ b/microkde/kresources/managerimpl.cpp
@@ -148,37 +148,37 @@ void ManagerImpl::writeConfig( KConfig *cfg )
148 else 148 else
149 mConfig->writeEntry( "Standard", "" ); 149 mConfig->writeEntry( "Standard", "" );
150 150
151 mConfig->sync(); 151 mConfig->sync();
152 kdDebug(5650) << "ManagerImpl::save() finished" << endl; 152 kdDebug(5650) << "ManagerImpl::save() finished" << endl;
153 153
154//US qDebug("ManagerImpl::writeConfig end this= %ul cfg=%ul", this, cfg); 154//US qDebug("ManagerImpl::writeConfig end this= %ul cfg=%ul", this, cfg);
155 155
156} 156}
157 157
158void ManagerImpl::add( Resource *resource, bool useDCOP ) 158void ManagerImpl::add( Resource *resource, bool useDCOP )
159{ 159{
160qDebug("ManagerImpl::add begin this= %ul resource=%ul", this, resource); 160 //qDebug("ManagerImpl::add begin this= %ul resource=%ul", this, resource);
161 161
162 resource->setActive( true ); 162 resource->setActive( true );
163 163
164 if ( mResources.isEmpty() ) { 164 if ( mResources.isEmpty() ) {
165 mStandard = resource; 165 mStandard = resource;
166 } 166 }
167 167
168 mResources.append( resource ); 168 mResources.append( resource );
169 169
170 writeResourceConfig( resource, true ); 170 writeResourceConfig( resource, true );
171 171
172 qDebug("ManagerImpl::add end this= %ul resource=%ul", this, resource); 172 //qDebug("ManagerImpl::add end this= %ul resource=%ul", this, resource);
173 173
174} 174}
175 175
176void ManagerImpl::remove( Resource *resource, bool useDCOP ) 176void ManagerImpl::remove( Resource *resource, bool useDCOP )
177{ 177{
178 if ( mStandard == resource ) mStandard = 0; 178 if ( mStandard == resource ) mStandard = 0;
179 removeResource( resource ); 179 removeResource( resource );
180 180
181 mResources.remove( resource ); 181 mResources.remove( resource );
182 182
183 delete resource; 183 delete resource;
184 184