Viewer for archived BMessages

Translation updated at Polygot for Dutch :slight_smile:

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

Hi @BlueSky I saw you released a new version of kottan, but it seems this patch is not included. Could you add it to the application?

I put your diff in a PR for easy testing/merging by @BlueSky. Hope I got the “author” right…

1 Like

Thanks humdinger :slight_smile:

Thanks a lot @humdinger . I’ll be looking at and merging the 2 open PR’s over the next few days. I just wanted to get out the maintenance release as quick as possible to fix the bug with the missing translations ( I had forgotten to add the new language codes to the Makefile :rofl: )

Welcome to the club. :slight_smile:
Does anyone know if it’s possible to include everything in the “locales” folder (sans the files’ .catkeys extension) to avoid having to list all language codes?

1 Like

Can’t you use the asterix for it? (haven’t checked)

Nope. That would be too easy. :slight_smile:

I tried with LOCALES = $(ls locales | xargs -- basename -a -s .catkeys), but that doesn’t work either.

Maybe something like…

LOCALES = $(patsubst locales/%.catkeys,%,$(wildcard locales/*.catkeys))

5 Likes

Magic! :mage:
This works, thanks Lrrr!

Ah great, that’s a good solution @Lrrr.
In my view it should be built into the makefile engine.

Projects may have a minimum percentage of translation to include a language in the release. But maybe an ALL_LOCALES variable so that you can use your vetted list or just LOCALES = $(ALL_LOCALES) depending on project rules is not a bad idea.

2 Likes