Translation updated at Polygot for Dutch
2 Likes
I needed functionality to display MIME content from the clipboard, didn’t find it so i patched it in. Would be cool to get a copy to clipboard function at some point, I hope this patch is usefull.
diff --git a/src/datawindow.cpp b/src/datawindow.cpp
index 06ead9e..b786b6e 100644
--- a/src/datawindow.cpp
+++ b/src/datawindow.cpp
@@ -118,6 +118,18 @@ DataWindow::display_data()
switch (fFieldType)
{
+ case B_MIME_TYPE:
+ if (fFieldName.StartsWith("text/"))
+ {
+ const void* dataValue;
+ ssize_t bytes;
+ fDataMessage->FindData(fFieldName, B_MIME_TYPE, i, &dataValue, &bytes);
+ message_item_data = (char*)dataValue;
+ } else {
+ message_item_data=B_TRANSLATE("data cannot be displayed");
+ }
+ break;
+
case B_STRING_TYPE:
message_item_data=BString(fDataMessage->GetString(fFieldName, i, ""));
break;
3 Likes