Tracker: some style fixes to BContainerWindow()
This commit is contained in:
@@ -511,10 +511,11 @@ DraggableContainerIcon::Draw(BRect updateRect)
|
|||||||
|
|
||||||
|
|
||||||
BContainerWindow::BContainerWindow(LockingList<BWindow>* list,
|
BContainerWindow::BContainerWindow(LockingList<BWindow>* list,
|
||||||
uint32 containerWindowFlags,
|
uint32 containerWindowFlags, window_look look, window_feel feel,
|
||||||
window_look look, window_feel feel, uint32 flags, uint32 workspace)
|
uint32 flags, uint32 workspace)
|
||||||
: BWindow(InitialWindowRect(feel), "TrackerWindow", look, feel, flags,
|
:
|
||||||
workspace),
|
BWindow(InitialWindowRect(feel), "TrackerWindow", look, feel, flags,
|
||||||
|
workspace),
|
||||||
fFileContextMenu(NULL),
|
fFileContextMenu(NULL),
|
||||||
fWindowContextMenu(NULL),
|
fWindowContextMenu(NULL),
|
||||||
fDropContextMenu(NULL),
|
fDropContextMenu(NULL),
|
||||||
@@ -1668,30 +1669,30 @@ BContainerWindow::MessageReceived(BMessage* message)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case kDontMoveFilesToTrashChanged:
|
case kDontMoveFilesToTrashChanged:
|
||||||
{
|
{
|
||||||
bool dontMoveToTrash
|
bool dontMoveToTrash
|
||||||
= settings.DontMoveFilesToTrash();
|
= settings.DontMoveFilesToTrash();
|
||||||
|
|
||||||
BMenuItem* item
|
BMenuItem* item
|
||||||
= fFileContextMenu->FindItem(kMoveToTrash);
|
= fFileContextMenu->FindItem(kMoveToTrash);
|
||||||
if (item != NULL) {
|
if (item != NULL) {
|
||||||
|
item->SetLabel(dontMoveToTrash
|
||||||
|
? B_TRANSLATE("Delete")
|
||||||
|
: B_TRANSLATE("Move to Trash"));
|
||||||
|
}
|
||||||
|
// Deskbar doesn't have a menu bar, so check if
|
||||||
|
// there is fMenuBar
|
||||||
|
if (fMenuBar && fFileMenu) {
|
||||||
|
item = fFileMenu->FindItem(kMoveToTrash);
|
||||||
|
if (item) {
|
||||||
item->SetLabel(dontMoveToTrash
|
item->SetLabel(dontMoveToTrash
|
||||||
? B_TRANSLATE("Delete")
|
? B_TRANSLATE("Delete")
|
||||||
: B_TRANSLATE("Move to Trash"));
|
: B_TRANSLATE("Move to Trash"));
|
||||||
}
|
}
|
||||||
// Deskbar doesn't have a menu bar, so check if
|
|
||||||
// there is fMenuBar
|
|
||||||
if (fMenuBar && fFileMenu) {
|
|
||||||
item = fFileMenu->FindItem(kMoveToTrash);
|
|
||||||
if (item) {
|
|
||||||
item->SetLabel(dontMoveToTrash
|
|
||||||
? B_TRANSLATE("Delete")
|
|
||||||
: B_TRANSLATE("Move to Trash"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
UpdateIfNeeded();
|
|
||||||
}
|
}
|
||||||
|
UpdateIfNeeded();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
_inherited::MessageReceived(message);
|
_inherited::MessageReceived(message);
|
||||||
@@ -2681,9 +2682,11 @@ BContainerWindow::ShowContextMenu(BPoint loc, const entry_ref* ref, BView*)
|
|||||||
if (model.InitCheck() == B_OK) { // ??? Do I need this ???
|
if (model.InitCheck() == B_OK) { // ??? Do I need this ???
|
||||||
if (showAsVolume) {
|
if (showAsVolume) {
|
||||||
// non-volume enable/disable copy, move, identify
|
// non-volume enable/disable copy, move, identify
|
||||||
EnableNamedMenuItem(fContextMenu, kDuplicateSelection, false);
|
EnableNamedMenuItem(fContextMenu, kDuplicateSelection,
|
||||||
|
false);
|
||||||
EnableNamedMenuItem(fContextMenu, kMoveToTrash, false);
|
EnableNamedMenuItem(fContextMenu, kMoveToTrash, false);
|
||||||
EnableNamedMenuItem(fContextMenu, kIdentifyEntry, false);
|
EnableNamedMenuItem(fContextMenu, kIdentifyEntry,
|
||||||
|
false);
|
||||||
|
|
||||||
// volume model, enable/disable the Unmount item
|
// volume model, enable/disable the Unmount item
|
||||||
bool ejectableVolumeSelected = false;
|
bool ejectableVolumeSelected = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user