[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: [nPATCH #6402] Add x-uuencode decode support to KMail.
From:       Marc Mutz <mutz () kde ! org>
Date:       2002-09-29 15:49:47
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


On Sunday 29 September 2002 16:36, Marc Mutz wrote:
> On Sunday 29 September 2002 11:56, Michael Häckel wrote:
<snip>
> > The attachment properties dialog claims,
> > it is base64.
> <snip>
>
> Tricky. We don't want to generate x-uuencode. I'll have a look.
<snip>

OK. Attached patch (to be applied on top of the other one - they're in 
different files) fixes it like this:
Only ever show UUEncode when we are RO, else fall back to b64.
This works also for "send again", meaning that you can leave the 
x-uuencode cte, but if you go to "properties...", it will be set to 
base64. You can cancel the dialog, so that x-uuencode will stay or hit 
OK to convert to b64.

Marc

-- 
[Norton SystemWorks 2002] Wipe Info uses hexadecimal values to wipe
files. This provides more security than wiping with decimal values.
                           -- Norton SystemWorks 2002 Manual, p.160
                              (seen on Cryptogram 12/01)

["kmail-uuencode-support-for-dlg.diff" (text/x-diff)]

Index: kmmsgpartdlg.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmmsgpartdlg.cpp,v
retrieving revision 1.48
diff -u -3 -p -r1.48 kmmsgpartdlg.cpp
--- kmmsgpartdlg.cpp	2002/09/19 20:53:37	1.48
+++ kmmsgpartdlg.cpp	2002/09/29 15:18:53
@@ -49,6 +49,7 @@ static const struct {
   { KMMsgPartDialog::EightBit, I18N_NOOP("None (8-bit text)") },
   { KMMsgPartDialog::QuotedPrintable, I18N_NOOP("Quoted Printable") },
   { KMMsgPartDialog::Base64, I18N_NOOP("Base 64") },
+  { KMMsgPartDialog::UUEncode, I18N_NOOP("UUEncode") }
 };
 static const int numEncodingTypes =
   sizeof encodingTypes / sizeof *encodingTypes;
@@ -370,10 +371,9 @@ void KMMsgPartDialog::slotMimeTypeChange
 KMMsgPartDialogCompat::KMMsgPartDialogCompat( const char *, bool readOnly)
   : KMMsgPartDialog(), mMsgPart( 0 )
 {
-  setShownEncodings( SevenBit|EightBit|QuotedPrintable|Base64 );
   mReadOnly = readOnly;
-  if (readOnly)
-  {
+  if (readOnly) {
+    setShownEncodings( SevenBit|EightBit|QuotedPrintable|Base64|UUEncode );
     mMimeType->setEnabled(false);
     mFileName->setEnabled(false);
     mDescription->setEnabled(false);
@@ -381,6 +381,8 @@ KMMsgPartDialogCompat::KMMsgPartDialogCo
     mInline->setEnabled(false);
     mEncrypted->setEnabled(false);
     mSigned->setEnabled(false);
+  } else {
+    setShownEncodings( SevenBit|EightBit|QuotedPrintable|Base64 );
   }
 }
 
@@ -398,6 +400,8 @@ void KMMsgPartDialogCompat::setMsgPart( 
     setEncoding( EightBit );
   else if ( enc == "quoted-printable" )
     setEncoding( QuotedPrintable );
+  else if ( mReadOnly && enc == "x-uuencode" ) // fall back to b64 if not ro...
+    setEncoding( UUEncode );
   else
     setEncoding( Base64 );
 
Index: kmmsgpartdlg.h
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmmsgpartdlg.h,v
retrieving revision 1.8
diff -u -3 -p -r1.8 kmmsgpartdlg.h
--- kmmsgpartdlg.h	2002/05/25 12:46:42	1.8
+++ kmmsgpartdlg.h	2002/09/29 15:18:53
@@ -71,7 +71,8 @@ public:
     SevenBit = 0x01,
     EightBit = 0x02,
     QuotedPrintable = 0x04,
-    Base64   = 0x08
+    Base64   = 0x08,
+    UUEncode = 0x10
   };
 
   /** Returns the current encoding */

[Attachment #6 (application/pgp-signature)]
_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic