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:
@@ -2,15 +2,14 @@
|
||||
#define _VIEWAUX_H_
|
||||
|
||||
#include <BeBuild.h>
|
||||
#include <InterfaceDefs.h>
|
||||
#include <Rect.h>
|
||||
#include <Point.h>
|
||||
#include <Region.h>
|
||||
#include <Font.h>
|
||||
/*
|
||||
URGENT: Move this structure in a private header.
|
||||
This one is copied from Shape.cpp.
|
||||
*/
|
||||
#include <InterfaceDefs.h>
|
||||
#include <Point.h>
|
||||
#include <Rect.h>
|
||||
#include <Region.h>
|
||||
|
||||
const static uint32 kDeleteDragger = 'JAHA';
|
||||
|
||||
struct shape_data {
|
||||
uint32 *opList;
|
||||
int32 opCount;
|
||||
@@ -43,6 +42,7 @@ enum {
|
||||
};
|
||||
|
||||
|
||||
// JB: Is there any reason why this can't be a struct ?
|
||||
//struct _view_attr_{
|
||||
class ViewAttr
|
||||
{
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <ViewAux.h>
|
||||
|
||||
bool BDragger::sVisible;
|
||||
bool BDragger::sInited;
|
||||
@@ -277,7 +278,7 @@ BDragger::MessageReceived(BMessage *msg)
|
||||
{
|
||||
if (msg->what == B_TRASH_TARGET) {
|
||||
if (fShelf)
|
||||
Window()->PostMessage('JAHA', fTarget, NULL); // TODO: 'JAHA' ? What's that ?
|
||||
Window()->PostMessage(kDeleteDragger, fTarget, NULL);
|
||||
else
|
||||
(new BAlert("??",
|
||||
"Can't delete this replicant from its original application. Life goes on.",
|
||||
@@ -555,14 +556,14 @@ BDragger::BuildDefaultPopUp()
|
||||
|
||||
char about[B_OS_NAME_LENGTH];
|
||||
snprintf(about, B_OS_NAME_LENGTH, "About %s", name);
|
||||
|
||||
|
||||
fPopUp->AddItem(new BMenuItem(about, msg));
|
||||
|
||||
// Separator
|
||||
fPopUp->AddItem(new BSeparatorItem());
|
||||
|
||||
// Delete
|
||||
fPopUp->AddItem(new BMenuItem("Delete", new BMessage('JAHA')));
|
||||
fPopUp->AddItem(new BMenuItem("Delete", new BMessage(kDeleteDragger)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user