Introducing Message4. The changes to the related sources are ifdefed with USING_MESSAGE4 which is defined in Message4.h. To use Message4 the Message4.cpp, Message4.h, MessageUtils4.cpp, MessageUtils4.h and MessagePrivate4.h have to be linked to their counterparts without 4 suffix. Then MessageBody.cpp and MessageField.cpp have to be commented out in the app kit Jamfile and r5_message.cpp has to be added. There remain some bugs to be found. Feel free to change that.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14882 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2005-11-13 11:31:07 +00:00
parent 4cfc480f5d
commit cf10934e5f
18 changed files with 3742 additions and 0 deletions
+18
View File
@@ -34,6 +34,10 @@
#include <TokenSpace.h>
#include <MessageUtils.h>
#ifdef USING_MESSAGE4
#include <MessagePrivate.h>
#endif
#include <ctype.h>
#include <stdio.h>
#include <math.h>
@@ -2249,15 +2253,29 @@ BWindow::task_looper()
dispatchNextMessage = false;
} else {
// Get the target handler
#ifdef USING_MESSAGE4
// Use the private BMessage accessor to determine if we are
// using the preferred handler, or if a target has been
// specified
BHandler *handler;
BMessage::Private messagePrivate(fLastMessage);
bool usePreferred = messagePrivate.UsePreferredTarget();
#else
// Use BMessage friend functions to determine if we are using the
// preferred handler, or if a target has been specified
BHandler* handler;
bool usePreferred = _use_preferred_target_(fLastMessage);
#endif
if (usePreferred) {
handler = PreferredHandler();
} else {
#ifndef USING_MESSAGE4
gDefaultTokens.GetToken(_get_message_target_(fLastMessage),
B_HANDLER_TOKEN, (void **)&handler);
#else
gDefaultTokens.GetToken(messagePrivate.GetTarget(),
B_HANDLER_TOKEN, (void **)&handler);
#endif
}
// if a target was given, and we should not use the preferred