* DeskWindow wasn't checking if the context menu for the trash was already open and showing. We do it like in ContainerWindow now. Fixes #353
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28089 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -54,6 +54,7 @@ All rights reserved.
|
||||
#include "IconMenuItem.h"
|
||||
#include "MountMenu.h"
|
||||
#include "PoseView.h"
|
||||
#include "SlowContextPopup.h"
|
||||
#include "Tracker.h"
|
||||
#include "TemplatesMenu.h"
|
||||
|
||||
@@ -328,7 +329,7 @@ void
|
||||
BDeskWindow::AddTrashContextMenu()
|
||||
{
|
||||
// setup special trash context menu
|
||||
fTrashContextMenu = new BPopUpMenu("TrashContext", false, false);
|
||||
fTrashContextMenu = new BSlowContextMenu("TrashContext");
|
||||
fTrashContextMenu->SetFont(be_plain_font);
|
||||
fTrashContextMenu->AddItem(new BMenuItem("Empty Trash",
|
||||
new BMessage(kEmptyTrash)));
|
||||
@@ -349,9 +350,8 @@ BDeskWindow::ShowContextMenu(BPoint loc, const entry_ref *ref, BView *view)
|
||||
DeleteSubmenu(fNavigationItem);
|
||||
|
||||
if (ref && entry.SetTo(ref) == B_OK && FSIsTrashDir(&entry)) {
|
||||
//
|
||||
// don't show any menu if this is the trash
|
||||
if (Dragging() && FSIsTrashDir(&entry))
|
||||
|
||||
if (fTrashContextMenu->IsShowing() || Dragging())
|
||||
return;
|
||||
|
||||
// selected item was trash, show the trash context menu instead
|
||||
|
||||
@@ -41,7 +41,7 @@ All rights reserved.
|
||||
#include "ContainerWindow.h"
|
||||
#include "DesktopPoseView.h"
|
||||
|
||||
class BPopUpMenu;
|
||||
class BSlowContextMenu;
|
||||
|
||||
namespace BPrivate {
|
||||
|
||||
@@ -82,7 +82,7 @@ protected:
|
||||
private:
|
||||
BShelf *fDeskShelf;
|
||||
// shelf for replicant support
|
||||
BPopUpMenu *fTrashContextMenu;
|
||||
BSlowContextMenu *fTrashContextMenu;
|
||||
|
||||
BRect fOldFrame;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user