Updated to use B_TRANSLATE* macros. relates to #5408.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36664 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Matt Madia 2010-05-06 16:19:00 +00:00
parent 04bcc0b403
commit 61863f2c44
5 changed files with 125 additions and 106 deletions

View File

@ -141,7 +141,8 @@ void
TBeMenu::DoneBuildingItemList()
{
if (fItemList->CountItems() <= 0) {
BMenuItem* item = new BMenuItem(TR("<Be folder is empty>"), 0);
BMenuItem* item = new BMenuItem(B_TRANSLATE("<Be folder is empty>"),
0);
item->SetEnabled(false);
AddItem(item);
} else
@ -157,8 +158,10 @@ TBeMenu::AddNextItem()
TrackingHookData* data = fBarView->GetTrackingHookData();
if (fAddState == kAddingRecents) {
static const char* recentTitle[] = {TR_MARK("Recent documents"),
TR_MARK("Recent folders"), TR_MARK("Recent applications")};
static const char* recentTitle[] = {
B_TRANSLATE_MARK("Recent documents"),
B_TRANSLATE_MARK("Recent folders"),
B_TRANSLATE_MARK("Recent applications")};
const int recentType[] = {kRecentDocuments, kRecentFolders,
kRecentApplications};
const int recentTypes = 3;
@ -167,8 +170,8 @@ TBeMenu::AddNextItem()
bool enabled = false;
for (int i = 0; i < recentTypes; i++) {
recentItem[i] = new TRecentsMenu(TR(recentTitle[i]), fBarView,
recentType[i]);
recentItem[i] = new TRecentsMenu(B_TRANSLATE(recentTitle[i]),
fBarView, recentType[i]);
if (recentItem[i])
enabled |= recentItem[i]->RecentsEnabled();
@ -233,65 +236,71 @@ TBeMenu::AddStandardBeMenuItems()
BMenuItem* item;
BRoster roster;
if (!roster.IsRunning(kTrackerSignature)) {
item = new BMenuItem(TR("Restart Tracker"), new BMessage(kRestartTracker));
item = new BMenuItem(B_TRANSLATE("Restart Tracker"),
new BMessage(kRestartTracker));
AddItem(item);
AddSeparatorItem();
}
static const char* kAboutHaikuMenuItemStr = TR_MARK(
static const char* kAboutHaikuMenuItemStr = B_TRANSLATE_MARK(
"About Haiku" B_UTF8_ELLIPSIS);
static const char* kAboutThisSystemMenuItemStr = TR_MARK(
static const char* kAboutThisSystemMenuItemStr = B_TRANSLATE_MARK(
"About this system" B_UTF8_ELLIPSIS);
item = new BMenuItem(
#ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL
TR(kAboutHaikuMenuItemStr)
B_TRANSLATE(kAboutHaikuMenuItemStr)
#else
TR(kAboutThisSystemMenuItemStr)
B_TRANSLATE(kAboutThisSystemMenuItemStr)
#endif
, new BMessage(kShowSplash));
item->SetEnabled(!dragging);
AddItem(item);
static const char* kFindMenuItemStr = TR_MARK("Find" B_UTF8_ELLIPSIS);
static const char* kFindMenuItemStr =
B_TRANSLATE_MARK("Find" B_UTF8_ELLIPSIS);
#ifdef SHOW_RECENT_FIND_ITEMS
item = new BMenuItem(
TrackerBuildRecentFindItemsMenu(kFindMenuItemStr),
new BMessage(kFindButton));
#else
item = new BMenuItem(TR(kFindMenuItemStr), new BMessage(kFindButton));
item = new BMenuItem(B_TRANSLATE(kFindMenuItemStr),
new BMessage(kFindButton));
#endif
item->SetEnabled(!dragging);
AddItem(item);
item = new BMenuItem(TR("Show replicants"), new BMessage(kToggleDraggers));
item = new BMenuItem(B_TRANSLATE("Show replicants"),
new BMessage(kToggleDraggers));
item->SetEnabled(!dragging);
item->SetMarked(BDragger::AreDraggersDrawn());
AddItem(item);
static const char* kMountMenuStr = TR_MARK("Mount");
static const char* kMountMenuStr = B_TRANSLATE_MARK("Mount");
#ifdef MOUNT_MENU_IN_DESKBAR
DeskbarMountMenu* mountMenu = new DeskbarMountMenu(TR(kMountMenuStr));
DeskbarMountMenu* mountMenu = new DeskbarMountMenu(
B_TRANSLATE(kMountMenuStr));
mountMenu->SetEnabled(!dragging);
AddItem(mountMenu);
#endif
item = new BMenuItem(TR("Deskbar preferences" B_UTF8_ELLIPSIS),
item = new BMenuItem(B_TRANSLATE("Deskbar preferences" B_UTF8_ELLIPSIS),
new BMessage(kConfigShow));
item->SetTarget(be_app);
AddItem(item);
AddSeparatorItem();
BMenu* shutdownMenu = new BMenu(TR("Shutdown" B_UTF8_ELLIPSIS));
BMenu* shutdownMenu = new BMenu(B_TRANSLATE("Shutdown" B_UTF8_ELLIPSIS));
item = new BMenuItem(TR("Restart system"), new BMessage(kRebootSystem));
item = new BMenuItem(B_TRANSLATE("Restart system"),
new BMessage(kRebootSystem));
item->SetEnabled(!dragging);
shutdownMenu->AddItem(item);
static const char* kSuspendMenuItemStr = TR_MARK("Suspend");
static const char* kSuspendMenuItemStr = B_TRANSLATE_MARK("Suspend");
#ifdef APM_SUPPORT
if (_kapm_control_(APM_CHECK_ENABLED) == B_OK) {
@ -301,7 +310,8 @@ TBeMenu::AddStandardBeMenuItems()
}
#endif
item = new BMenuItem(TR("Power off"), new BMessage(kShutdownSystem));
item = new BMenuItem(B_TRANSLATE("Power off"),
new BMessage(kShutdownSystem));
item->SetEnabled(!dragging);
shutdownMenu->AddItem(item);
shutdownMenu->SetFont(be_plain_font);

View File

@ -29,15 +29,16 @@
PreferencesWindow::PreferencesWindow(BRect frame)
:
BWindow(frame, TR("Deskbar preferences"), B_TITLED_WINDOW,
BWindow(frame, B_TRANSLATE("Deskbar preferences"), B_TITLED_WINDOW,
B_NOT_RESIZABLE | B_AUTO_UPDATE_SIZE_LIMITS | B_NOT_ZOOMABLE)
{
// Controls
fMenuRecentDocuments = new BCheckBox(TR("Recent documents:"),
fMenuRecentDocuments = new BCheckBox(B_TRANSLATE("Recent documents:"),
new BMessage(kUpdateRecentCounts));
fMenuRecentApplications = new BCheckBox(TR("Recent applications:"),
fMenuRecentApplications = new BCheckBox(
B_TRANSLATE("Recent applications:"),
new BMessage(kUpdateRecentCounts));
fMenuRecentFolders = new BCheckBox(TR("Recent folders:"),
fMenuRecentFolders = new BCheckBox(B_TRANSLATE("Recent folders:"),
new BMessage(kUpdateRecentCounts));
fMenuRecentDocumentCount = new BTextControl(NULL, NULL,
@ -47,25 +48,29 @@ PreferencesWindow::PreferencesWindow(BRect frame)
fMenuRecentFolderCount = new BTextControl(NULL, NULL,
new BMessage(kUpdateRecentCounts));
fAppsSort = new BCheckBox(TR("Sort running applications"),
fAppsSort = new BCheckBox(B_TRANSLATE("Sort running applications"),
new BMessage(kSortRunningApps));
fAppsSortTrackerFirst = new BCheckBox(TR("Tracker always first"),
fAppsSortTrackerFirst = new BCheckBox(B_TRANSLATE("Tracker always first"),
new BMessage(kTrackerFirst));
fAppsShowExpanders = new BCheckBox(TR("Show application expander"),
fAppsShowExpanders = new BCheckBox(
B_TRANSLATE("Show application expander"),
new BMessage(kSuperExpando));
fAppsExpandNew = new BCheckBox(TR("Expand new applications"),
fAppsExpandNew = new BCheckBox(B_TRANSLATE("Expand new applications"),
new BMessage(kExpandNewTeams));
fClock24Hours = new BCheckBox(TR("24 hour clock"), new BMessage(kMilTime));
fClockSeconds = new BCheckBox(TR("Show seconds"),
fClock24Hours = new BCheckBox(B_TRANSLATE("24 hour clock"),
new BMessage(kMilTime));
fClockSeconds = new BCheckBox(B_TRANSLATE("Show seconds"),
new BMessage(kShowSeconds));
fClockEuropeanDate = new BCheckBox(TR("European date"),
fClockEuropeanDate = new BCheckBox(B_TRANSLATE("European date"),
new BMessage(kEuroDate));
fClockFullDate = new BCheckBox(TR("Full date"), new BMessage(kFullDate));
fClockFullDate = new BCheckBox(B_TRANSLATE("Full date"),
new BMessage(kFullDate));
fWindowAlwaysOnTop = new BCheckBox(TR("Always on top"),
fWindowAlwaysOnTop = new BCheckBox(B_TRANSLATE("Always on top"),
new BMessage(kAlwaysTop));
fWindowAutoRaise = new BCheckBox(TR("Auto-raise"), new BMessage(kAutoRaise));
fWindowAutoRaise = new BCheckBox(B_TRANSLATE("Auto-raise"),
new BMessage(kAutoRaise));
BTextView* docTextView = fMenuRecentDocumentCount->TextView();
BTextView* appTextView = fMenuRecentApplicationCount->TextView();
@ -98,10 +103,10 @@ PreferencesWindow::PreferencesWindow(BRect frame)
fMenuRecentDocuments->SetValue(appSettings->recentDocsEnabled);
fMenuRecentDocumentCount->SetEnabled(appSettings->recentDocsEnabled);
fMenuRecentApplications->SetValue(appSettings->recentAppsEnabled);
fMenuRecentApplicationCount->SetEnabled(appSettings->recentAppsEnabled);
fMenuRecentFolders->SetValue(appSettings->recentFoldersEnabled);
fMenuRecentFolderCount->SetEnabled(appSettings->recentFoldersEnabled);
@ -154,10 +159,10 @@ PreferencesWindow::PreferencesWindow(BRect frame)
fClockBox = new BBox("fClockBox");
fWindowBox = new BBox("fWindowBox");
fMenuBox->SetLabel(TR("Menu"));
fAppsBox->SetLabel(TR("Applications"));
fClockBox->SetLabel(TR("Clock"));
fWindowBox->SetLabel(TR("Window"));
fMenuBox->SetLabel(B_TRANSLATE("Menu"));
fAppsBox->SetLabel(B_TRANSLATE("Applications"));
fClockBox->SetLabel(B_TRANSLATE("Clock"));
fWindowBox->SetLabel(B_TRANSLATE("Window"));
BView* view;
view = BLayoutBuilder::Group<>()
@ -174,7 +179,7 @@ PreferencesWindow::PreferencesWindow(BRect frame)
.Add(fMenuRecentApplicationCount)
.End()
.End()
.Add(new BButton(TR("Edit menu" B_UTF8_ELLIPSIS),
.Add(new BButton(B_TRANSLATE("Edit menu" B_UTF8_ELLIPSIS),
new BMessage(kEditMenuInTracker)))
.SetInsets(10, 10, 10, 10)
.End()

View File

@ -133,8 +133,8 @@ TReplicantTray::TReplicantTray(TBarView* parent, bool vertical)
fShelf(new TReplicantShelf(this)),
fMultiRowMode(vertical),
fMinimumTrayWidth(kMinimumTrayWidth),
fAlignmentSupport(false)
{
fAlignmentSupport(false)
{
// init the minimum window width according to the logo.
const BBitmap* logoBitmap = AppResSet()->FindBitmap(B_MESSAGE_TYPE,
R_BeLogoIcon);
@ -290,14 +290,14 @@ void
TReplicantTray::GetPreferredSize(float* preferredWidth, float* preferredHeight)
{
float width = 0, height = kMinimumTrayHeight;
if (fMultiRowMode) {
if (fShelf->CountReplicants() > 0)
height = fRightBottomReplicant.bottom;
// the height will be uniform for the number of rows
// necessary to show all the reps + any gutters
// necessary for spacing
// necessary for spacing
int32 rowCount = (int32)(height / kMaxReplicantHeight);
height = kGutter + (rowCount * kMaxReplicantHeight)
+ ((rowCount - 1) * kIconGap) + kGutter;
@ -311,7 +311,7 @@ TReplicantTray::GetPreferredSize(float* preferredWidth, float* preferredHeight)
&& fRightBottomReplicant.right + 6 >= fClock->Frame().left) {
width = fRightBottomReplicant.right + 6
+ fClock->Frame().Width();
} else
} else
width = fRightBottomReplicant.right + 3;
}
// this view has a fixed minimum width
@ -333,7 +333,7 @@ TReplicantTray::AdjustPlacement()
BRect bounds = Bounds();
float width, height;
GetPreferredSize(&width, &height);
if (width == bounds.Width() && height == bounds.Height()) {
// no need to change anything
return;
@ -353,13 +353,13 @@ return;
rgb_color menuColor = ViewColor();
rgb_color vdark = tint_color(menuColor, B_DARKEN_3_TINT);
rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT);
BRect frame(Bounds());
SetHighColor(light);
StrokeLine(frame.LeftBottom(), frame.RightBottom());
StrokeLine(frame.RightBottom(), frame.RightTop());
SetHighColor(vdark);
StrokeLine(frame.RightTop(), frame.LeftTop());
StrokeLine(frame.LeftTop(), frame.LeftBottom());
@ -418,11 +418,12 @@ TReplicantTray::ShowReplicantMenu(BPoint point)
if (fBarView->ShowingClock())
fClock->ShowClockOptions(ConvertToScreen(point));
else {
BMenuItem* item = new BMenuItem(TR("Show Time"), new BMessage('time'));
BMenuItem* item = new BMenuItem(B_TRANSLATE("Show Time"),
new BMessage('time'));
menu->AddItem(item);
menu->SetTargetForItems(this);
BPoint where = ConvertToScreen(point);
menu->Go(where, true, true, BRect(where - BPoint(4, 4),
menu->Go(where, true, true, BRect(where - BPoint(4, 4),
where + BPoint(4, 4)), true);
}
}
@ -432,7 +433,7 @@ void
TReplicantTray::MouseDown(BPoint where)
{
#ifdef DB_ADDONS
if (modifiers() & B_CONTROL_KEY)
if (modifiers() & B_CONTROL_KEY)
DumpList(fItemList);
#endif
@ -466,7 +467,7 @@ TReplicantTray::MouseDown(BPoint where)
BView::MouseDown(where);
}
#ifdef DB_ADDONS
#ifdef DB_ADDONS
void
TReplicantTray::InitAddOnSupport()
@ -526,7 +527,7 @@ TReplicantTray::DeleteAddOnSupport()
if (item) {
if (item->isAddOn)
watch_node(&(item->nodeRef), B_STOP_WATCHING, this, Window());
delete item;
}
}
@ -646,7 +647,7 @@ TReplicantTray::HandleEntryUpdate(BMessage* message)
// that we expect
if (IsAddOn(ref)) {
int32 id;
BEntry entry(&ref);
BEntry entry(&ref);
LoadAddOn(&entry, &id);
}
}
@ -750,10 +751,10 @@ TReplicantTray::HandleEntryUpdate(BMessage* message)
if (message->FindInt32("device", &device) != B_OK)
break;
UnloadAddOn(NULL, &device, false, true);
UnloadAddOn(NULL, &device, false, true);
break;
}
}
}
}
@ -800,7 +801,7 @@ TReplicantTray::LoadAddOn(BEntry* entry, int32* id, bool force)
if (image < B_OK)
return image;
// get the view loading function symbol
// get the view loading function symbol
// we first look for a symbol that takes an image_id
// and entry_ref pointer, if not found, go with normal
// instantiate function
@ -864,7 +865,7 @@ TReplicantTray::AddItem(int32 id, node_ref nodeRef, BEntry& entry, bool isAddOn)
if (isAddOn)
watch_node(&nodeRef, B_WATCH_NAME | B_WATCH_ATTR, this, Window());
return B_OK;
return B_OK;
}
@ -883,7 +884,7 @@ TReplicantTray::UnloadAddOn(node_ref* nodeRef, dev_t* device,
if ((which && nodeRef && item->nodeRef == *nodeRef)
|| (device && item->nodeRef.device == *device)) {
if (device && be_roster->IsRunning(&item->entryRef))
continue;
@ -911,14 +912,14 @@ TReplicantTray::RemoveItem(int32 id)
}
fItemList->RemoveItem(item);
delete item;
delete item;
}
/** ENTRY_MOVED message, moving only occurs on a device
* copying will occur (ENTRY_CREATED) between devices
*/
void
TReplicantTray::MoveItem(entry_ref* ref, ino_t toDirectory)
{
@ -984,12 +985,12 @@ TReplicantTray::ItemInfo(const char* name, int32* id)
{
if (!name || strlen(name) <= 0)
return B_ERROR;
int32 index;
BView* view = ViewAt(&index, id, name);
if (view)
return B_OK;
return B_ERROR;
}
@ -1003,14 +1004,14 @@ TReplicantTray::ItemInfo(int32 index, const char** name, int32* id)
{
if (index < 0)
return B_ERROR;
BView* view;
fShelf->ReplicantAt(index, &view, (uint32*)id, NULL);
if (view) {
*name = view->Name();
return B_OK;
}
return B_ERROR;
}
@ -1022,7 +1023,7 @@ TReplicantTray::IconExists(int32 target, bool byIndex)
{
int32 index, id;
BView* view = ViewAt(&index, &id, target, byIndex);
return view && index >= 0;
}
@ -1034,10 +1035,10 @@ TReplicantTray::IconExists(const char* name)
{
if (!name || strlen(name) == 0)
return false;
int32 index, id;
BView* view = ViewAt(&index, &id, name);
return view && index >= 0;
}
@ -1115,7 +1116,7 @@ TReplicantTray::AddIcon(BMessage* archive, int32* id, const entry_ref* addOn)
if (originalBounds != view->Bounds()) {
// The replicant changed its size when added to the window, so we need
// to recompute all over again (it's already done once via
// to recompute all over again (it's already done once via
// BShelf::AddReplicant() and TReplicantShelf::CanAcceptReplicantView())
RealignReplicants();
}
@ -1139,7 +1140,7 @@ TReplicantTray::RemoveIcon(int32 target, bool byIndex)
{
if (target < 0)
return;
int32 index, id;
BView* view = ViewAt(&index, &id, target, byIndex);
if (view && index >= 0) {
@ -1158,7 +1159,7 @@ TReplicantTray::RemoveIcon(const char* name)
{
if (!name || strlen(name) <= 0)
return;
int32 id, index;
BView* view = ViewAt(&index, &id, name);
if (view && index >= 0) {
@ -1204,7 +1205,7 @@ BView*
TReplicantTray::ViewAt(int32* index, int32* id, int32 target, bool byIndex)
{
*index = -1;
BView* view;
if (byIndex) {
if (fShelf->ReplicantAt(target, &view, (uint32*)id)) {
@ -1225,7 +1226,7 @@ TReplicantTray::ViewAt(int32* index, int32* id, int32 target, bool byIndex)
}
}
}
return NULL;
}
@ -1239,7 +1240,7 @@ TReplicantTray::ViewAt(int32* index, int32* id, const char* name)
{
*index = -1;
*id = -1;
BView* view;
int32 count = fShelf->CountReplicants()-1;
for (int32 repIndex = count ; repIndex >= 0 ; repIndex--) {
@ -1249,7 +1250,7 @@ TReplicantTray::ViewAt(int32* index, int32* id, const char* name)
return view;
}
}
return NULL;
}
@ -1449,9 +1450,9 @@ TDragRegion::GetPreferredSize(float* width, float* height)
{
fChild->ResizeToPreferred();
*width = fChild->Bounds().Width();
*height = fChild->Bounds().Height();
if (fDragLocation != kNoDragRegion)
*height = fChild->Bounds().Height();
if (fDragLocation != kNoDragRegion)
*width += 7;
else
*width += 6;
@ -1471,7 +1472,7 @@ TDragRegion::FrameMoved(BPoint)
}
void
void
TDragRegion::Draw(BRect)
{
rgb_color menuColor = ViewColor();
@ -1481,7 +1482,7 @@ TDragRegion::Draw(BRect)
rgb_color vdark = tint_color(menuColor, B_DARKEN_3_TINT);
rgb_color vvdark = tint_color(menuColor, B_DARKEN_4_TINT);
rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT);
BRect frame(Bounds());
BeginLineArray(4);
@ -1516,7 +1517,7 @@ TDragRegion::Draw(BRect)
BPoint(frame.right - 1, frame.bottom), hilite);
} else if (fBarView->AcrossBottom()) {
AddLine(BPoint(frame.left, frame.top + 1),
BPoint(frame.right - 1, frame.top + 1), light);
BPoint(frame.right - 1, frame.top + 1), light);
AddLine(frame.LeftBottom(), frame.RightBottom(), hilite);
AddLine(frame.RightTop(), frame.RightBottom(), vvdark);
AddLine(BPoint(frame.right - 1, frame.top + 1),
@ -1525,7 +1526,7 @@ TDragRegion::Draw(BRect)
}
EndLineArray();
if (fDragLocation != kDontDrawDragRegion || fDragLocation != kNoDragRegion)
DrawDragRegion();
}
@ -1533,7 +1534,7 @@ TDragRegion::Draw(BRect)
void
TDragRegion::DrawDragRegion()
{
{
BRect dragRegion(DragRegion());
rgb_color menuColor = ViewColor();
@ -1551,11 +1552,11 @@ TDragRegion::DrawDragRegion()
BPoint pt;
pt.x = floorf((dragRegion.left + dragRegion.right) / 2 + 0.5) - 1;
pt.y = dragRegion.top + 2;
while (pt.y + 1 <= dragRegion.bottom) {
AddLine(pt, pt, vdark);
AddLine(pt + BPoint(1, 1), pt + BPoint(1, 1), light);
pt.y += 3;
}
EndLineArray();
@ -1588,7 +1589,7 @@ TDragRegion::DragRegion() const
placeOnLeft = true;
else if (fDragLocation == kDragRegionRight)
placeOnLeft = false;
if (placeOnLeft) {
dragRegion.left += kLeftRightInset;
dragRegion.right = dragRegion.left + kDragWidth;
@ -1596,12 +1597,12 @@ TDragRegion::DragRegion() const
dragRegion.right -= kLeftRightInset;
dragRegion.left = dragRegion.right - kDragWidth;
}
return dragRegion;
}
void
void
TDragRegion::MouseDown(BPoint thePoint)
{
ulong buttons;
@ -1633,7 +1634,7 @@ TDragRegion::MouseDown(BPoint thePoint)
}
void
void
TDragRegion::MouseUp(BPoint pt)
{
if (IsTracking()) {
@ -1644,8 +1645,8 @@ TDragRegion::MouseUp(BPoint pt)
}
bool
TDragRegion::SwitchModeForRect(BPoint mouse, BRect rect,
bool
TDragRegion::SwitchModeForRect(BPoint mouse, BRect rect,
bool newVertical, bool newLeft, bool newTop, int32 newState)
{
if (!rect.Contains(mouse))
@ -1664,7 +1665,7 @@ TDragRegion::SwitchModeForRect(BPoint mouse, BRect rect,
}
void
void
TDragRegion::MouseMoved(BPoint where, uint32 code, const BMessage* message)
{
if (IsTracking()) {
@ -1678,7 +1679,7 @@ TDragRegion::MouseMoved(BPoint where, uint32 code, const BMessage* message)
float vDivider = frame.Height() / 2;
#ifdef FULL_MODE
float thirdScreen = frame.Height() / 3;
#endif
#endif
BRect topLeft(frame.left, frame.top, frame.left + hDivider,
miniDivider);
BRect topMiddle(frame.left + hDivider, frame.top, frame.right
@ -1701,7 +1702,7 @@ TDragRegion::MouseMoved(BPoint where, uint32 code, const BMessage* message)
frame.bottom - thirdScreen);
vDivider = frame.bottom - thirdScreen;
#endif
#endif
BRect bottomLeft(frame.left, vDivider, frame.left + hDivider,
frame.bottom);
BRect bottomMiddle(frame.left + hDivider, vDivider, frame.right
@ -1746,7 +1747,7 @@ TDragRegion::MouseMoved(BPoint where, uint32 code, const BMessage* message)
int32
TDragRegion::DragRegionLocation() const
{
return fDragLocation;
return fDragLocation;
}
@ -1755,7 +1756,7 @@ TDragRegion::SetDragRegionLocation(int32 location)
{
if (location == fDragLocation)
return;
fDragLocation = location;
Invalidate();
}

View File

@ -563,14 +563,14 @@ TTimeView::ShowClockOptions(BPoint point)
menu->SetFont(be_plain_font);
BMenuItem* item;
item = new BMenuItem(TR("Change time" B_UTF8_ELLIPSIS),
item = new BMenuItem(B_TRANSLATE("Change time" B_UTF8_ELLIPSIS),
new BMessage(kChangeClock));
menu->AddItem(item);
item = new BMenuItem(TR("Hide time"), new BMessage('time'));
item = new BMenuItem(B_TRANSLATE("Hide time"), new BMessage('time'));
menu->AddItem(item);
item = new BMenuItem(TR("Show calendar" B_UTF8_ELLIPSIS),
item = new BMenuItem(B_TRANSLATE("Show calendar" B_UTF8_ELLIPSIS),
new BMessage(kShowCalendar));
menu->AddItem(item);

View File

@ -178,7 +178,7 @@ TWindowMenu::AttachedToWindow()
int32 itemCount = CountItems() + parentMenuItems;
if (itemCount < 1) {
TWindowMenuItem* noWindowsItem =
new TWindowMenuItem(TR("No windows"), -1, false, false);
new TWindowMenuItem(B_TRANSLATE("No windows"), -1, false, false);
noWindowsItem->SetEnabled(false);
@ -188,19 +188,22 @@ TWindowMenu::AttachedToWindow()
// it. (but we only add this option if the application is not Tracker.)
if (fApplicationSignature.ICompare(kTrackerSignature) != 0) {
AddSeparatorItem();
AddItem(new TShowHideMenuItem(TR("Quit application"), fTeam,
B_QUIT_REQUESTED));
AddItem(new TShowHideMenuItem(B_TRANSLATE("Quit application"),
fTeam, B_QUIT_REQUESTED));
}
} else {
// if we are in drag mode, then don't add the window controls
// to the menu
if (!dragging) {
TShowHideMenuItem* hide =
new TShowHideMenuItem(TR("Hide all"), fTeam, B_MINIMIZE_WINDOW);
new TShowHideMenuItem(B_TRANSLATE("Hide all"), fTeam,
B_MINIMIZE_WINDOW);
TShowHideMenuItem* show =
new TShowHideMenuItem(TR("Show all"), fTeam, B_BRING_TO_FRONT);
new TShowHideMenuItem(B_TRANSLATE("Show all"), fTeam,
B_BRING_TO_FRONT);
TShowHideMenuItem* close =
new TShowHideMenuItem(TR("Close all"), fTeam, B_QUIT_REQUESTED);
new TShowHideMenuItem(B_TRANSLATE("Close all"), fTeam,
B_QUIT_REQUESTED);
if (miniCount == itemCount)
hide->SetEnabled(false);