Fixed popup menu, and some other stuff
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16261 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -139,7 +139,6 @@ BDragger::AttachedToWindow()
|
|||||||
if (fIsZombie) {
|
if (fIsZombie) {
|
||||||
SetLowColor(kZombieColor);
|
SetLowColor(kZombieColor);
|
||||||
SetViewColor(kZombieColor);
|
SetViewColor(kZombieColor);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
SetLowColor(B_TRANSPARENT_COLOR);
|
SetLowColor(B_TRANSPARENT_COLOR);
|
||||||
SetViewColor(B_TRANSPARENT_COLOR);
|
SetViewColor(B_TRANSPARENT_COLOR);
|
||||||
@@ -188,9 +187,8 @@ BDragger::MouseDown(BPoint where)
|
|||||||
if (!fTarget || !AreDraggersDrawn())
|
if (!fTarget || !AreDraggersDrawn())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int32 buttons;
|
uint32 buttons;
|
||||||
|
Window()->CurrentMessage()->FindInt32("buttons", (int32 *)&buttons);
|
||||||
Window()->CurrentMessage()->FindInt32("buttons", &buttons);
|
|
||||||
|
|
||||||
if (buttons & B_SECONDARY_MOUSE_BUTTON) {
|
if (buttons & B_SECONDARY_MOUSE_BUTTON) {
|
||||||
if (!fShelf || !fTarget) {
|
if (!fShelf || !fTarget) {
|
||||||
@@ -201,21 +199,18 @@ BDragger::MouseDown(BPoint where)
|
|||||||
ShowPopUp(fTarget, where);
|
ShowPopUp(fTarget, where);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// TODO code to determine drag or menu
|
bigtime_t time = system_time();
|
||||||
/*bigtime_t time = system_time();
|
bigtime_t clickSpeed = 0;
|
||||||
bigtime_t click_speed = 0;
|
|
||||||
|
|
||||||
get_click_speed(&click_speed);*/
|
get_click_speed(&clickSpeed);
|
||||||
|
|
||||||
bool drag = false;
|
bool drag = false;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
BPoint mousePoint;
|
BPoint mousePoint;
|
||||||
uint32 buttons;
|
|
||||||
|
|
||||||
GetMouse(&mousePoint, &buttons);
|
GetMouse(&mousePoint, &buttons);
|
||||||
|
|
||||||
if (!buttons)
|
if (!buttons || system_time() > time + clickSpeed)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (mousePoint != where) {
|
if (mousePoint != where) {
|
||||||
@@ -340,9 +335,9 @@ BDragger::AreDraggersDrawn()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BHandler *BDragger::ResolveSpecifier(BMessage *msg, int32 index,
|
BHandler *
|
||||||
BMessage *specifier, int32 form,
|
BDragger::ResolveSpecifier(BMessage *msg, int32 index, BMessage *specifier,
|
||||||
const char *property)
|
int32 form, const char *property)
|
||||||
{
|
{
|
||||||
return BView::ResolveSpecifier(msg, index, specifier, form, property);
|
return BView::ResolveSpecifier(msg, index, specifier, form, property);
|
||||||
}
|
}
|
||||||
@@ -536,8 +531,10 @@ BDragger::SetZombied(bool state)
|
|||||||
{
|
{
|
||||||
fIsZombie = state;
|
fIsZombie = state;
|
||||||
|
|
||||||
SetLowColor(kZombieColor);
|
if (state) {
|
||||||
SetViewColor(kZombieColor);
|
SetLowColor(kZombieColor);
|
||||||
|
SetViewColor(kZombieColor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user