[balsa/gtk3] Simplify code



commit 65162eea495769d35b6d8eae4ff017cf1c75c202
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Fri Aug 10 12:47:30 2012 -0400

    Simplify code
    
    	* libbalsa/body.c (libbalsa_message_body_get_part_stream):
    	simplify filter selection switch.

 ChangeLog       |    5 +++++
 libbalsa/body.c |   14 +-------------
 2 files changed, 6 insertions(+), 13 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 48ae31a..65fafe2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-08-10  Peter Bloomfield
+
+	* libbalsa/body.c (libbalsa_message_body_get_part_stream):
+	simplify filter selection switch.
+
 2012-08-09  Peter Bloomfield
 
 	* src/balsa-mime-widget-message.c (bm_header_widget_realized):
diff --git a/libbalsa/body.c b/libbalsa/body.c
index 7aaf750..95afc7b 100644
--- a/libbalsa/body.c
+++ b/libbalsa/body.c
@@ -458,21 +458,9 @@ libbalsa_message_body_get_part_stream(LibBalsaMessageBody * body,
 
     switch (encoding) {
     case GMIME_CONTENT_ENCODING_BASE64:
-        filter =
-            g_mime_filter_basic_new(GMIME_CONTENT_ENCODING_BASE64,
-                                    FALSE);
-        stream = libbalsa_message_body_stream_add_filter(stream, filter);
-        break;
     case GMIME_CONTENT_ENCODING_QUOTEDPRINTABLE:
-        filter =
-            g_mime_filter_basic_new(GMIME_CONTENT_ENCODING_QUOTEDPRINTABLE,
-                                    FALSE);
-        stream = libbalsa_message_body_stream_add_filter(stream, filter);
-        break;
     case GMIME_CONTENT_ENCODING_UUENCODE:
-        filter =
-            g_mime_filter_basic_new(GMIME_CONTENT_ENCODING_UUENCODE,
-                                    FALSE);
+        filter = g_mime_filter_basic_new(encoding, FALSE);
         stream = libbalsa_message_body_stream_add_filter(stream, filter);
         break;
     default:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]