Patch by Humdinger:

Changed strings to sentence case. The changes in StatusWindow and
FSUtils are missing because I have some unfinished work in progress
in those files. Will commit them separately. This is case-tracker.diff
from #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35047 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2010-01-13 12:03:25 +00:00
parent fcc3e627e1
commit 82d8aaf85a
19 changed files with 172 additions and 172 deletions
+13 -13
View File
@@ -103,45 +103,45 @@ AutomountSettingsPanel::AutomountSettingsPanel(BMessage* settings,
BBox* autoMountBox = new BBox("autoMountBox", B_WILL_DRAW | B_FRAME_EVENTS BBox* autoMountBox = new BBox("autoMountBox", B_WILL_DRAW | B_FRAME_EVENTS
| B_PULSE_NEEDED | B_NAVIGABLE_JUMP); | B_PULSE_NEEDED | B_NAVIGABLE_JUMP);
autoMountBox->SetLabel("Automatic Disk Mounting"); autoMountBox->SetLabel("Automatic disk mounting");
BGroupLayout* autoMountLayout = new BGroupLayout(B_VERTICAL, spacing); BGroupLayout* autoMountLayout = new BGroupLayout(B_VERTICAL, spacing);
autoMountBox->SetLayout(autoMountLayout); autoMountBox->SetLayout(autoMountLayout);
autoMountLayout->SetInsets(spacing, autoMountLayout->SetInsets(spacing,
autoMountBox->InnerFrame().top + spacing, spacing, spacing); autoMountBox->InnerFrame().top + spacing, spacing, spacing);
fScanningDisabledCheck = new BRadioButton("scanningOff", "Don't Automount", fScanningDisabledCheck = new BRadioButton("scanningOff", "Don't automount",
new BMessage(kAutomountSettingsChanged)); new BMessage(kAutomountSettingsChanged));
fAutoMountAllBFSCheck = new BRadioButton("autoBFS", "All BeOS Disks", fAutoMountAllBFSCheck = new BRadioButton("autoBFS", "All BeOS disks",
new BMessage(kAutomountSettingsChanged)); new BMessage(kAutomountSettingsChanged));
fAutoMountAllCheck = new BRadioButton("autoAll", "All Disks", fAutoMountAllCheck = new BRadioButton("autoAll", "All disks",
new BMessage(kAutomountSettingsChanged)); new BMessage(kAutomountSettingsChanged));
// "Disk Mounting During Boot" group // "Disk Mounting During Boot" group
BBox* bootMountBox = new BBox("", B_WILL_DRAW | B_FRAME_EVENTS BBox* bootMountBox = new BBox("", B_WILL_DRAW | B_FRAME_EVENTS
| B_PULSE_NEEDED | B_NAVIGABLE_JUMP); | B_PULSE_NEEDED | B_NAVIGABLE_JUMP);
bootMountBox->SetLabel("Disk Mounting During Boot"); bootMountBox->SetLabel("Disk mounting during boot");
BGroupLayout* bootMountLayout = new BGroupLayout(B_VERTICAL, spacing); BGroupLayout* bootMountLayout = new BGroupLayout(B_VERTICAL, spacing);
bootMountBox->SetLayout(bootMountLayout); bootMountBox->SetLayout(bootMountLayout);
bootMountLayout->SetInsets(spacing, bootMountLayout->SetInsets(spacing,
bootMountBox->InnerFrame().top + spacing, spacing, spacing); bootMountBox->InnerFrame().top + spacing, spacing, spacing);
fInitialDontMountCheck = new BRadioButton("initialNone", fInitialDontMountCheck = new BRadioButton("initialNone",
"Only The Boot Disk", new BMessage(kBootMountSettingsChanged)); "Only the boot disk", new BMessage(kBootMountSettingsChanged));
fInitialMountRestoreCheck = new BRadioButton("initialRestore", fInitialMountRestoreCheck = new BRadioButton("initialRestore",
"Previously Mounted Disks", new BMessage(kBootMountSettingsChanged)); "Previously mounted disks", new BMessage(kBootMountSettingsChanged));
fInitialMountAllBFSCheck = new BRadioButton("initialBFS", fInitialMountAllBFSCheck = new BRadioButton("initialBFS",
"All BeOS Disks", new BMessage(kBootMountSettingsChanged)); "All BeOS disks", new BMessage(kBootMountSettingsChanged));
fInitialMountAllCheck = new BRadioButton("initialAll", fInitialMountAllCheck = new BRadioButton("initialAll",
"All Disks", new BMessage(kBootMountSettingsChanged)); "All disks", new BMessage(kBootMountSettingsChanged));
fEjectWhenUnmountingCheckBox = new BCheckBox("ejectWhenUnmounting", fEjectWhenUnmountingCheckBox = new BCheckBox("ejectWhenUnmounting",
"Eject When Unmounting", new BMessage(kEjectWhenUnmountingChanged)); "Eject when unmounting", new BMessage(kEjectWhenUnmountingChanged));
// Buttons // Buttons
@@ -292,7 +292,7 @@ AutomountSettingsPanel::_SendSettings(bool rescan)
AutomountSettingsDialog::AutomountSettingsDialog(BMessage* settings, AutomountSettingsDialog::AutomountSettingsDialog(BMessage* settings,
const BMessenger& target) const BMessenger& target)
: :
BWindow(BRect(100, 100, 320, 370), "Disk Mount Settings", BWindow(BRect(100, 100, 320, 370), "Disk mount settings",
B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE
| B_AUTO_UPDATE_SIZE_LIMITS) | B_AUTO_UPDATE_SIZE_LIMITS)
{ {
@@ -325,8 +325,8 @@ AutomountSettingsDialog::RunAutomountSettings(const BMessenger& target)
BMessage reply; BMessage reply;
status_t ret = target.SendMessage(&message, &reply, 2500000); status_t ret = target.SendMessage(&message, &reply, 2500000);
if (ret != B_OK) { if (ret != B_OK) {
(new BAlert("Mount Server Error", "The mount server could not be " (new BAlert("Mount server error", "The mount server could not be "
"contacted.", "Ok", NULL, NULL, B_WIDTH_AS_USUAL, "contacted.", "OK", NULL, NULL, B_WIDTH_AS_USUAL,
B_STOP_ALERT))->Go(); B_STOP_ALERT))->Go();
return; return;
} }
+50 -50
View File
@@ -103,7 +103,7 @@ const float kDragSlop = 3.0f;
namespace BPrivate { namespace BPrivate {
const char *kAddOnsMenuName = "Add-Ons"; const char *kAddOnsMenuName = "Add-ons";
class DraggableContainerIcon : public BView { class DraggableContainerIcon : public BView {
public: public:
@@ -895,7 +895,7 @@ BContainerWindow::Init(const BMessage *message)
fMoveToItem = new BMenuItem(new BNavMenu("Move to", kMoveSelectionTo, this)); fMoveToItem = new BMenuItem(new BNavMenu("Move to", kMoveSelectionTo, this));
fCopyToItem = new BMenuItem(new BNavMenu("Copy to", kCopySelectionTo, this)); fCopyToItem = new BMenuItem(new BNavMenu("Copy to", kCopySelectionTo, this));
fCreateLinkItem = new BMenuItem(new BNavMenu("Create Link", kCreateLink, this), fCreateLinkItem = new BMenuItem(new BNavMenu("Create link", kCreateLink, this),
new BMessage(kCreateLink)); new BMessage(kCreateLink));
TrackerSettings settings; TrackerSettings settings;
@@ -1641,13 +1641,13 @@ BContainerWindow::MessageReceived(BMessage *message)
BMenuItem *item = fFileContextMenu->FindItem(kMoveToTrash); BMenuItem *item = fFileContextMenu->FindItem(kMoveToTrash);
if (item) if (item)
item->SetLabel(dontMoveToTrash ? "Delete" : "Move To Trash"); item->SetLabel(dontMoveToTrash ? "Delete" : "Move to Trash");
// Deskbar doesn't have a menu bar, so check if there is fMenuBar // Deskbar doesn't have a menu bar, so check if there is fMenuBar
if (fMenuBar && fFileMenu) { if (fMenuBar && fFileMenu) {
item = fFileMenu->FindItem(kMoveToTrash); item = fFileMenu->FindItem(kMoveToTrash);
if (item) if (item)
item->SetLabel(dontMoveToTrash ? "Delete" : "Move To Trash"); item->SetLabel(dontMoveToTrash ? "Delete" : "Move to Trash");
} }
UpdateIfNeeded(); UpdateIfNeeded();
} }
@@ -1759,11 +1759,11 @@ BContainerWindow::SetCleanUpItem(BMenu *menu)
&& (PoseView()->ViewMode() != kListMode)); && (PoseView()->ViewMode() != kListMode));
if (modifiers() & B_SHIFT_KEY) { if (modifiers() & B_SHIFT_KEY) {
item->SetLabel("Clean Up All"); item->SetLabel("Clean up all");
item->SetShortcut('K', B_COMMAND_KEY | B_SHIFT_KEY); item->SetShortcut('K', B_COMMAND_KEY | B_SHIFT_KEY);
item->SetMessage(new BMessage(kCleanupAll)); item->SetMessage(new BMessage(kCleanupAll));
} else { } else {
item->SetLabel("Clean Up"); item->SetLabel("Clean up");
item->SetShortcut('K', B_COMMAND_KEY); item->SetShortcut('K', B_COMMAND_KEY);
item->SetMessage(new BMessage(kCleanup)); item->SetMessage(new BMessage(kCleanup));
} }
@@ -1779,7 +1779,7 @@ BContainerWindow::SetCloseItem(BMenu *menu)
return; return;
if (modifiers() & B_SHIFT_KEY) { if (modifiers() & B_SHIFT_KEY) {
item->SetLabel("Close All"); item->SetLabel("Close all");
item->SetShortcut('W', B_COMMAND_KEY | B_SHIFT_KEY); item->SetShortcut('W', B_COMMAND_KEY | B_SHIFT_KEY);
item->SetTarget(be_app); item->SetTarget(be_app);
item->SetMessage(new BMessage(kCloseAllWindows)); item->SetMessage(new BMessage(kCloseAllWindows));
@@ -1834,13 +1834,13 @@ BContainerWindow::AddFileMenu(BMenu *menu)
menu->AddItem(templateMenu); menu->AddItem(templateMenu);
templateMenu->SetTargetForItems(PoseView()); templateMenu->SetTargetForItems(PoseView());
} else } else
menu->AddItem(new BMenuItem("New Folder", new BMessage(kNewFolder), 'N')); menu->AddItem(new BMenuItem("New folder", new BMessage(kNewFolder), 'N'));
} }
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(new BMenuItem("Open", new BMessage(kOpenSelection), 'O')); menu->AddItem(new BMenuItem("Open", new BMessage(kOpenSelection), 'O'));
menu->AddItem(new BMenuItem("Get Info", new BMessage(kGetInfo), 'I')); menu->AddItem(new BMenuItem("Get info", new BMessage(kGetInfo), 'I'));
menu->AddItem(new BMenuItem("Edit Name", new BMessage(kEditItem), 'E')); menu->AddItem(new BMenuItem("Edit name", new BMessage(kEditItem), 'E'));
if (IsTrash() || InTrash()) { if (IsTrash() || InTrash()) {
menu->AddItem(new BMenuItem("Restore", new BMessage(kRestoreFromTrash))); menu->AddItem(new BMenuItem("Restore", new BMessage(kRestoreFromTrash)));
@@ -1850,10 +1850,10 @@ BContainerWindow::AddFileMenu(BMenu *menu)
menu->AddItem(new BSeparatorItem(), 1); menu->AddItem(new BSeparatorItem(), 1);
} }
} else if (IsPrintersDir()) { } else if (IsPrintersDir()) {
menu->AddItem(new BMenuItem("Add Printer"B_UTF8_ELLIPSIS, menu->AddItem(new BMenuItem("Add printer"B_UTF8_ELLIPSIS,
new BMessage(kAddPrinter), 'N'), 0); new BMessage(kAddPrinter), 'N'), 0);
menu->AddItem(new BSeparatorItem(), 1); menu->AddItem(new BSeparatorItem(), 1);
menu->AddItem(new BMenuItem("Make Active Printer", menu->AddItem(new BMenuItem("Make active printer",
new BMessage(kMakeActivePrinter))); new BMessage(kMakeActivePrinter)));
} else { } else {
menu->AddItem(new BMenuItem("Duplicate",new BMessage(kDuplicateSelection), 'D')); menu->AddItem(new BMenuItem("Duplicate",new BMessage(kDuplicateSelection), 'D'));
@@ -1900,7 +1900,7 @@ BContainerWindow::AddWindowMenu(BMenu *menu)
{ {
BMenuItem *item; BMenuItem *item;
BMenu* iconSizeMenu = new BMenu("Icon View"); BMenu* iconSizeMenu = new BMenu("Icon view");
BMessage* message = new BMessage(kIconMode); BMessage* message = new BMessage(kIconMode);
message->AddInt32("size", 32); message->AddInt32("size", 32);
@@ -1930,13 +1930,13 @@ BContainerWindow::AddWindowMenu(BMenu *menu)
message = new BMessage(kIconMode); message = new BMessage(kIconMode);
message->AddInt32("scale", 0); message->AddInt32("scale", 0);
item = new BMenuItem("Decrease Size", message, '-'); item = new BMenuItem("Decrease size", message, '-');
item->SetTarget(PoseView()); item->SetTarget(PoseView());
iconSizeMenu->AddItem(item); iconSizeMenu->AddItem(item);
message = new BMessage(kIconMode); message = new BMessage(kIconMode);
message->AddInt32("scale", 1); message->AddInt32("scale", 1);
item = new BMenuItem("Increase Size", message, '+'); item = new BMenuItem("Increase size", message, '+');
item->SetTarget(PoseView()); item->SetTarget(PoseView());
iconSizeMenu->AddItem(item); iconSizeMenu->AddItem(item);
@@ -1946,21 +1946,21 @@ BContainerWindow::AddWindowMenu(BMenu *menu)
iconSizeMenu->Superitem()->SetMessage(new BMessage(kIconMode)); iconSizeMenu->Superitem()->SetMessage(new BMessage(kIconMode));
iconSizeMenu->Superitem()->SetTarget(PoseView()); iconSizeMenu->Superitem()->SetTarget(PoseView());
item = new BMenuItem("Mini Icon View", new BMessage(kMiniIconMode), '2'); item = new BMenuItem("Mini icon view", new BMessage(kMiniIconMode), '2');
item->SetTarget(PoseView()); item->SetTarget(PoseView());
menu->AddItem(item); menu->AddItem(item);
item = new BMenuItem("List View", new BMessage(kListMode), '3'); item = new BMenuItem("List view", new BMessage(kListMode), '3');
item->SetTarget(PoseView()); item->SetTarget(PoseView());
menu->AddItem(item); menu->AddItem(item);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
item = new BMenuItem("Resize to Fit", new BMessage(kResizeToFit), 'Y'); item = new BMenuItem("Resize to fit", new BMessage(kResizeToFit), 'Y');
item->SetTarget(this); item->SetTarget(this);
menu->AddItem(item); menu->AddItem(item);
item = new BMenuItem("Clean Up", new BMessage(kCleanup), 'K'); item = new BMenuItem("Clean up", new BMessage(kCleanup), 'K');
item->SetTarget(PoseView()); item->SetTarget(PoseView());
menu->AddItem(item); menu->AddItem(item);
@@ -1969,17 +1969,17 @@ BContainerWindow::AddWindowMenu(BMenu *menu)
item->SetTarget(PoseView()); item->SetTarget(PoseView());
menu->AddItem(item); menu->AddItem(item);
item = new BMenuItem("Select All", new BMessage(B_SELECT_ALL), 'A'); item = new BMenuItem("Select all", new BMessage(B_SELECT_ALL), 'A');
item->SetTarget(PoseView()); item->SetTarget(PoseView());
menu->AddItem(item); menu->AddItem(item);
item = new BMenuItem("Invert Selection", new BMessage(kInvertSelection), item = new BMenuItem("Invert selection", new BMessage(kInvertSelection),
'S'); 'S');
item->SetTarget(PoseView()); item->SetTarget(PoseView());
menu->AddItem(item); menu->AddItem(item);
if (!IsTrash()) { if (!IsTrash()) {
item = new BMenuItem("Open Parent", new BMessage(kOpenParentDir), item = new BMenuItem("Open parent", new BMessage(kOpenParentDir),
B_UP_ARROW); B_UP_ARROW);
item->SetTarget(PoseView()); item->SetTarget(PoseView());
menu->AddItem(item); menu->AddItem(item);
@@ -1989,7 +1989,7 @@ BContainerWindow::AddWindowMenu(BMenu *menu)
item->SetTarget(this); item->SetTarget(this);
menu->AddItem(item); menu->AddItem(item);
item = new BMenuItem("Close All in Workspace", item = new BMenuItem("Close all in workspace",
new BMessage(kCloseAllInWorkspace), 'Q'); new BMessage(kCloseAllInWorkspace), 'Q');
item->SetTarget(be_app); item->SetTarget(be_app);
menu->AddItem(item); menu->AddItem(item);
@@ -2057,7 +2057,7 @@ BContainerWindow::MenusBeginning()
AddMimeTypesToMenu(fAttrMenu); AddMimeTypesToMenu(fAttrMenu);
if (IsPrintersDir()) if (IsPrintersDir())
EnableNamedMenuItem(fFileMenu, "Make Active Printer", selectCount == 1); EnableNamedMenuItem(fFileMenu, "Make active printer", selectCount == 1);
} }
@@ -2169,7 +2169,7 @@ BContainerWindow::SetUpEditQueryItem(BMenu *menu)
bool poseViewIsQuery = TargetModel()->IsQuery(); bool poseViewIsQuery = TargetModel()->IsQuery();
// if the view is a query pose view, add edit query menu item // if the view is a query pose view, add edit query menu item
BMenuItem *item = menu->FindItem("Edit Query"); BMenuItem *item = menu->FindItem("Edit query");
if (!poseViewIsQuery && !queryInSelection && item) if (!poseViewIsQuery && !queryInSelection && item)
item->Menu()->RemoveItem(item); item->Menu()->RemoveItem(item);
@@ -2179,7 +2179,7 @@ BContainerWindow::SetUpEditQueryItem(BMenu *menu)
item = menu->FindItem(kOpenSelection); item = menu->FindItem(kOpenSelection);
if (item) { if (item) {
int32 itemIndex = item->Menu()->IndexOf(item); int32 itemIndex = item->Menu()->IndexOf(item);
BMenuItem *query = new BMenuItem("Edit Query", new BMessage(kEditQuery), 'G'); BMenuItem *query = new BMenuItem("Edit query", new BMessage(kEditQuery), 'G');
item->Menu()->AddItem(query, itemIndex + 1); item->Menu()->AddItem(query, itemIndex + 1);
query->SetTarget(PoseView()); query->SetTarget(PoseView());
} }
@@ -2231,7 +2231,7 @@ BContainerWindow::SetupOpenWithMenu(BMenu *parent)
int32 index = item->Menu()->IndexOf(item); int32 index = item->Menu()->IndexOf(item);
fOpenWithItem = new BMenuItem( fOpenWithItem = new BMenuItem(
new OpenWithMenu("Open With"B_UTF8_ELLIPSIS, &message, this, be_app), new OpenWithMenu("Open with"B_UTF8_ELLIPSIS, &message, this, be_app),
new BMessage(kOpenSelectionWith)); new BMessage(kOpenSelectionWith));
fOpenWithItem->SetTarget(PoseView()); fOpenWithItem->SetTarget(PoseView());
fOpenWithItem->SetShortcut('O', B_COMMAND_KEY | B_CONTROL_KEY); fOpenWithItem->SetShortcut('O', B_COMMAND_KEY | B_CONTROL_KEY);
@@ -2266,7 +2266,7 @@ BContainerWindow::PopulateMoveCopyNavMenu(BNavMenu *navMenu, uint32 what,
if (entry.SetTo(ref) == B_OK if (entry.SetTo(ref) == B_OK
&& entry.GetParent(&entry) == B_OK && entry.GetParent(&entry) == B_OK
&& model.SetTo(&entry) == B_OK) { && model.SetTo(&entry) == B_OK) {
BNavMenu *menu = new BNavMenu("Current Folder",what,this); BNavMenu *menu = new BNavMenu("Current folder",what,this);
menu->SetNavDir(model.EntryRef()); menu->SetNavDir(model.EntryRef());
menu->SetShowParent(true); menu->SetShowParent(true);
@@ -2282,7 +2282,7 @@ BContainerWindow::PopulateMoveCopyNavMenu(BNavMenu *navMenu, uint32 what,
path.Append("Tracker"); path.Append("Tracker");
if (entry.SetTo(path.Path()) == B_OK if (entry.SetTo(path.Path()) == B_OK
&& model.SetTo(&entry) == B_OK) { && model.SetTo(&entry) == B_OK) {
BMenu *menu = new RecentsMenu("Recent Folders",kRecentFolders,what,this); BMenu *menu = new RecentsMenu("Recent folders",kRecentFolders,what,this);
BMenuItem *item = new SpecialModelMenuItem(&model,menu); BMenuItem *item = new SpecialModelMenuItem(&model,menu);
item->SetMessage(new BMessage((uint32)what)); item->SetMessage(new BMessage((uint32)what));
@@ -2381,9 +2381,9 @@ BContainerWindow::SetupMoveCopyMenus(const entry_ref *item_ref, BMenu *parent)
// Set the "Create Link" item label here so it // Set the "Create Link" item label here so it
// appears correctly when menus are disabled, too. // appears correctly when menus are disabled, too.
if (modifierKeys & B_SHIFT_KEY) if (modifierKeys & B_SHIFT_KEY)
fCreateLinkItem->SetLabel("Create Relative Link"); fCreateLinkItem->SetLabel("Create relative link");
else else
fCreateLinkItem->SetLabel("Create Link"); fCreateLinkItem->SetLabel("Create link");
// only enable once the menus are built // only enable once the menus are built
fMoveToItem->SetEnabled(false); fMoveToItem->SetEnabled(false);
@@ -2431,7 +2431,7 @@ BContainerWindow::SetupMoveCopyMenus(const entry_ref *item_ref, BMenu *parent)
BMenuItem *identifyItem = parent->FindItem(kIdentifyEntry); BMenuItem *identifyItem = parent->FindItem(kIdentifyEntry);
if (identifyItem != NULL) { if (identifyItem != NULL) {
if (modifierKeys & B_SHIFT_KEY) if (modifierKeys & B_SHIFT_KEY)
identifyItem->SetLabel("Force Identify"); identifyItem->SetLabel("Force identify");
else else
identifyItem->SetLabel("Identify"); identifyItem->SetLabel("Identify");
} }
@@ -2454,10 +2454,10 @@ BContainerWindow::ShowDropContextMenu(BPoint loc)
if (item == NULL) if (item == NULL)
item = fDropContextMenu->FindItem(kCreateRelativeLink); item = fDropContextMenu->FindItem(kCreateRelativeLink);
if (item && (modifiers() & B_SHIFT_KEY)) { if (item && (modifiers() & B_SHIFT_KEY)) {
item->SetLabel("Create Relative Link Here"); item->SetLabel("Create relative link here");
item->SetMessage(new BMessage(kCreateRelativeLink)); item->SetMessage(new BMessage(kCreateRelativeLink));
} else if (item) { } else if (item) {
item->SetLabel("Create Link Here"); item->SetLabel("Create link here");
item->SetMessage(new BMessage(kCreateLink)); item->SetMessage(new BMessage(kCreateLink));
} }
@@ -2599,8 +2599,8 @@ void
BContainerWindow::AddFileContextMenus(BMenu *menu) BContainerWindow::AddFileContextMenus(BMenu *menu)
{ {
menu->AddItem(new BMenuItem("Open", new BMessage(kOpenSelection), 'O')); menu->AddItem(new BMenuItem("Open", new BMessage(kOpenSelection), 'O'));
menu->AddItem(new BMenuItem("Get Info", new BMessage(kGetInfo), 'I')); menu->AddItem(new BMenuItem("Get info", new BMessage(kGetInfo), 'I'));
menu->AddItem(new BMenuItem("Edit Name", new BMessage(kEditItem), 'E')); menu->AddItem(new BMenuItem("Edit name", new BMessage(kEditItem), 'E'));
if (!IsTrash() && !InTrash() && !IsPrintersDir()) if (!IsTrash() && !InTrash() && !IsPrintersDir())
menu->AddItem(new BMenuItem("Duplicate", menu->AddItem(new BMenuItem("Duplicate",
@@ -2644,8 +2644,8 @@ void
BContainerWindow::AddVolumeContextMenus(BMenu *menu) BContainerWindow::AddVolumeContextMenus(BMenu *menu)
{ {
menu->AddItem(new BMenuItem("Open", new BMessage(kOpenSelection), 'O')); menu->AddItem(new BMenuItem("Open", new BMessage(kOpenSelection), 'O'));
menu->AddItem(new BMenuItem("Get Info", new BMessage(kGetInfo), 'I')); menu->AddItem(new BMenuItem("Get info", new BMessage(kGetInfo), 'I'));
menu->AddItem(new BMenuItem("Edit Name", new BMessage(kEditItem), 'E')); menu->AddItem(new BMenuItem("Edit name", new BMessage(kEditItem), 'E'));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(new MountMenu("Mount")); menu->AddItem(new MountMenu("Mount"));
@@ -2672,7 +2672,7 @@ BContainerWindow::AddWindowContextMenus(BMenu *menu)
if (IsTrash()) if (IsTrash())
menu->AddItem(new BMenuItem("Empty Trash", new BMessage(kEmptyTrash))); menu->AddItem(new BMenuItem("Empty Trash", new BMessage(kEmptyTrash)));
else if (IsPrintersDir()) else if (IsPrintersDir())
menu->AddItem(new BMenuItem("Add Printer"B_UTF8_ELLIPSIS, new BMessage(kAddPrinter), 'N')); menu->AddItem(new BMenuItem("Add printer"B_UTF8_ELLIPSIS, new BMessage(kAddPrinter), 'N'));
else if (InTrash()) else if (InTrash())
needSeparator = false; needSeparator = false;
else { else {
@@ -2690,12 +2690,12 @@ BContainerWindow::AddWindowContextMenus(BMenu *menu)
menu->AddItem(pasteItem); menu->AddItem(pasteItem);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
#endif #endif
menu->AddItem(new BMenuItem("Clean Up", new BMessage(kCleanup), 'K')); menu->AddItem(new BMenuItem("Clean up", new BMessage(kCleanup), 'K'));
menu->AddItem(new BMenuItem("Select"B_UTF8_ELLIPSIS, menu->AddItem(new BMenuItem("Select"B_UTF8_ELLIPSIS,
new BMessage(kShowSelectionWindow), 'A', B_SHIFT_KEY)); new BMessage(kShowSelectionWindow), 'A', B_SHIFT_KEY));
menu->AddItem(new BMenuItem("Select All", new BMessage(B_SELECT_ALL), 'A')); menu->AddItem(new BMenuItem("Select all", new BMessage(B_SELECT_ALL), 'A'));
if (!IsTrash()) if (!IsTrash())
menu->AddItem(new BMenuItem("Open Parent", new BMessage(kOpenParentDir), menu->AddItem(new BMenuItem("Open parent", new BMessage(kOpenParentDir),
B_UP_ARROW)); B_UP_ARROW));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
@@ -2705,7 +2705,7 @@ BContainerWindow::AddWindowContextMenus(BMenu *menu)
#if DEBUG #if DEBUG
menu->AddSeparatorItem(); menu->AddSeparatorItem();
BMenuItem *testing = new BMenuItem("Test Icon Cache", new BMessage(kTestIconCache)); BMenuItem *testing = new BMenuItem("Test icon cache", new BMessage(kTestIconCache));
menu->AddItem(testing); menu->AddItem(testing);
#endif #endif
@@ -2720,9 +2720,9 @@ BContainerWindow::AddWindowContextMenus(BMenu *menu)
void void
BContainerWindow::AddDropContextMenus(BMenu *menu) BContainerWindow::AddDropContextMenus(BMenu *menu)
{ {
menu->AddItem(new BMenuItem("Create Link Here", new BMessage(kCreateLink))); menu->AddItem(new BMenuItem("Create link here", new BMessage(kCreateLink)));
menu->AddItem(new BMenuItem("Move Here", new BMessage(kMoveSelectionTo))); menu->AddItem(new BMenuItem("Move here", new BMessage(kMoveSelectionTo)));
menu->AddItem(new BMenuItem("Copy Here", new BMessage(kCopySelectionTo))); menu->AddItem(new BMenuItem("Copy here", new BMessage(kCopySelectionTo)));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(new BMenuItem("Cancel", new BMessage(kCancelButton))); menu->AddItem(new BMenuItem("Cancel", new BMessage(kCancelButton)));
} }
@@ -2942,7 +2942,7 @@ BContainerWindow::UpdateMenu(BMenu *menu, UpdateMenuContext context)
if (context == kMenuBarContext || context == kWindowPopUpContext) { if (context == kMenuBarContext || context == kWindowPopUpContext) {
BMenu* sizeMenu = NULL; BMenu* sizeMenu = NULL;
if (BMenuItem* item = menu->FindItem("Icon View")) { if (BMenuItem* item = menu->FindItem("Icon view")) {
sizeMenu = item->Submenu(); sizeMenu = item->Submenu();
} }
@@ -3000,7 +3000,7 @@ BContainerWindow::LoadAddOn(BMessage *message)
status_t result = message->FindRef("refs", &addonRef); status_t result = message->FindRef("refs", &addonRef);
if (result != B_OK) { if (result != B_OK) {
char buffer[1024]; char buffer[1024];
sprintf(buffer, "Error %s loading Add-On %s.", strerror(result), addonRef.name); sprintf(buffer, "Error %s loading add-On %s.", strerror(result), addonRef.name);
BAlert* alert = new BAlert("", buffer, "Cancel", 0, 0, BAlert* alert = new BAlert("", buffer, "Cancel", 0, 0,
B_WIDTH_AS_USUAL, B_WARNING_ALERT); B_WIDTH_AS_USUAL, B_WARNING_ALERT);
alert->SetShortcut(0, B_ESCAPE); alert->SetShortcut(0, B_ESCAPE);
@@ -3063,9 +3063,9 @@ BContainerWindow::NewAttributeMenu(BMenu *menu)
ASSERT(PoseView()); ASSERT(PoseView());
BMenuItem *item; BMenuItem *item;
menu->AddItem(item = new BMenuItem("Copy Layout", new BMessage(kCopyAttributes))); menu->AddItem(item = new BMenuItem("Copy layout", new BMessage(kCopyAttributes)));
item->SetTarget(PoseView()); item->SetTarget(PoseView());
menu->AddItem(item = new BMenuItem("Paste Layout", new BMessage(kPasteAttributes))); menu->AddItem(item = new BMenuItem("Paste layout", new BMessage(kPasteAttributes)));
item->SetTarget(PoseView()); item->SetTarget(PoseView());
menu->AddSeparatorItem(); menu->AddSeparatorItem();
+23 -23
View File
@@ -152,7 +152,7 @@ BDeskWindow::Init(const BMessage *)
// Set the size of the screen before calling the container window's // Set the size of the screen before calling the container window's
// Init() because it will add volume poses to this window and // Init() because it will add volume poses to this window and
// they will be clipped otherwise // they will be clipped otherwise
// //
BScreen screen(this); BScreen screen(this);
fOldFrame = screen.Frame(); fOldFrame = screen.Frame();
@@ -169,33 +169,33 @@ BDeskWindow::Init(const BMessage *)
if (fDeskShelf) if (fDeskShelf)
fDeskShelf->SetDisplaysZombies(true); fDeskShelf->SetDisplaysZombies(true);
} }
// watch add-on directories so that we can track the addons with // watch add-on directories so that we can track the addons with
// corresponding shortcuts // corresponding shortcuts
WatchAddOnDir(B_BEOS_ADDONS_DIRECTORY, this); WatchAddOnDir(B_BEOS_ADDONS_DIRECTORY, this);
WatchAddOnDir(B_USER_ADDONS_DIRECTORY, this); WatchAddOnDir(B_USER_ADDONS_DIRECTORY, this);
WatchAddOnDir(B_COMMON_ADDONS_DIRECTORY, this); WatchAddOnDir(B_COMMON_ADDONS_DIRECTORY, this);
_inherited::Init(); _inherited::Init();
} }
void void
BDeskWindow::MenusBeginning() BDeskWindow::MenusBeginning()
{ {
_inherited::MenusBeginning(); _inherited::MenusBeginning();
if (fShouldUpdateAddonShortcuts) { if (fShouldUpdateAddonShortcuts) {
PRINT(("updating addon shortcuts\n")); PRINT(("updating addon shortcuts\n"));
fShouldUpdateAddonShortcuts = false; fShouldUpdateAddonShortcuts = false;
// remove all current addon shortcuts // remove all current addon shortcuts
for (std::set<uint32>::iterator it= fCurrentAddonShortcuts.begin(); for (std::set<uint32>::iterator it= fCurrentAddonShortcuts.begin();
it != fCurrentAddonShortcuts.end(); it++) { it != fCurrentAddonShortcuts.end(); it++) {
PRINT(("removing shortcut %c\n", *it)); PRINT(("removing shortcut %c\n", *it));
RemoveShortcut(*it, B_OPTION_KEY | B_COMMAND_KEY); RemoveShortcut(*it, B_OPTION_KEY | B_COMMAND_KEY);
} }
fCurrentAddonShortcuts.clear(); fCurrentAddonShortcuts.clear();
AddOneShortcutParams params; AddOneShortcutParams params;
@@ -259,12 +259,12 @@ BDeskWindow::CreatePoseView(Model *model)
fPoseView->SetLowColor(desktopColor); fPoseView->SetLowColor(desktopColor);
AddChild(fPoseView); AddChild(fPoseView);
PoseView()->StartSettingsWatch(); PoseView()->StartSettingsWatch();
} }
void void
BDeskWindow::AddWindowContextMenus(BMenu *menu) BDeskWindow::AddWindowContextMenus(BMenu *menu)
{ {
TemplatesMenu *tempateMenu = new TemplatesMenu(PoseView()); TemplatesMenu *tempateMenu = new TemplatesMenu(PoseView());
@@ -275,7 +275,7 @@ BDeskWindow::AddWindowContextMenus(BMenu *menu)
menu->AddSeparatorItem(); menu->AddSeparatorItem();
BMenu* iconSizeMenu = new BMenu("Icon View"); BMenu* iconSizeMenu = new BMenu("Icon view");
BMessage* message = new BMessage(kIconMode); BMessage* message = new BMessage(kIconMode);
message->AddInt32("size", 32); message->AddInt32("size", 32);
@@ -309,13 +309,13 @@ BDeskWindow::AddWindowContextMenus(BMenu *menu)
message = new BMessage(kIconMode); message = new BMessage(kIconMode);
message->AddInt32("scale", 0); message->AddInt32("scale", 0);
item = new BMenuItem("Decrease Size", message, '-'); item = new BMenuItem("Decrease size", message, '-');
item->SetTarget(PoseView()); item->SetTarget(PoseView());
iconSizeMenu->AddItem(item); iconSizeMenu->AddItem(item);
message = new BMessage(kIconMode); message = new BMessage(kIconMode);
message->AddInt32("scale", 1); message->AddInt32("scale", 1);
item = new BMenuItem("Increase Size", message, '+'); item = new BMenuItem("Increase size", message, '+');
item->SetTarget(PoseView()); item->SetTarget(PoseView());
iconSizeMenu->AddItem(item); iconSizeMenu->AddItem(item);
@@ -326,7 +326,7 @@ BDeskWindow::AddWindowContextMenus(BMenu *menu)
iconSizeMenu->Superitem()->SetTarget(PoseView()); iconSizeMenu->Superitem()->SetTarget(PoseView());
iconSizeMenu->Superitem()->SetMarked(PoseView()->ViewMode() == kIconMode); iconSizeMenu->Superitem()->SetMarked(PoseView()->ViewMode() == kIconMode);
item = new BMenuItem("Mini Icon View", new BMessage(kMiniIconMode), '2'); item = new BMenuItem("Mini icon view", new BMessage(kMiniIconMode), '2');
item->SetMarked(PoseView()->ViewMode() == kMiniIconMode); item->SetMarked(PoseView()->ViewMode() == kMiniIconMode);
menu->AddItem(item); menu->AddItem(item);
@@ -337,11 +337,11 @@ BDeskWindow::AddWindowContextMenus(BMenu *menu)
menu->AddItem(pasteItem = new BMenuItem("Paste", new BMessage(B_PASTE), 'V')); menu->AddItem(pasteItem = new BMenuItem("Paste", new BMessage(B_PASTE), 'V'));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
#endif #endif
menu->AddItem(new BMenuItem("Clean Up", new BMessage(kCleanup), 'K')); menu->AddItem(new BMenuItem("Clean up", new BMessage(kCleanup), 'K'));
menu->AddItem(new BMenuItem("Select"B_UTF8_ELLIPSIS, menu->AddItem(new BMenuItem("Select"B_UTF8_ELLIPSIS,
new BMessage(kShowSelectionWindow), 'A', B_SHIFT_KEY)); new BMessage(kShowSelectionWindow), 'A', B_SHIFT_KEY));
menu->AddItem(new BMenuItem("Select All", new BMessage(B_SELECT_ALL), 'A')); menu->AddItem(new BMenuItem("Select all", new BMessage(B_SELECT_ALL), 'A'));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(new MountMenu("Mount")); menu->AddItem(new MountMenu("Mount"));
@@ -366,7 +366,7 @@ BDeskWindow::AddTrashContextMenu()
new BMessage(kEmptyTrash))); new BMessage(kEmptyTrash)));
fTrashContextMenu->AddItem(new BMenuItem("Open", fTrashContextMenu->AddItem(new BMenuItem("Open",
new BMessage(kOpenSelection), 'O')); new BMessage(kOpenSelection), 'O'));
fTrashContextMenu->AddItem(new BMenuItem("Get Info", fTrashContextMenu->AddItem(new BMenuItem("Get info",
new BMessage(kGetInfo), 'I')); new BMessage(kGetInfo), 'I'));
fTrashContextMenu->SetTargetForItems(PoseView()); fTrashContextMenu->SetTargetForItems(PoseView());
} }
@@ -376,15 +376,15 @@ void
BDeskWindow::ShowContextMenu(BPoint loc, const entry_ref *ref, BView *view) BDeskWindow::ShowContextMenu(BPoint loc, const entry_ref *ref, BView *view)
{ {
BEntry entry; BEntry entry;
// cleanup previous entries // cleanup previous entries
DeleteSubmenu(fNavigationItem); DeleteSubmenu(fNavigationItem);
if (ref && entry.SetTo(ref) == B_OK && FSIsTrashDir(&entry)) { if (ref && entry.SetTo(ref) == B_OK && FSIsTrashDir(&entry)) {
if (fTrashContextMenu->Window() || Dragging()) if (fTrashContextMenu->Window() || Dragging())
return; return;
// selected item was trash, show the trash context menu instead // selected item was trash, show the trash context menu instead
BPoint global(loc); BPoint global(loc);
PoseView()->ConvertToScreen(&global); PoseView()->ConvertToScreen(&global);
@@ -392,7 +392,7 @@ BDeskWindow::ShowContextMenu(BPoint loc, const entry_ref *ref, BView *view)
BRect mouse_rect(global.x, global.y, global.x, global.y); BRect mouse_rect(global.x, global.y, global.x, global.y);
mouse_rect.InsetBy(-5, -5); mouse_rect.InsetBy(-5, -5);
EnableNamedMenuItem(fTrashContextMenu, kEmptyTrash, EnableNamedMenuItem(fTrashContextMenu, kEmptyTrash,
static_cast<TTracker *>(be_app)->TrashFull()); static_cast<TTracker *>(be_app)->TrashFull());
SetupNavigationMenu(ref, fTrashContextMenu); SetupNavigationMenu(ref, fTrashContextMenu);
@@ -402,7 +402,7 @@ BDeskWindow::ShowContextMenu(BPoint loc, const entry_ref *ref, BView *view)
} }
void void
BDeskWindow::WorkspaceActivated(int32 workspace, bool state) BDeskWindow::WorkspaceActivated(int32 workspace, bool state)
{ {
if (fBackgroundImage) if (fBackgroundImage)
@@ -410,7 +410,7 @@ BDeskWindow::WorkspaceActivated(int32 workspace, bool state)
} }
void void
BDeskWindow::SaveDesktopPoseLocations() BDeskWindow::SaveDesktopPoseLocations()
{ {
PoseView()->SavePoseLocations(&fOldFrame); PoseView()->SavePoseLocations(&fOldFrame);
@@ -435,7 +435,7 @@ BDeskWindow::ScreenChanged(BRect frame, color_space space)
} }
void void
BDeskWindow::UpdateDesktopBackgroundImages() BDeskWindow::UpdateDesktopBackgroundImages()
{ {
WindowStateNodeOpener opener(this, false); WindowStateNodeOpener opener(this, false);
+3 -3
View File
@@ -211,7 +211,7 @@ FavoritesMenu::AddNextItem()
if (item) { if (item) {
if (!fAddedSeparatorForSection) { if (!fAddedSeparatorForSection) {
fAddedSeparatorForSection = true; fAddedSeparatorForSection = true;
AddItem(new TitledSeparatorItem("Recent Documents")); AddItem(new TitledSeparatorItem("Recent documents"));
} }
AddItem(item); AddItem(item);
fSectionItemCount++; fSectionItemCount++;
@@ -259,7 +259,7 @@ FavoritesMenu::AddNextItem()
if (item) { if (item) {
if (!fAddedSeparatorForSection) { if (!fAddedSeparatorForSection) {
fAddedSeparatorForSection = true; fAddedSeparatorForSection = true;
AddItem(new TitledSeparatorItem("Recent Folders")); AddItem(new TitledSeparatorItem("Recent folders"));
} }
AddItem(item); AddItem(item);
item->SetEnabled(true); item->SetEnabled(true);
@@ -436,7 +436,7 @@ RecentsMenu::DoneBuildingItemList()
// //
if (CountItems() <= 0) { if (CountItems() <= 0) {
BMenuItem *item = new BMenuItem("<No Recent Items>", 0); BMenuItem *item = new BMenuItem("<No recent items>", 0);
item->SetEnabled(false); item->SetEnabled(false);
AddItem(item); AddItem(item);
} else } else
+14 -14
View File
@@ -600,9 +600,9 @@ TFilePanel::Init(const BMessage *)
FavoritesMenu *favorites = new FavoritesMenu("Favorites", FavoritesMenu *favorites = new FavoritesMenu("Favorites",
new BMessage(kSwitchDirectory), new BMessage(B_REFS_RECEIVED), new BMessage(kSwitchDirectory), new BMessage(B_REFS_RECEIVED),
BMessenger(this), IsSavePanel(), fPoseView->RefFilter()); BMessenger(this), IsSavePanel(), fPoseView->RefFilter());
favorites->AddItem(new BMenuItem("Add Current Folder", favorites->AddItem(new BMenuItem("Add current folder",
new BMessage(kAddCurrentDir))); new BMessage(kAddCurrentDir)));
favorites->AddItem(new BMenuItem("Edit Favorites"B_UTF8_ELLIPSIS, favorites->AddItem(new BMenuItem("Edit favorites"B_UTF8_ELLIPSIS,
new BMessage(kEditFavorites))); new BMessage(kEditFavorites)));
fMenuBar->AddItem(favorites); fMenuBar->AddItem(favorites);
@@ -847,8 +847,8 @@ TFilePanel::RestoreWindowState(const BMessage &message)
void void
TFilePanel::AddFileContextMenus(BMenu *menu) TFilePanel::AddFileContextMenus(BMenu *menu)
{ {
menu->AddItem(new BMenuItem("Get Info", new BMessage(kGetInfo), 'I')); menu->AddItem(new BMenuItem("Get info", new BMessage(kGetInfo), 'I'));
menu->AddItem(new BMenuItem("Edit Name", new BMessage(kEditItem), 'E')); menu->AddItem(new BMenuItem("Edit name", new BMessage(kEditItem), 'E'));
menu->AddItem(new BMenuItem(TrackerSettings().DontMoveFilesToTrash() ? menu->AddItem(new BMenuItem(TrackerSettings().DontMoveFilesToTrash() ?
"Delete" : "Move to Trash", "Delete" : "Move to Trash",
new BMessage(kMoveToTrash), 'T')); new BMessage(kMoveToTrash), 'T'));
@@ -865,8 +865,8 @@ void
TFilePanel::AddVolumeContextMenus(BMenu *menu) TFilePanel::AddVolumeContextMenus(BMenu *menu)
{ {
menu->AddItem(new BMenuItem("Open", new BMessage(kOpenSelection), 'O')); menu->AddItem(new BMenuItem("Open", new BMessage(kOpenSelection), 'O'));
menu->AddItem(new BMenuItem("Get Info", new BMessage(kGetInfo), 'I')); menu->AddItem(new BMenuItem("Get info", new BMessage(kGetInfo), 'I'));
menu->AddItem(new BMenuItem("Edit Name", new BMessage(kEditItem), 'E')); menu->AddItem(new BMenuItem("Edit name", new BMessage(kEditItem), 'E'));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(new BMenuItem("Cut", new BMessage(B_CUT), 'X')); menu->AddItem(new BMenuItem("Cut", new BMessage(B_CUT), 'X'));
menu->AddItem(new BMenuItem("Copy", new BMessage(B_COPY), 'C')); menu->AddItem(new BMenuItem("Copy", new BMessage(B_COPY), 'C'));
@@ -879,7 +879,7 @@ TFilePanel::AddVolumeContextMenus(BMenu *menu)
void void
TFilePanel::AddWindowContextMenus(BMenu *menu) TFilePanel::AddWindowContextMenus(BMenu *menu)
{ {
BMenuItem *item = new BMenuItem("New Folder", new BMessage(kNewFolder), 'N'); BMenuItem *item = new BMenuItem("New folder", new BMessage(kNewFolder), 'N');
item->SetTarget(PoseView()); item->SetTarget(PoseView());
menu->AddItem(item); menu->AddItem(item);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
@@ -894,15 +894,15 @@ TFilePanel::AddWindowContextMenus(BMenu *menu)
item->SetTarget(PoseView()); item->SetTarget(PoseView());
menu->AddItem(item); menu->AddItem(item);
item = new BMenuItem("Select All", new BMessage(B_SELECT_ALL), 'A'); item = new BMenuItem("Select all", new BMessage(B_SELECT_ALL), 'A');
item->SetTarget(PoseView()); item->SetTarget(PoseView());
menu->AddItem(item); menu->AddItem(item);
item = new BMenuItem("Invert Selection", new BMessage(kInvertSelection), 'S'); item = new BMenuItem("Invert selection", new BMessage(kInvertSelection), 'S');
item->SetTarget(PoseView()); item->SetTarget(PoseView());
menu->AddItem(item); menu->AddItem(item);
item = new BMenuItem("Go To Parent", new BMessage(kOpenParentDir), B_UP_ARROW); item = new BMenuItem("Go to parent", new BMessage(kOpenParentDir), B_UP_ARROW);
item->SetTarget(this); item->SetTarget(this);
menu->AddItem(item); menu->AddItem(item);
} }
@@ -1051,7 +1051,7 @@ TFilePanel::MessageReceived(BMessage *message)
// Don't allow saves of multiple files // Don't allow saves of multiple files
if (count > 1) { if (count > 1) {
ShowCenteredAlert("Sorry, saving of more than one item is not allowed.", ShowCenteredAlert("Sorry, saving more than one item is not allowed.",
"Cancel"); "Cancel");
} else { } else {
// if we are a savepanel, set up the filepanel correctly // if we are a savepanel, set up the filepanel correctly
@@ -1353,7 +1353,7 @@ TFilePanel::HandleSaveButton()
// check for some illegal file names // check for some illegal file names
if (strcmp(fTextControl->Text(), ".") == 0 if (strcmp(fTextControl->Text(), ".") == 0
|| strcmp(fTextControl->Text(), "..") == 0) { || strcmp(fTextControl->Text(), "..") == 0) {
ShowCenteredAlert("The name you have specified is illegal. Please type " ShowCenteredAlert("The specified name is illegal. Please choose "
"another name.", "Cancel"); "another name.", "Cancel");
fTextControl->TextView()->SelectAll(); fTextControl->TextView()->SelectAll();
return; return;
@@ -1367,8 +1367,8 @@ TFilePanel::HandleSaveButton()
if (dir.Contains(fTextControl->Text())) { if (dir.Contains(fTextControl->Text())) {
if (dir.Contains(fTextControl->Text(), B_DIRECTORY_NODE)) { if (dir.Contains(fTextControl->Text(), B_DIRECTORY_NODE)) {
ShowCenteredAlert("The name you have specified is already the name " ShowCenteredAlert("The specified name is already used as the name "
"of a folder. Please type another name.", "Cancel"); "of a folder. Please choose another name.", "Cancel");
fTextControl->TextView()->SelectAll(); fTextControl->TextView()->SelectAll();
return; return;
} else { } else {
+5 -5
View File
@@ -176,7 +176,7 @@ FindWindow::FindWindow(const entry_ref *newRef, bool editIfTemplateOnly)
if (BNodeInfo(fFile).GetType(type) == B_OK if (BNodeInfo(fFile).GetType(type) == B_OK
&& strcasecmp(type, B_QUERY_TEMPLATE_MIMETYPE) == 0) { && strcasecmp(type, B_QUERY_TEMPLATE_MIMETYPE) == 0) {
fEditTemplateOnly = true; fEditTemplateOnly = true;
SetTitle("Edit Query Template"); SetTitle("Edit Query template");
} }
} }
} else { } else {
@@ -626,7 +626,7 @@ FindWindow::MessageReceived(BMessage *message)
BMessenger panel(BackgroundView()); BMessenger panel(BackgroundView());
fSaveAsTemplatePanel = new BFilePanel(B_SAVE_PANEL, &panel); fSaveAsTemplatePanel = new BFilePanel(B_SAVE_PANEL, &panel);
fSaveAsTemplatePanel->SetSaveText("Query template"); fSaveAsTemplatePanel->SetSaveText("Query template");
fSaveAsTemplatePanel->Window()->SetTitle("Save As Query Template:"); fSaveAsTemplatePanel->Window()->SetTitle("Save as Query template:");
fSaveAsTemplatePanel->Show(); fSaveAsTemplatePanel->Show();
} }
break; break;
@@ -685,9 +685,9 @@ FindPanel::FindPanel(BRect frame, BFile *node, FindWindow *parent,
// add popup for search criteria // add popup for search criteria
fSearchModeMenu = new BPopUpMenu("searchMode"); fSearchModeMenu = new BPopUpMenu("searchMode");
fSearchModeMenu->AddItem(new BMenuItem("by Name", new BMessage(kByNameItem))); fSearchModeMenu->AddItem(new BMenuItem("by name", new BMessage(kByNameItem)));
fSearchModeMenu->AddItem(new BMenuItem("by Attribute", new BMessage(kByAttributeItem))); fSearchModeMenu->AddItem(new BMenuItem("by attribute", new BMessage(kByAttributeItem)));
fSearchModeMenu->AddItem(new BMenuItem("by Formula", new BMessage(kByFormulaItem))); fSearchModeMenu->AddItem(new BMenuItem("by formula", new BMessage(kByFormulaItem)));
fSearchModeMenu->ItemAt(initialMode == kByNameItem ? 0 : fSearchModeMenu->ItemAt(initialMode == kByNameItem ? 0 :
(initialMode == kByAttributeItem ? 1 : 2))->SetMarked(true); (initialMode == kByAttributeItem ? 1 : 2))->SetMarked(true);
+4 -4
View File
@@ -908,7 +908,7 @@ AttributeView::AttributeView(BRect rect, Model *model)
// Add the default menu item and set it to marked // Add the default menu item and set it to marked
BMenuItem *result; BMenuItem *result;
result = new BMenuItem("Default Application", new BMessage(kSetPreferredApp)); result = new BMenuItem("Default application", new BMessage(kSetPreferredApp));
result->SetTarget(this); result->SetTarget(this);
fPreferredAppMenu->Menu()->AddItem(result); fPreferredAppMenu->Menu()->AddItem(result);
result->SetMarked(true); result->SetMarked(true);
@@ -1767,7 +1767,7 @@ AttributeView::Draw(BRect)
// Link to/version // Link to/version
if (fModel->IsSymLink()) { if (fModel->IsSymLink()) {
MovePenTo(BPoint(fDivider - (StringWidth("Link To:")), lineBase)); MovePenTo(BPoint(fDivider - (StringWidth("Link to:")), lineBase));
SetHighColor(kAttrTitleColor); SetHighColor(kAttrTitleColor);
DrawString("Link To:"); DrawString("Link To:");
MovePenTo(BPoint(fDivider + kDrawMargin, lineBase)); MovePenTo(BPoint(fDivider + kDrawMargin, lineBase));
@@ -2020,7 +2020,7 @@ AttributeView::BuildContextMenu(BMenu *parent)
parent->AddItem(new BMenuItem("Open", new BMessage(kOpenSelection), 'O')); parent->AddItem(new BMenuItem("Open", new BMessage(kOpenSelection), 'O'));
if (!FSIsTrashDir(&entry)) { if (!FSIsTrashDir(&entry)) {
parent->AddItem(new BMenuItem("Edit Name", new BMessage(kEditItem), 'E')); parent->AddItem(new BMenuItem("Edit name", new BMessage(kEditItem), 'E'));
parent->AddSeparatorItem(); parent->AddSeparatorItem();
if (fModel->IsVolume()) { if (fModel->IsVolume()) {
BMenuItem *item; BMenuItem *item;
@@ -2039,7 +2039,7 @@ AttributeView::BuildContextMenu(BMenu *parent)
BMenuItem *sizeItem = NULL; BMenuItem *sizeItem = NULL;
if (model.IsDirectory() && !model.IsVolume() && !model.IsRoot()) { if (model.IsDirectory() && !model.IsVolume() && !model.IsRoot()) {
parent->AddItem(sizeItem = new BMenuItem("Recalculate Folder Size", parent->AddItem(sizeItem = new BMenuItem("Recalculate folder size",
new BMessage(kRecalculateSize))); new BMessage(kRecalculateSize)));
} }
+1 -1
View File
@@ -214,7 +214,7 @@ MountMenu::AddDynamicItem(add_state)
AddSeparatorItem(); AddSeparatorItem();
BMenuItem *mountAll = new BMenuItem("Mount All", BMenuItem *mountAll = new BMenuItem("Mount all",
new BMessage(kMountAllNow)); new BMessage(kMountAllNow));
AddItem(mountAll); AddItem(mountAll);
BMenuItem *mountSettings = new BMenuItem("Settings" B_UTF8_ELLIPSIS, BMenuItem *mountSettings = new BMenuItem("Settings" B_UTF8_ELLIPSIS,
+1 -1
View File
@@ -706,7 +706,7 @@ BNavMenu::DoneBuildingItemList()
fItemList->MakeEmpty(); fItemList->MakeEmpty();
if (!count) { if (!count) {
BMenuItem *item = new BMenuItem("Empty Folder", 0); BMenuItem *item = new BMenuItem("Empty folder", 0);
item->SetEnabled(false); item->SetEnabled(false);
AddItem(item); AddItem(item);
} }
+3 -3
View File
@@ -102,7 +102,7 @@ OpenWithContainerWindow::OpenWithContainerWindow(BMessage *entriesToOpen,
BRect buttonRect = fLaunchButton->Frame(); BRect buttonRect = fLaunchButton->Frame();
fLaunchAndMakeDefaultButton = new BButton(buttonRect, "make default", fLaunchAndMakeDefaultButton = new BButton(buttonRect, "make default",
"Open and Make Preferred", new BMessage(kOpenAndMakeDefault), "Open and make preferred", new BMessage(kOpenAndMakeDefault),
B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM); B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM);
// wide button, have to resize to fit text // wide button, have to resize to fit text
fLaunchAndMakeDefaultButton->ResizeToPreferred(); fLaunchAndMakeDefaultButton->ResizeToPreferred();
@@ -143,11 +143,11 @@ OpenWithContainerWindow::OpenWithContainerWindow(BMessage *entriesToOpen,
entry_ref ref; entry_ref ref;
fEntriesToOpen->FindRef("refs", &ref); fEntriesToOpen->FindRef("refs", &ref);
BString buffer; BString buffer;
buffer << "Open " << ref.name << " With:"; buffer << "Open " << ref.name << " with:";
SetTitle(buffer.String()); SetTitle(buffer.String());
} else } else
// use generic title // use generic title
SetTitle("Open Selection With:"); SetTitle("Open selection with:");
AddCommonFilter(new BMessageFilter(B_KEY_DOWN, &OpenWithContainerWindow::KeyDownFilter)); AddCommonFilter(new BMessageFilter(B_KEY_DOWN, &OpenWithContainerWindow::KeyDownFilter));
} }
+1 -1
View File
@@ -2447,7 +2447,7 @@ BPoseView::RemoveColumn(BColumn *columnToRemove, bool runAlert)
if (CountColumns() == 1) { if (CountColumns() == 1) {
if (runAlert) { if (runAlert) {
BAlert *alert = new BAlert("", BAlert *alert = new BAlert("",
"You must have at least one Attribute showing.", "You must have at least one attribute showing.",
"Cancel", 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT); "Cancel", 0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
alert->SetShortcut(0, B_ESCAPE); alert->SetShortcut(0, B_ESCAPE);
alert->Go(); alert->Go();
+4 -4
View File
@@ -85,7 +85,7 @@ BQueryContainerWindow::AddWindowMenu(BMenu *menu)
{ {
BMenuItem *item; BMenuItem *item;
item = new BMenuItem("Resize to Fit", new BMessage(kResizeToFit), 'Y'); item = new BMenuItem("Resize to fit", new BMessage(kResizeToFit), 'Y');
item->SetTarget(this); item->SetTarget(this);
menu->AddItem(item); menu->AddItem(item);
@@ -93,11 +93,11 @@ BQueryContainerWindow::AddWindowMenu(BMenu *menu)
item->SetTarget(PoseView()); item->SetTarget(PoseView());
menu->AddItem(item); menu->AddItem(item);
item = new BMenuItem("Select All", new BMessage(B_SELECT_ALL), 'A'); item = new BMenuItem("Select all", new BMessage(B_SELECT_ALL), 'A');
item->SetTarget(PoseView()); item->SetTarget(PoseView());
menu->AddItem(item); menu->AddItem(item);
item = new BMenuItem("Invert Selection", new BMessage(kInvertSelection), 'S'); item = new BMenuItem("Invert selection", new BMessage(kInvertSelection), 'S');
item->SetTarget(PoseView()); item->SetTarget(PoseView());
menu->AddItem(item); menu->AddItem(item);
@@ -114,7 +114,7 @@ BQueryContainerWindow::AddWindowContextMenus(BMenu *menu)
new BMessage(kResizeToFit), 'Y'); new BMessage(kResizeToFit), 'Y');
menu->AddItem(resizeItem); menu->AddItem(resizeItem);
menu->AddItem(new BMenuItem("Select"B_UTF8_ELLIPSIS, new BMessage(kShowSelectionWindow), 'A', B_SHIFT_KEY)); menu->AddItem(new BMenuItem("Select"B_UTF8_ELLIPSIS, new BMessage(kShowSelectionWindow), 'A', B_SHIFT_KEY));
menu->AddItem(new BMenuItem("Select All", new BMessage(B_SELECT_ALL), 'A')); menu->AddItem(new BMenuItem("Select all", new BMessage(B_SELECT_ALL), 'A'));
BMenuItem *closeItem = new BMenuItem("Close", BMenuItem *closeItem = new BMenuItem("Close",
new BMessage(B_QUIT_REQUESTED), 'W'); new BMessage(B_QUIT_REQUESTED), 'W');
menu->AddItem(closeItem); menu->AddItem(closeItem);
+22 -22
View File
@@ -164,7 +164,7 @@ DesktopSettingsView::DesktopSettingsView(BRect rect)
: SettingsView(rect, "DesktopSettingsView") : SettingsView(rect, "DesktopSettingsView")
{ {
rect.OffsetTo(B_ORIGIN); rect.OffsetTo(B_ORIGIN);
fShowDisksIconRadioButton = new BRadioButton(rect, "", "Show Disks Icon", fShowDisksIconRadioButton = new BRadioButton(rect, "", "Show Disks icon",
new BMessage(kShowDisksIconChanged)); new BMessage(kShowDisksIconChanged));
fShowDisksIconRadioButton->ResizeToPreferred(); fShowDisksIconRadioButton->ResizeToPreferred();
AddChild(fShowDisksIconRadioButton); AddChild(fShowDisksIconRadioButton);
@@ -173,14 +173,14 @@ DesktopSettingsView::DesktopSettingsView(BRect rect)
rect.OffsetBy(0, itemSpacing); rect.OffsetBy(0, itemSpacing);
fMountVolumesOntoDesktopRadioButton = new BRadioButton(rect, "", fMountVolumesOntoDesktopRadioButton = new BRadioButton(rect, "",
"Show Volumes on Desktop", new BMessage(kVolumesOnDesktopChanged)); "Show volumes on Desktop", new BMessage(kVolumesOnDesktopChanged));
AddChild(fMountVolumesOntoDesktopRadioButton); AddChild(fMountVolumesOntoDesktopRadioButton);
fMountVolumesOntoDesktopRadioButton->ResizeToPreferred(); fMountVolumesOntoDesktopRadioButton->ResizeToPreferred();
rect.OffsetBy(20, itemSpacing); rect.OffsetBy(20, itemSpacing);
fMountSharedVolumesOntoDesktopCheckBox = new BCheckBox(rect, "", fMountSharedVolumesOntoDesktopCheckBox = new BCheckBox(rect, "",
"Show Shared Volumes On Desktop", new BMessage(kVolumesOnDesktopChanged)); "Show shared volumes on Desktop", new BMessage(kVolumesOnDesktopChanged));
AddChild(fMountSharedVolumesOntoDesktopCheckBox); AddChild(fMountSharedVolumesOntoDesktopCheckBox);
fMountSharedVolumesOntoDesktopCheckBox->ResizeToPreferred(); fMountSharedVolumesOntoDesktopCheckBox->ResizeToPreferred();
@@ -188,7 +188,7 @@ DesktopSettingsView::DesktopSettingsView(BRect rect)
rect = Bounds(); rect = Bounds();
rect.top = rect.bottom; rect.top = rect.bottom;
fMountButton = new BButton(rect, "", "Mount Settings" B_UTF8_ELLIPSIS, fMountButton = new BButton(rect, "", "Mount settings" B_UTF8_ELLIPSIS,
new BMessage(kRunAutomounterSettings), B_FOLLOW_LEFT | B_FOLLOW_BOTTOM); new BMessage(kRunAutomounterSettings), B_FOLLOW_LEFT | B_FOLLOW_BOTTOM);
fMountButton->ResizeToPreferred(); fMountButton->ResizeToPreferred();
fMountButton->MoveBy(0, -fMountButton->Bounds().Height()); fMountButton->MoveBy(0, -fMountButton->Bounds().Height());
@@ -409,7 +409,7 @@ WindowsSettingsView::WindowsSettingsView(BRect rect)
: SettingsView(rect, "WindowsSettingsView") : SettingsView(rect, "WindowsSettingsView")
{ {
rect.OffsetTo(B_ORIGIN); rect.OffsetTo(B_ORIGIN);
fShowFullPathInTitleBarCheckBox = new BCheckBox(rect, "", "Show Folder Location in Title Bar", fShowFullPathInTitleBarCheckBox = new BCheckBox(rect, "", "Show folder location in title tab",
new BMessage(kWindowsShowFullPathChanged)); new BMessage(kWindowsShowFullPathChanged));
fShowFullPathInTitleBarCheckBox->ResizeToPreferred(); fShowFullPathInTitleBarCheckBox->ResizeToPreferred();
AddChild(fShowFullPathInTitleBarCheckBox); AddChild(fShowFullPathInTitleBarCheckBox);
@@ -417,28 +417,28 @@ WindowsSettingsView::WindowsSettingsView(BRect rect)
const float itemSpacing = fShowFullPathInTitleBarCheckBox->Bounds().Height() + kItemExtraSpacing; const float itemSpacing = fShowFullPathInTitleBarCheckBox->Bounds().Height() + kItemExtraSpacing;
rect.OffsetBy(0, itemSpacing); rect.OffsetBy(0, itemSpacing);
fSingleWindowBrowseCheckBox = new BCheckBox(rect, "", "Single Window Navigation", fSingleWindowBrowseCheckBox = new BCheckBox(rect, "", "Single window navigation",
new BMessage(kSingleWindowBrowseChanged)); new BMessage(kSingleWindowBrowseChanged));
fSingleWindowBrowseCheckBox->ResizeToPreferred(); fSingleWindowBrowseCheckBox->ResizeToPreferred();
AddChild(fSingleWindowBrowseCheckBox); AddChild(fSingleWindowBrowseCheckBox);
rect.OffsetBy(20, itemSpacing); rect.OffsetBy(20, itemSpacing);
fShowNavigatorCheckBox = new BCheckBox(rect, "", "Show Navigator", fShowNavigatorCheckBox = new BCheckBox(rect, "", "Show navigator",
new BMessage(kShowNavigatorChanged)); new BMessage(kShowNavigatorChanged));
fShowNavigatorCheckBox->ResizeToPreferred(); fShowNavigatorCheckBox->ResizeToPreferred();
AddChild(fShowNavigatorCheckBox); AddChild(fShowNavigatorCheckBox);
rect.OffsetBy(-20, itemSpacing); rect.OffsetBy(-20, itemSpacing);
fOutlineSelectionCheckBox = new BCheckBox(rect, "", "Outline Selection Rectangle Only", fOutlineSelectionCheckBox = new BCheckBox(rect, "", "Outline selection rectangle only",
new BMessage(kTransparentSelectionChanged)); new BMessage(kTransparentSelectionChanged));
fOutlineSelectionCheckBox->ResizeToPreferred(); fOutlineSelectionCheckBox->ResizeToPreferred();
AddChild(fOutlineSelectionCheckBox); AddChild(fOutlineSelectionCheckBox);
rect.OffsetBy(0, itemSpacing); rect.OffsetBy(0, itemSpacing);
fSortFolderNamesFirstCheckBox = new BCheckBox(rect, "", "List Folders First", fSortFolderNamesFirstCheckBox = new BCheckBox(rect, "", "List folders first",
new BMessage(kSortFolderNamesFirstChanged)); new BMessage(kSortFolderNamesFirstChanged));
fSortFolderNamesFirstCheckBox->ResizeToPreferred(); fSortFolderNamesFirstCheckBox->ResizeToPreferred();
AddChild(fSortFolderNamesFirstCheckBox); AddChild(fSortFolderNamesFirstCheckBox);
@@ -686,7 +686,7 @@ TimeFormatSettingsView::TimeFormatSettingsView(BRect rect)
rect.left = 8; rect.left = 8;
rect.top = rect.bottom - 8; rect.top = rect.bottom - 8;
f24HrRadioButton = new BRadioButton(rect, "", "24 Hour", f24HrRadioButton = new BRadioButton(rect, "", "24 hour",
new BMessage(kSettingsContentsModified)); new BMessage(kSettingsContentsModified));
f24HrRadioButton->ResizeToPreferred(); f24HrRadioButton->ResizeToPreferred();
clockBox->AddChild(f24HrRadioButton); clockBox->AddChild(f24HrRadioButton);
@@ -694,7 +694,7 @@ TimeFormatSettingsView::TimeFormatSettingsView(BRect rect)
const float itemSpacing = f24HrRadioButton->Bounds().Height() + kItemExtraSpacing; const float itemSpacing = f24HrRadioButton->Bounds().Height() + kItemExtraSpacing;
rect.OffsetBy(0, itemSpacing); rect.OffsetBy(0, itemSpacing);
f12HrRadioButton = new BRadioButton(rect, "", "12 Hour", f12HrRadioButton = new BRadioButton(rect, "", "12 hour",
new BMessage(kSettingsContentsModified)); new BMessage(kSettingsContentsModified));
f12HrRadioButton->ResizeToPreferred(); f12HrRadioButton->ResizeToPreferred();
clockBox->AddChild(f12HrRadioButton); clockBox->AddChild(f12HrRadioButton);
@@ -705,26 +705,26 @@ TimeFormatSettingsView::TimeFormatSettingsView(BRect rect)
rect = clockBox->Frame(); rect = clockBox->Frame();
rect.OffsetBy(rect.Width() + 8, 0); rect.OffsetBy(rect.Width() + 8, 0);
BBox *dateFormatBox = new BBox(rect, "Date Order"); BBox *dateFormatBox = new BBox(rect, "Date order");
dateFormatBox->SetLabel("Date Order"); dateFormatBox->SetLabel("Date order");
AddChild(dateFormatBox); AddChild(dateFormatBox);
rect = f24HrRadioButton->Frame(); rect = f24HrRadioButton->Frame();
fYMDRadioButton = new BRadioButton(rect, "", "Year-Month-Day", fYMDRadioButton = new BRadioButton(rect, "", "Year-month-day",
new BMessage(kSettingsContentsModified)); new BMessage(kSettingsContentsModified));
fYMDRadioButton->ResizeToPreferred(); fYMDRadioButton->ResizeToPreferred();
dateFormatBox->AddChild(fYMDRadioButton); dateFormatBox->AddChild(fYMDRadioButton);
rect.OffsetBy(0, itemSpacing); rect.OffsetBy(0, itemSpacing);
fDMYRadioButton = new BRadioButton(rect, "", "Day-Month-Year", fDMYRadioButton = new BRadioButton(rect, "", "Day-month-year",
new BMessage(kSettingsContentsModified)); new BMessage(kSettingsContentsModified));
fDMYRadioButton->ResizeToPreferred(); fDMYRadioButton->ResizeToPreferred();
dateFormatBox->AddChild(fDMYRadioButton); dateFormatBox->AddChild(fDMYRadioButton);
rect.OffsetBy(0, itemSpacing); rect.OffsetBy(0, itemSpacing);
fMDYRadioButton = new BRadioButton(rect, "", "Month-Day-Year", fMDYRadioButton = new BRadioButton(rect, "", "Month-day-year",
new BMessage(kSettingsContentsModified)); new BMessage(kSettingsContentsModified));
fMDYRadioButton->ResizeToPreferred(); fMDYRadioButton->ResizeToPreferred();
dateFormatBox->AddChild(fMDYRadioButton); dateFormatBox->AddChild(fMDYRadioButton);
@@ -1019,7 +1019,7 @@ SpaceBarSettingsView::SpaceBarSettingsView(BRect rect)
: SettingsView(rect, "SpaceBarSettingsView") : SettingsView(rect, "SpaceBarSettingsView")
{ {
rect.OffsetTo(B_ORIGIN); rect.OffsetTo(B_ORIGIN);
fSpaceBarShowCheckBox = new BCheckBox(rect, "", "Show Space Bars on Volumes", fSpaceBarShowCheckBox = new BCheckBox(rect, "", "Show space bars on volumes",
new BMessage(kUpdateVolumeSpaceBar)); new BMessage(kUpdateVolumeSpaceBar));
fSpaceBarShowCheckBox->ResizeToPreferred(); fSpaceBarShowCheckBox->ResizeToPreferred();
AddChild(fSpaceBarShowCheckBox); AddChild(fSpaceBarShowCheckBox);
@@ -1031,11 +1031,11 @@ SpaceBarSettingsView::SpaceBarSettingsView(BRect rect)
menu->SetFont(be_plain_font); menu->SetFont(be_plain_font);
BMenuItem *item; BMenuItem *item;
menu->AddItem(item = new BMenuItem("Used Space Color", new BMessage(kSpaceBarSwitchColor))); menu->AddItem(item = new BMenuItem("Used space color", new BMessage(kSpaceBarSwitchColor)));
item->SetMarked(true); item->SetMarked(true);
fCurrentColor = 0; fCurrentColor = 0;
menu->AddItem(new BMenuItem("Free Space Color", new BMessage(kSpaceBarSwitchColor))); menu->AddItem(new BMenuItem("Free space color", new BMessage(kSpaceBarSwitchColor)));
menu->AddItem(new BMenuItem("Warning Space Color", new BMessage(kSpaceBarSwitchColor))); menu->AddItem(new BMenuItem("Warning space color", new BMessage(kSpaceBarSwitchColor)));
BBox *box = new BBox(rect); BBox *box = new BBox(rect);
box->SetLabel(fColorPicker = new BMenuField(rect, NULL, NULL, menu)); box->SetLabel(fColorPicker = new BMenuField(rect, NULL, NULL, menu));
@@ -1269,7 +1269,7 @@ TrashSettingsView::TrashSettingsView(BRect rect)
: SettingsView(rect, "TrashSettingsView") : SettingsView(rect, "TrashSettingsView")
{ {
rect.OffsetTo(B_ORIGIN); rect.OffsetTo(B_ORIGIN);
fDontMoveFilesToTrashCheckBox = new BCheckBox(rect, "", "Don't Move Files to Trash", fDontMoveFilesToTrashCheckBox = new BCheckBox(rect, "", "Don't move files to Trash",
new BMessage(kDontMoveFilesToTrashChanged)); new BMessage(kDontMoveFilesToTrashChanged));
fDontMoveFilesToTrashCheckBox->ResizeToPreferred(); fDontMoveFilesToTrashCheckBox->ResizeToPreferred();
AddChild(fDontMoveFilesToTrashCheckBox); AddChild(fDontMoveFilesToTrashCheckBox);
@@ -1277,7 +1277,7 @@ TrashSettingsView::TrashSettingsView(BRect rect)
rect = fDontMoveFilesToTrashCheckBox->Frame(); rect = fDontMoveFilesToTrashCheckBox->Frame();
rect.OffsetBy(0, fDontMoveFilesToTrashCheckBox->Bounds().Height() + kItemExtraSpacing); rect.OffsetBy(0, fDontMoveFilesToTrashCheckBox->Bounds().Height() + kItemExtraSpacing);
fAskBeforeDeleteFileCheckBox = new BCheckBox(rect, "", "Ask Before Delete", fAskBeforeDeleteFileCheckBox = new BCheckBox(rect, "", "Ask before delete",
new BMessage(kAskBeforeDeleteFileChanged)); new BMessage(kAskBeforeDeleteFileChanged));
fAskBeforeDeleteFileCheckBox->ResizeToPreferred(); fAskBeforeDeleteFileCheckBox->ResizeToPreferred();
AddChild(fAskBeforeDeleteFileCheckBox); AddChild(fAskBeforeDeleteFileCheckBox);
+1 -1
View File
@@ -498,7 +498,7 @@ BSlowContextMenu::DoneBuildingItemList()
fItemList->MakeEmpty(); fItemList->MakeEmpty();
if (!count) { if (!count) {
BMenuItem *item = new BMenuItem("Empty Folder", 0); BMenuItem *item = new BMenuItem("Empty folder", 0);
item->SetEnabled(false); item->SetEnabled(false);
AddItem(item); AddItem(item);
} }
+2 -2
View File
@@ -55,7 +55,7 @@ namespace BPrivate {
const char *kTemplatesDirectory = "Tracker/Tracker New Templates"; const char *kTemplatesDirectory = "Tracker/Tracker New Templates";
const char *kTemplatesMenuName = "New"; const char *kTemplatesMenuName = "New";
static const char *kOpenTemplatesMenuName = "Edit Templates"B_UTF8_ELLIPSIS; static const char *kOpenTemplatesMenuName = "Edit templates"B_UTF8_ELLIPSIS;
} }
@@ -112,7 +112,7 @@ TemplatesMenu::BuildMenu(bool addItems)
delete RemoveItem(0L); delete RemoveItem(0L);
// Add the Folder // Add the Folder
IconMenuItem *menuItem = new IconMenuItem("New Folder", new BMessage(kNewFolder), IconMenuItem *menuItem = new IconMenuItem("New folder", new BMessage(kNewFolder),
B_DIR_MIMETYPE,B_MINI_ICON); B_DIR_MIMETYPE,B_MINI_ICON);
AddItem(menuItem); AddItem(menuItem);
menuItem->SetShortcut('N', 0); menuItem->SetShortcut('N', 0);
+10 -10
View File
@@ -404,7 +404,7 @@ TTracker::InitMimeTypes()
"Folder container for file system items.", kTrackerSignature); "Folder container for file system items.", kTrackerSignature);
InstallMimeIfNeeded(B_APP_MIME_TYPE, kResAppIcon, "Be Application", InstallMimeIfNeeded(B_APP_MIME_TYPE, kResAppIcon, "Be Application",
"Generic Be Application executable.", kTrackerSignature); "Generic Be application executable.", kTrackerSignature);
InstallMimeIfNeeded(B_FILE_MIMETYPE, kResFileIcon, InstallMimeIfNeeded(B_FILE_MIMETYPE, kResFileIcon,
"Generic file", "Generic document file.", kTrackerSignature); "Generic file", "Generic document file.", kTrackerSignature);
@@ -416,9 +416,9 @@ TTracker::InitMimeTypes()
"Be Query", "Query to locate items on disks.", kTrackerSignature); "Be Query", "Query to locate items on disks.", kTrackerSignature);
InstallMimeIfNeeded(B_QUERY_TEMPLATE_MIMETYPE, kResQueryTemplateIcon, InstallMimeIfNeeded(B_QUERY_TEMPLATE_MIMETYPE, kResQueryTemplateIcon,
"Be Query Template", "", kTrackerSignature); "Be Query template", "", kTrackerSignature);
InstallMimeIfNeeded(B_LINK_MIMETYPE, kResBrokenLinkIcon, "Symbolic Link", InstallMimeIfNeeded(B_LINK_MIMETYPE, kResBrokenLinkIcon, "Symbolic link",
"Link to another item in the file system.", kTrackerSignature); "Link to another item in the file system.", kTrackerSignature);
InstallMimeIfNeeded(B_ROOT_MIMETYPE, kResRootIcon, InstallMimeIfNeeded(B_ROOT_MIMETYPE, kResRootIcon,
@@ -444,7 +444,7 @@ TTracker::InitMimeTypes()
{ {
ExtraAttributeLazyInstaller installer(B_PERSON_MIMETYPE); ExtraAttributeLazyInstaller installer(B_PERSON_MIMETYPE);
installer.AddExtraAttribute("Contact Name", kAttrName, B_STRING_TYPE, true, true, installer.AddExtraAttribute("Contact name", kAttrName, B_STRING_TYPE, true, true,
120, B_ALIGN_LEFT, false); 120, B_ALIGN_LEFT, false);
installer.AddExtraAttribute("Company", kAttrCompany, B_STRING_TYPE, true, true, installer.AddExtraAttribute("Company", kAttrCompany, B_STRING_TYPE, true, true,
120, B_ALIGN_LEFT, false); 120, B_ALIGN_LEFT, false);
@@ -460,9 +460,9 @@ TTracker::InitMimeTypes()
120, B_ALIGN_LEFT, false); 120, B_ALIGN_LEFT, false);
installer.AddExtraAttribute("E-mail", kAttrEmail, B_STRING_TYPE, true, true, installer.AddExtraAttribute("E-mail", kAttrEmail, B_STRING_TYPE, true, true,
120, B_ALIGN_LEFT, false); 120, B_ALIGN_LEFT, false);
installer.AddExtraAttribute("Home Phone", kAttrHomePhone, B_STRING_TYPE, true, true, installer.AddExtraAttribute("Home phone", kAttrHomePhone, B_STRING_TYPE, true, true,
90, B_ALIGN_LEFT, false); 90, B_ALIGN_LEFT, false);
installer.AddExtraAttribute("Work Phone", kAttrWorkPhone, B_STRING_TYPE, true, true, installer.AddExtraAttribute("Work phone", kAttrWorkPhone, B_STRING_TYPE, true, true,
90, B_ALIGN_LEFT, false); 90, B_ALIGN_LEFT, false);
installer.AddExtraAttribute("Fax", kAttrFax, B_STRING_TYPE, true, true, installer.AddExtraAttribute("Fax", kAttrFax, B_STRING_TYPE, true, true,
90, B_ALIGN_LEFT, false); 90, B_ALIGN_LEFT, false);
@@ -482,21 +482,21 @@ TTracker::InitMimeTypes()
ExtraAttributeLazyInstaller installer(B_PRINTER_SPOOL_MIMETYPE); ExtraAttributeLazyInstaller installer(B_PRINTER_SPOOL_MIMETYPE);
installer.AddExtraAttribute("Status", PSRV_SPOOL_ATTR_STATUS, B_STRING_TYPE, true, false, installer.AddExtraAttribute("Status", PSRV_SPOOL_ATTR_STATUS, B_STRING_TYPE, true, false,
60, B_ALIGN_LEFT, false); 60, B_ALIGN_LEFT, false);
installer.AddExtraAttribute("Page Count", PSRV_SPOOL_ATTR_PAGECOUNT, B_INT32_TYPE, true, false, installer.AddExtraAttribute("Page count", PSRV_SPOOL_ATTR_PAGECOUNT, B_INT32_TYPE, true, false,
40, B_ALIGN_RIGHT, false); 40, B_ALIGN_RIGHT, false);
installer.AddExtraAttribute("Description", PSRV_SPOOL_ATTR_DESCRIPTION, B_STRING_TYPE, true, true, installer.AddExtraAttribute("Description", PSRV_SPOOL_ATTR_DESCRIPTION, B_STRING_TYPE, true, true,
100, B_ALIGN_LEFT, false); 100, B_ALIGN_LEFT, false);
installer.AddExtraAttribute("Printer Name", PSRV_SPOOL_ATTR_PRINTER, B_STRING_TYPE, true, false, installer.AddExtraAttribute("Printer name", PSRV_SPOOL_ATTR_PRINTER, B_STRING_TYPE, true, false,
80, B_ALIGN_LEFT, false); 80, B_ALIGN_LEFT, false);
installer.AddExtraAttribute("Job creator type", PSRV_SPOOL_ATTR_MIMETYPE, B_ASCII_TYPE, true, false, installer.AddExtraAttribute("Job creator type", PSRV_SPOOL_ATTR_MIMETYPE, B_ASCII_TYPE, true, false,
60, B_ALIGN_LEFT, false); 60, B_ALIGN_LEFT, false);
#else #else
ExtraAttributeLazyInstaller installer(B_PRINTER_SPOOL_MIMETYPE); ExtraAttributeLazyInstaller installer(B_PRINTER_SPOOL_MIMETYPE);
installer.AddExtraAttribute("Page Count", "_spool/Page Count", B_INT32_TYPE, true, false, installer.AddExtraAttribute("Page count", "_spool/Page Count", B_INT32_TYPE, true, false,
40, B_ALIGN_RIGHT, false); 40, B_ALIGN_RIGHT, false);
installer.AddExtraAttribute("Description", "_spool/Description", B_ASCII_TYPE, true, true, installer.AddExtraAttribute("Description", "_spool/Description", B_ASCII_TYPE, true, true,
100, B_ALIGN_LEFT, false); 100, B_ALIGN_LEFT, false);
installer.AddExtraAttribute("Printer Name", "_spool/Printer", B_ASCII_TYPE, true, false, installer.AddExtraAttribute("Printer name", "_spool/Printer", B_ASCII_TYPE, true, false,
80, B_ALIGN_LEFT, false); 80, B_ALIGN_LEFT, false);
installer.AddExtraAttribute("Job creator type", "_spool/MimeType", B_ASCII_TYPE, true, false, installer.AddExtraAttribute("Job creator type", "_spool/MimeType", B_ASCII_TYPE, true, false,
60, B_ALIGN_LEFT, false); 60, B_ALIGN_LEFT, false);
+3 -3
View File
@@ -64,7 +64,7 @@ const uint32 kRevertButtonPressed = 'Rebp';
TrackerSettingsWindow::TrackerSettingsWindow() TrackerSettingsWindow::TrackerSettingsWindow()
: BWindow(BRect(80, 80, 450, 350), "Tracker Preferences", B_TITLED_WINDOW, : BWindow(BRect(80, 80, 450, 350), "Tracker preferences", B_TITLED_WINDOW,
B_NOT_MINIMIZABLE | B_NOT_RESIZABLE | B_NO_WORKSPACE_ACTIVATION B_NOT_MINIMIZABLE | B_NOT_RESIZABLE | B_NO_WORKSPACE_ACTIVATION
| B_NOT_ANCHORED_ON_ACTIVATE | B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE) | B_NOT_ANCHORED_ON_ACTIVATE | B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE)
{ {
@@ -113,11 +113,11 @@ TrackerSettingsWindow::TrackerSettingsWindow()
new DesktopSettingsView(rect))); new DesktopSettingsView(rect)));
fSettingsTypeListView->AddItem(new SettingsItem("Windows", fSettingsTypeListView->AddItem(new SettingsItem("Windows",
new WindowsSettingsView(rect))); new WindowsSettingsView(rect)));
fSettingsTypeListView->AddItem(new SettingsItem("Date and Time", fSettingsTypeListView->AddItem(new SettingsItem("Date & Time",
new TimeFormatSettingsView(rect))); new TimeFormatSettingsView(rect)));
fSettingsTypeListView->AddItem(new SettingsItem("Trash", fSettingsTypeListView->AddItem(new SettingsItem("Trash",
new TrashSettingsView(rect))); new TrashSettingsView(rect)));
fSettingsTypeListView->AddItem(new SettingsItem("Volume Icons", fSettingsTypeListView->AddItem(new SettingsItem("Volume icons",
new SpaceBarSettingsView(rect))); new SpaceBarSettingsView(rect)));
// compute preferred view size // compute preferred view size
+11 -11
View File
@@ -93,14 +93,14 @@ BVolumeWindow::AddFileMenu(BMenu *menu)
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(new BMenuItem("Open", new BMessage(kOpenSelection), 'O')); menu->AddItem(new BMenuItem("Open", new BMessage(kOpenSelection), 'O'));
menu->AddItem(new BMenuItem("Get Info", new BMessage(kGetInfo), 'I')); menu->AddItem(new BMenuItem("Get info", new BMessage(kGetInfo), 'I'));
menu->AddItem(new BMenuItem("Edit Name", new BMessage(kEditItem), 'E')); menu->AddItem(new BMenuItem("Edit name", new BMessage(kEditItem), 'E'));
BMenuItem *item = new BMenuItem("Unmount", new BMessage(kUnmountVolume), 'U'); BMenuItem *item = new BMenuItem("Unmount", new BMessage(kUnmountVolume), 'U');
item->SetEnabled(false); item->SetEnabled(false);
menu->AddItem(item); menu->AddItem(item);
menu->AddItem(new BMenuItem("Mount Settings" B_UTF8_ELLIPSIS, menu->AddItem(new BMenuItem("Mount settings" B_UTF8_ELLIPSIS,
new BMessage(kRunAutomounterSettings))); new BMessage(kRunAutomounterSettings)));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
@@ -109,7 +109,7 @@ BVolumeWindow::AddFileMenu(BMenu *menu)
} }
void void
BVolumeWindow::AddWindowContextMenus(BMenu *menu) BVolumeWindow::AddWindowContextMenus(BMenu *menu)
{ {
if (fPoseView != NULL && fPoseView->TargetModel() != NULL if (fPoseView != NULL && fPoseView->TargetModel() != NULL
@@ -118,17 +118,17 @@ BVolumeWindow::AddWindowContextMenus(BMenu *menu)
return; return;
} }
menu->AddItem(new BMenuItem("Icon View", new BMessage(kIconMode))); menu->AddItem(new BMenuItem("Icon view", new BMessage(kIconMode)));
menu->AddItem(new BMenuItem("Mini Icon View", new BMessage(kMiniIconMode))); menu->AddItem(new BMenuItem("Mini icon view", new BMessage(kMiniIconMode)));
menu->AddItem(new BMenuItem("List View", new BMessage(kListMode))); menu->AddItem(new BMenuItem("List view", new BMessage(kListMode)));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
BMenuItem *resizeItem = new BMenuItem("Resize to Fit",new BMessage(kResizeToFit), 'Y'); BMenuItem *resizeItem = new BMenuItem("Resize to fit",new BMessage(kResizeToFit), 'Y');
menu->AddItem(resizeItem); menu->AddItem(resizeItem);
menu->AddItem(new BMenuItem("Clean Up", new BMessage(kCleanup), 'K')); menu->AddItem(new BMenuItem("Clean up", new BMessage(kCleanup), 'K'));
menu->AddItem(new BMenuItem("Select"B_UTF8_ELLIPSIS, new BMessage(kShowSelectionWindow), 'A', B_SHIFT_KEY)); menu->AddItem(new BMenuItem("Select"B_UTF8_ELLIPSIS, new BMessage(kShowSelectionWindow), 'A', B_SHIFT_KEY));
menu->AddItem(new BMenuItem("Select All", new BMessage(B_SELECT_ALL), 'A')); menu->AddItem(new BMenuItem("Select all", new BMessage(B_SELECT_ALL), 'A'));
menu->AddItem(new BMenuItem("Invert Selection", new BMessage(kInvertSelection), 'S')); menu->AddItem(new BMenuItem("Invert selection", new BMessage(kInvertSelection), 'S'));
BMenuItem *closeItem = new BMenuItem("Close",new BMessage(B_QUIT_REQUESTED), 'W'); BMenuItem *closeItem = new BMenuItem("Close",new BMessage(B_QUIT_REQUESTED), 'W');
menu->AddItem(closeItem); menu->AddItem(closeItem);
+1 -1
View File
@@ -1626,7 +1626,7 @@ GenericAttributeText::CommitEditedTextFlavor(BTextView *textView)
sscanf(textView->Text(), "%c", &ch); sscanf(textView->Text(), "%c", &ch);
//Check if we read the start of a multi-byte glyph: //Check if we read the start of a multi-byte glyph:
if (!isprint(ch)) { if (!isprint(ch)) {
BAlert *alert = new BAlert("", "Sorry, The 'Character' " BAlert *alert = new BAlert("", "Sorry, the 'Character' "
"attribute cannot store a multi-byte glyph.", "attribute cannot store a multi-byte glyph.",
"Cancel", 0, 0, B_WIDTH_AS_USUAL, B_STOP_ALERT); "Cancel", 0, 0, B_WIDTH_AS_USUAL, B_STOP_ALERT);
alert->SetShortcut(0, B_ESCAPE); alert->SetShortcut(0, B_ESCAPE);