Appledouble viewer improvements
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 15 Dec 2009 07:32:31 +0000 (00:32 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 15 Dec 2009 08:15:20 +0000 (01:15 -0700)
imp/config/mime_drivers.php.dist
imp/lib/Mime/Viewer/Appledouble.php
imp/themes/graphics/apple.png [deleted file]
imp/themes/graphics/mime/apple.png [new file with mode: 0644]
imp/themes/silver/graphics/mime/apple.png [new file with mode: 0644]
imp/themes/tango-blue/graphics/mime/apple.png [new file with mode: 0644]

index e6b0513..64a225f 100644 (file)
@@ -220,6 +220,9 @@ $mime_drivers['imp']['appledouble'] = array(
     'inline' => true,
     'handles' => array(
         'multipart/appledouble'
+    ),
+    'icons' => array(
+        'default' => 'apple.png'
     )
 );
 
index c81676f..18e60f6 100644 (file)
@@ -78,7 +78,7 @@ class IMP_Horde_Mime_Viewer_Appledouble extends Horde_Mime_Viewer_Driver
         }
 
         $status = array(
-            'icon' => Horde::img('apple.png', _("Macintosh File")),
+            'icon' => Horde::img('mime/apple.png', _("Macintosh File")),
             'text' => array(
                 sprintf(_("This message contains a Macintosh file (named \"%s\")."), $data_name),
                 sprintf(_("The Macintosh resource fork can be downloaded %s."), $this->_params['contents']->linkViewJS($applefile_part, 'download_attach', _("HERE"), array('jstext' => _("The Macintosh resource fork"))))
@@ -89,9 +89,6 @@ class IMP_Horde_Mime_Viewer_Appledouble extends Horde_Mime_Viewer_Driver
         $ret = array();
         if ($inline && (($disp = $this->_params['contents']->canDisplay($data_part, IMP_Contents::RENDER_INLINE | IMP_Contents::RENDER_INFO)))) {
             $ret = $this->_params['contents']->renderMIMEPart($data_id, $disp, array('params' => $this->_params));
-            $status['text'][] = _("The contents of the Macintosh file are below.");
-        } else {
-            $status['text'][] = sprintf(_("The contents of the Macintosh file can be downloaded %s."), $this->_params['contents']->linkViewJS($data_part, 'download_attach', _("HERE"), array('jstext' => _("The Macintosh file"))));
         }
 
         foreach ($parts_list as $val) {
@@ -100,7 +97,8 @@ class IMP_Horde_Mime_Viewer_Appledouble extends Horde_Mime_Viewer_Driver
                     ? array(
                           'data' => '',
                           'status' => array($status),
-                          'type' => 'text/html; charset=' . Horde_Nls::getCharset()
+                          'type' => 'text/html; charset=' . Horde_Nls::getCharset(),
+                          'wrap' => 'mimePartWrap'
                       )
                     : null;
             }
diff --git a/imp/themes/graphics/apple.png b/imp/themes/graphics/apple.png
deleted file mode 100644 (file)
index 6fe4f12..0000000
Binary files a/imp/themes/graphics/apple.png and /dev/null differ
diff --git a/imp/themes/graphics/mime/apple.png b/imp/themes/graphics/mime/apple.png
new file mode 100644 (file)
index 0000000..6fe4f12
Binary files /dev/null and b/imp/themes/graphics/mime/apple.png differ
diff --git a/imp/themes/silver/graphics/mime/apple.png b/imp/themes/silver/graphics/mime/apple.png
new file mode 100644 (file)
index 0000000..6fe4f12
Binary files /dev/null and b/imp/themes/silver/graphics/mime/apple.png differ
diff --git a/imp/themes/tango-blue/graphics/mime/apple.png b/imp/themes/tango-blue/graphics/mime/apple.png
new file mode 100644 (file)
index 0000000..6fe4f12
Binary files /dev/null and b/imp/themes/tango-blue/graphics/mime/apple.png differ