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 :
|
DoCatalogs IMAP :
|
||||||
x-vnd.Haiku-IMAP
|
x-vnd.Haiku-IMAP
|
||||||
:
|
:
|
||||||
imap_config.cpp
|
ConfigView.cpp
|
||||||
IMAPFolderConfig.cpp
|
FolderConfigWindow.cpp
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public:
|
|||||||
const BMailAddOnSettings& settings);
|
const BMailAddOnSettings& settings);
|
||||||
|
|
||||||
virtual void MessageReadyToSend(const entry_ref& ref,
|
virtual void MessageReadyToSend(const entry_ref& ref,
|
||||||
BFile* file);
|
BFile& file);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ FortuneFilter::FortuneFilter(BMailProtocol& protocol,
|
|||||||
|
|
||||||
|
|
||||||
void
|
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
|
// 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
|
// 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();
|
BTextMailComponent* body = mailMessage.Body();
|
||||||
body->AppendText(fortuneText);
|
body->AppendText(fortuneText);
|
||||||
|
|
||||||
file->SetSize(0);
|
file.SetSize(0);
|
||||||
mailMessage.RenderToRFC822(file);
|
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.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ process_refs(entry_ref dir, BMessage* message, void* /*reserved*/)
|
|||||||
int32 account;
|
int32 account;
|
||||||
if (node.ReadAttr(B_MAIL_ATTR_ACCOUNT_ID, B_INT32_TYPE,
|
if (node.ReadAttr(B_MAIL_ATTR_ACCOUNT_ID, B_INT32_TYPE,
|
||||||
0LL, &account, sizeof(account)) == sizeof(account))
|
0LL, &account, sizeof(account)) == sizeof(account))
|
||||||
BMailDaemon::MarkAsRead(account, ref, B_SEEN);
|
BMailDaemon().MarkAsRead(account, ref, B_SEEN);
|
||||||
else
|
else
|
||||||
write_read_attr(node, B_SEEN);
|
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.
|
* Copyright 2006, Ryan Leavengood, [email protected]. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
#include <Node.h>
|
#include <Node.h>
|
||||||
#include <String.h>
|
#include <String.h>
|
||||||
|
|
||||||
|
|
||||||
extern "C" void
|
extern "C" void
|
||||||
process_refs(entry_ref dir, BMessage* message, void* /*reserved*/)
|
process_refs(entry_ref dir, BMessage* message, void* /*reserved*/)
|
||||||
{
|
{
|
||||||
@@ -34,12 +35,12 @@ process_refs(entry_ref dir, BMessage* message, void* /*reserved*/)
|
|||||||
// Update the MAIL:read status to match
|
// Update the MAIL:read status to match
|
||||||
// Check both B_SEEN and B_READ
|
// Check both B_SEEN and B_READ
|
||||||
// (so we don't overwrite B_READ with B_SEEN)
|
// (so we don't overwrite B_READ with B_SEEN)
|
||||||
if (read_read_attr(node, previousRead) != B_OK ||
|
if (read_read_attr(node, previousRead) != B_OK
|
||||||
(previousRead != B_SEEN && previousRead != B_READ)) {
|
|| (previousRead != B_SEEN && previousRead != B_READ)) {
|
||||||
int32 account;
|
int32 account;
|
||||||
if (node.ReadAttr(B_MAIL_ATTR_ACCOUNT_ID, B_INT32_TYPE,
|
if (node.ReadAttr(B_MAIL_ATTR_ACCOUNT_ID, B_INT32_TYPE,
|
||||||
0LL, &account, sizeof(account)) == sizeof(account))
|
0LL, &account, sizeof(account)) == sizeof(account))
|
||||||
BMailDaemon::MarkAsRead(account, ref, read);
|
BMailDaemon().MarkAsRead(account, ref, read);
|
||||||
else
|
else
|
||||||
write_read_attr(node, read);
|
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
|
void
|
||||||
BEmailMessage::Attach(entry_ref* ref, bool includeAttributes)
|
BEmailMessage::Attach(entry_ref* ref, bool includeAttributes)
|
||||||
{
|
{
|
||||||
AddComponent(includeAttributes
|
if (includeAttributes)
|
||||||
? new BAttributedMailAttachment(ref) : new BSimpleMailAttachment(ref));
|
AddComponent(new BAttributedMailAttachment(ref));
|
||||||
|
else
|
||||||
|
AddComponent(new BSimpleMailAttachment(ref));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user