Build fixes.
* Never built a complete image from the IMAP branch before.
This commit is contained in:
@@ -55,6 +55,6 @@ SEARCH on [ FGristFiles Commands.cpp Protocol.cpp Response.cpp ]
|
||||
DoCatalogs IMAP :
|
||||
x-vnd.Haiku-IMAP
|
||||
:
|
||||
imap_config.cpp
|
||||
IMAPFolderConfig.cpp
|
||||
ConfigView.cpp
|
||||
FolderConfigWindow.cpp
|
||||
;
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
const BMailAddOnSettings& settings);
|
||||
|
||||
virtual void MessageReadyToSend(const entry_ref& ref,
|
||||
BFile* file);
|
||||
BFile& file);
|
||||
};
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ FortuneFilter::FortuneFilter(BMailProtocol& protocol,
|
||||
|
||||
|
||||
void
|
||||
FortuneFilter::MessageReadyToSend(const entry_ref& ref, BFile* file)
|
||||
FortuneFilter::MessageReadyToSend(const entry_ref& ref, BFile& file)
|
||||
{
|
||||
// What we want to do here is to change the message body. To do that we use the
|
||||
// framework we already have by creating a new BEmailMessage based on the
|
||||
@@ -87,8 +87,8 @@ FortuneFilter::MessageReadyToSend(const entry_ref& ref, BFile* file)
|
||||
BTextMailComponent* body = mailMessage.Body();
|
||||
body->AppendText(fortuneText);
|
||||
|
||||
file->SetSize(0);
|
||||
mailMessage.RenderToRFC822(file);
|
||||
file.SetSize(0);
|
||||
mailMessage.RenderToRFC822(&file);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2009, Axel Dörfler, [email protected].
|
||||
* Copyright 2009-2013, Axel Dörfler, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
@@ -99,7 +99,7 @@ process_refs(entry_ref dir, BMessage* message, void* /*reserved*/)
|
||||
&& (type == B_MAIL_TYPE || type == B_PARTIAL_MAIL_TYPE)) {
|
||||
BString previousStatus;
|
||||
read_flags previousRead;
|
||||
|
||||
|
||||
// Update the MAIL:read flag
|
||||
if (status == "New") {
|
||||
if (read_read_attr(node, previousRead) != B_OK ||
|
||||
@@ -115,8 +115,8 @@ process_refs(entry_ref dir, BMessage* message, void* /*reserved*/)
|
||||
(previousRead != B_SEEN && previousRead != B_READ)) {
|
||||
int32 account;
|
||||
if (node.ReadAttr(B_MAIL_ATTR_ACCOUNT_ID, B_INT32_TYPE,
|
||||
0LL, &account, sizeof(account)) == sizeof(account))
|
||||
BMailDaemon::MarkAsRead(account, ref, B_SEEN);
|
||||
0LL, &account, sizeof(account)) == sizeof(account))
|
||||
BMailDaemon().MarkAsRead(account, ref, B_SEEN);
|
||||
else
|
||||
write_read_attr(node, B_SEEN);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2009, Axel Dörfler, [email protected].
|
||||
* Copyright 2009-2013, Axel Dörfler, [email protected].
|
||||
* Copyright 2006, Ryan Leavengood, [email protected]. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <Node.h>
|
||||
#include <String.h>
|
||||
|
||||
|
||||
extern "C" void
|
||||
process_refs(entry_ref dir, BMessage* message, void* /*reserved*/)
|
||||
{
|
||||
@@ -30,16 +31,16 @@ process_refs(entry_ref dir, BMessage* message, void* /*reserved*/)
|
||||
// if we're marking it via the add-on, we haven't really read it
|
||||
// so use B_SEEN instead of B_READ
|
||||
read_flags read = B_SEEN;
|
||||
|
||||
|
||||
// Update the MAIL:read status to match
|
||||
// Check both B_SEEN and B_READ
|
||||
// (so we don't overwrite B_READ with B_SEEN)
|
||||
if (read_read_attr(node, previousRead) != B_OK ||
|
||||
(previousRead != B_SEEN && previousRead != B_READ)) {
|
||||
if (read_read_attr(node, previousRead) != B_OK
|
||||
|| (previousRead != B_SEEN && previousRead != B_READ)) {
|
||||
int32 account;
|
||||
if (node.ReadAttr(B_MAIL_ATTR_ACCOUNT_ID, B_INT32_TYPE,
|
||||
0LL, &account, sizeof(account)) == sizeof(account))
|
||||
BMailDaemon::MarkAsRead(account, ref, read);
|
||||
0LL, &account, sizeof(account)) == sizeof(account))
|
||||
BMailDaemon().MarkAsRead(account, ref, read);
|
||||
else
|
||||
write_read_attr(node, read);
|
||||
}
|
||||
@@ -55,4 +56,3 @@ process_refs(entry_ref dir, BMessage* message, void* /*reserved*/)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -547,8 +547,10 @@ BEmailMessage::CountComponents() const
|
||||
void
|
||||
BEmailMessage::Attach(entry_ref* ref, bool includeAttributes)
|
||||
{
|
||||
AddComponent(includeAttributes
|
||||
? new BAttributedMailAttachment(ref) : new BSimpleMailAttachment(ref));
|
||||
if (includeAttributes)
|
||||
AddComponent(new BAttributedMailAttachment(ref));
|
||||
else
|
||||
AddComponent(new BSimpleMailAttachment(ref));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user