Refactored the MarkAs building as per Jerome Duval's suggestion.

Also changed the include for TrackerAddon.h to TrackerAddOn.h (note the
capital O.) Haiku does not have the lower-case o version.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19505 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ryan Leavengood
2006-12-14 00:08:52 +00:00
parent 48a8aa4985
commit 0a7b5658d2
4 changed files with 8 additions and 16 deletions
-12
View File
@@ -5,18 +5,6 @@ SetSubDirSupportedPlatformsBeOSCompatible ;
AddResources MarkAsNew-N : MarkAsNew.rdef ;
AddResources MarkAsRead-R : MarkAsRead.rdef ;
SearchAndReplace MarkAsNew.cpp :
MarkAs.cpp
: !!!STATUS_HERE!!!
: New
;
SearchAndReplace MarkAsRead.cpp :
MarkAs.cpp
: !!!STATUS_HERE!!!
: Read
;
Addon MarkAsNew-N : Tracker :
MarkAsNew.cpp
+4 -4
View File
@@ -8,7 +8,7 @@
#include <Message.h>
#include <Node.h>
#include <String.h>
#include <TrackerAddon.h>
#include <TrackerAddOn.h>
extern "C" void
@@ -16,10 +16,10 @@ process_refs(entry_ref dir, BMessage* msg, void* /*reserved*/)
{
int32 refs;
entry_ref ref;
BString status("!!!STATUS_HERE!!!");
BString status(STATUS_HERE);
// 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.
// "Read") by a #define and #include in another file. This is done
// to avoid duplicate code.
BString type;
for (refs = 0; msg->FindRef("refs", refs, &ref) == B_NO_ERROR; refs++) {
@@ -0,0 +1,2 @@
#define STATUS_HERE "New"
#include "MarkAs.cpp"
@@ -0,0 +1,2 @@
#define STATUS_HERE "Read"
#include "MarkAs.cpp"