Made the (private) 'JAHA' message a constant, and moved it to ViewAux.h. Maybe it doesn't fit much in there, but I didn't want to create a new header just for it. Feel free to move it to a better place.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10521 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2004-12-23 14:03:28 +00:00
parent 3a15790e0f
commit fd99e7194c
2 changed files with 12 additions and 11 deletions
+8 -8
View File
@@ -2,15 +2,14 @@
#define _VIEWAUX_H_ #define _VIEWAUX_H_
#include <BeBuild.h> #include <BeBuild.h>
#include <InterfaceDefs.h>
#include <Rect.h>
#include <Point.h>
#include <Region.h>
#include <Font.h> #include <Font.h>
/* #include <InterfaceDefs.h>
URGENT: Move this structure in a private header. #include <Point.h>
This one is copied from Shape.cpp. #include <Rect.h>
*/ #include <Region.h>
const static uint32 kDeleteDragger = 'JAHA';
struct shape_data { struct shape_data {
uint32 *opList; uint32 *opList;
int32 opCount; int32 opCount;
@@ -43,6 +42,7 @@ enum {
}; };
// JB: Is there any reason why this can't be a struct ?
//struct _view_attr_{ //struct _view_attr_{
class ViewAttr class ViewAttr
{ {
+3 -2
View File
@@ -36,6 +36,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <ViewAux.h>
bool BDragger::sVisible; bool BDragger::sVisible;
bool BDragger::sInited; bool BDragger::sInited;
@@ -277,7 +278,7 @@ BDragger::MessageReceived(BMessage *msg)
{ {
if (msg->what == B_TRASH_TARGET) { if (msg->what == B_TRASH_TARGET) {
if (fShelf) if (fShelf)
Window()->PostMessage('JAHA', fTarget, NULL); // TODO: 'JAHA' ? What's that ? Window()->PostMessage(kDeleteDragger, fTarget, NULL);
else else
(new BAlert("??", (new BAlert("??",
"Can't delete this replicant from its original application. Life goes on.", "Can't delete this replicant from its original application. Life goes on.",
@@ -562,7 +563,7 @@ BDragger::BuildDefaultPopUp()
fPopUp->AddItem(new BSeparatorItem()); fPopUp->AddItem(new BSeparatorItem());
// Delete // Delete
fPopUp->AddItem(new BMenuItem("Delete", new BMessage('JAHA'))); fPopUp->AddItem(new BMenuItem("Delete", new BMessage(kDeleteDragger)));
} }