[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: Re: PATCH: Outlook compatible attachment naming
From: Don Sanders <sanders () kde ! org>
Date: 2004-05-01 5:37:10
Message-ID: 200405011537.10240.sanders () kde ! org
[Download RAW message or body]
On Friday 30 April 2004 19:45, Till Adam wrote:
> On Friday 30 April 2004 01:19, Ingo Klöcker wrote:
> > We will vote for or against the following:
> > Support of the obsolete RFC 2184 (for Outlook compatible
> > attachment filenames).
I vote for Support of the obsolete RFC 2184 Outlook compatible
attachment filenames. As done in the attached patch and requested and
funded by Branislav Klocok. I will update the patch to show a warning
RFC violation messagebox when outlook compatible encoded names are
used, but have run out of time right now. (Any suggestion on the
wording?)
I agree David, Andreas and Bo should be considered core developers.
But I'm against removing Zack, especially without a vote on that, as
I think doing otherwise would be overly harsh.
Ingo: against
Don: for
Carsten:
Marc: against
Till: for
Zack:
Andreas: for (with messagebox)
David:
Bo:
If the for's don't have a majority I'll resume work on the previous
patch.
Don.
["kmaildiff8" (text/x-diff)]
Index: configuredialog.cpp
===================================================================
RCS file: /home/kde/kdepim/kmail/configuredialog.cpp,v
retrieving revision 1.433
diff -d -u -p -r1.433 configuredialog.cpp
--- configuredialog.cpp 24 Apr 2004 17:38:39 -0000 1.433
+++ configuredialog.cpp 1 May 2004 05:08:06 -0000
@@ -2968,6 +2968,18 @@ ComposerPageAttachmentsTab::ComposerPage
vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ // "Outlook compatible attachment naming" check box
+ mOutlookCompatibleCheck =
+ new QCheckBox( i18n( "Outlook compatible attachment naming" ), this );
+ mOutlookCompatibleCheck->setChecked( false );
+ QToolTip::add( mOutlookCompatibleCheck, i18n(
+ "Improve compatibility with Outlook and other mail clients that do not "
+ "understand attachment names containing accented characters." ) );
+ connect( mOutlookCompatibleCheck, SIGNAL( stateChanged( int ) ),
+ this, SLOT( slotEmitChanged( void ) ) );
+ vlay->addWidget( mOutlookCompatibleCheck );
+ vlay->addSpacing( 5 );
+
// "Enable detection of missing attachments" check box
mMissingAttachmentDetectionCheck =
new QCheckBox( i18n("E&nable detection of missing attachments"), this );
@@ -3002,6 +3014,8 @@ ComposerPageAttachmentsTab::ComposerPage
void ComposerPage::AttachmentsTab::load() {
KConfigGroup composer( KMKernel::config(), "Composer" );
+ mOutlookCompatibleCheck->setChecked(
+ composer.readBoolEntry( "outlook-compatible-attachments", false ) );
mMissingAttachmentDetectionCheck->setChecked(
composer.readBoolEntry( "showForgottenAttachmentWarning", true ) );
QStringList attachWordsList =
@@ -3021,6 +3035,8 @@ void ComposerPage::AttachmentsTab::load(
void ComposerPage::AttachmentsTab::save() {
KConfigGroup composer( KMKernel::config(), "Composer" );
+ composer.writeEntry( "outlook-compatible-attachments",
+ mOutlookCompatibleCheck->isChecked() );
composer.writeEntry( "showForgottenAttachmentWarning",
mMissingAttachmentDetectionCheck->isChecked() );
composer.writeEntry( "attachment-keywords",
Index: configuredialog_p.h
===================================================================
RCS file: /home/kde/kdepim/kmail/configuredialog_p.h,v
retrieving revision 1.80
diff -d -u -p -r1.80 configuredialog_p.h
--- configuredialog_p.h 6 Apr 2004 16:14:13 -0000 1.80
+++ configuredialog_p.h 1 May 2004 05:08:06 -0000
@@ -625,6 +625,7 @@ public:
void defaults() {};
protected:
+ QCheckBox *mOutlookCompatibleCheck;
QCheckBox *mMissingAttachmentDetectionCheck;
SimpleStringListEditor *mAttachWordsListEditor;
};
Index: kmcomposewin.cpp
===================================================================
RCS file: /home/kde/kdepim/kmail/kmcomposewin.cpp,v
retrieving revision 1.814
diff -d -u -p -r1.814 kmcomposewin.cpp
--- kmcomposewin.cpp 24 Apr 2004 19:27:20 -0000 1.814
+++ kmcomposewin.cpp 1 May 2004 05:08:08 -0000
@@ -451,6 +451,7 @@ void KMComposeWin::readConfig(void)
mLineBreak = 78;
if (mLineBreak < 30)
mLineBreak = 30;
+ mOutlookCompatible = config->readBoolEntry( "outlook-compatible-attachments", false );
mAutoPgpSign = config->readBoolEntry("pgp-auto-sign", false);
mAutoPgpEncrypt = config->readBoolEntry("pgp-auto-encrypt", false);
mNeverSignWhenSavingInDrafts = config->readBoolEntry("never-sign-drafts", true);
@@ -2038,8 +2039,15 @@ void KMComposeWin::slotAttachFileResult(
QCString encoding = KMMsgBase::autoDetectCharset(mCharset,
KMMessage::preferredCharsets(), name);
if (encoding.isEmpty()) encoding = "utf-8";
- QCString encName = KMMsgBase::encodeRFC2231String(name, encoding);
- bool RFC2231encoded = name != QString(encName);
+
+ QCString encName;
+ if ( mOutlookCompatible )
+ encName = KMMsgBase::encodeRFC2047String( name, encoding );
+ else
+ encName = KMMsgBase::encodeRFC2231String( name, encoding );
+ bool RFC2231encoded = false;
+ if ( !mOutlookCompatible )
+ RFC2231encoded = name != QString( encName );
// create message part
msgPart = new KMMessagePart;
Index: kmcomposewin.h
===================================================================
RCS file: /home/kde/kdepim/kmail/kmcomposewin.h,v
retrieving revision 1.242
diff -d -u -p -r1.242 kmcomposewin.h
--- kmcomposewin.h 24 Apr 2004 19:27:20 -0000 1.242
+++ kmcomposewin.h 1 May 2004 05:08:08 -0000
@@ -786,6 +786,7 @@ protected:
bool mAutoCharset;
bool mAlwaysSend;
+ bool mOutlookCompatible;
QStringList mFolderNames;
QValueList<QGuardedPtr<KMFolder> > mFolderList;
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic