From e37767b0d21082c18ad4506015851135d2a89698 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Sat, 1 Feb 2014 03:23:15 -0500 Subject: [PATCH] Tracker: some style fixes to BContainerWindow() --- src/kits/tracker/ContainerWindow.cpp | 49 +++++++++++++++------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/src/kits/tracker/ContainerWindow.cpp b/src/kits/tracker/ContainerWindow.cpp index 73edc42041..081535e629 100644 --- a/src/kits/tracker/ContainerWindow.cpp +++ b/src/kits/tracker/ContainerWindow.cpp @@ -511,10 +511,11 @@ DraggableContainerIcon::Draw(BRect updateRect) BContainerWindow::BContainerWindow(LockingList* list, - uint32 containerWindowFlags, - window_look look, window_feel feel, uint32 flags, uint32 workspace) - : BWindow(InitialWindowRect(feel), "TrackerWindow", look, feel, flags, - workspace), + uint32 containerWindowFlags, window_look look, window_feel feel, + uint32 flags, uint32 workspace) + : + BWindow(InitialWindowRect(feel), "TrackerWindow", look, feel, flags, + workspace), fFileContextMenu(NULL), fWindowContextMenu(NULL), fDropContextMenu(NULL), @@ -1668,30 +1669,30 @@ BContainerWindow::MessageReceived(BMessage* message) break; case kDontMoveFilesToTrashChanged: - { - bool dontMoveToTrash - = settings.DontMoveFilesToTrash(); + { + bool dontMoveToTrash + = settings.DontMoveFilesToTrash(); - BMenuItem* item - = fFileContextMenu->FindItem(kMoveToTrash); - if (item != NULL) { + BMenuItem* item + = fFileContextMenu->FindItem(kMoveToTrash); + 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 ? 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 - ? B_TRANSLATE("Delete") - : B_TRANSLATE("Move to Trash")); - } - } - UpdateIfNeeded(); } + UpdateIfNeeded(); break; + } default: _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 (showAsVolume) { // non-volume enable/disable copy, move, identify - EnableNamedMenuItem(fContextMenu, kDuplicateSelection, false); + EnableNamedMenuItem(fContextMenu, kDuplicateSelection, + false); EnableNamedMenuItem(fContextMenu, kMoveToTrash, false); - EnableNamedMenuItem(fContextMenu, kIdentifyEntry, false); + EnableNamedMenuItem(fContextMenu, kIdentifyEntry, + false); // volume model, enable/disable the Unmount item bool ejectableVolumeSelected = false;