Changed the spaces to tabs (cut and paste problem) and added a comment as
suggested by Axel for the "magic variable" that is replaced by the Jamfile. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19485 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -14,17 +14,20 @@
|
|||||||
extern "C" void
|
extern "C" void
|
||||||
process_refs(entry_ref dir, BMessage* msg, void* /*reserved*/)
|
process_refs(entry_ref dir, BMessage* msg, void* /*reserved*/)
|
||||||
{
|
{
|
||||||
int32 refs;
|
int32 refs;
|
||||||
entry_ref ref;
|
entry_ref ref;
|
||||||
BString status("!!!STATUS_HERE!!!");
|
BString status("!!!STATUS_HERE!!!");
|
||||||
BString type;
|
// The above will be substituted with a real value (such as "New" or
|
||||||
|
// "Read") by some magic in the Jamfile. This is done to avoid duplicate
|
||||||
|
// code.
|
||||||
|
BString type;
|
||||||
|
|
||||||
for (refs = 0; msg->FindRef("refs", refs, &ref) == B_NO_ERROR; refs++) {
|
for (refs = 0; msg->FindRef("refs", refs, &ref) == B_NO_ERROR; refs++) {
|
||||||
BNode node(&ref);
|
BNode node(&ref);
|
||||||
if ((node.InitCheck() == B_NO_ERROR)
|
if ((node.InitCheck() == B_NO_ERROR)
|
||||||
&& (node.ReadAttrString("BEOS:TYPE", &type) == B_NO_ERROR)
|
&& (node.ReadAttrString("BEOS:TYPE", &type) == B_NO_ERROR)
|
||||||
&& (type == "text/x-email"))
|
&& (type == "text/x-email"))
|
||||||
node.WriteAttrString("MAIL:status", &status);
|
node.WriteAttrString("MAIL:status", &status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user