* Applied patch by Jonas Sundstrom: fixed the usage of B_UTF8_ELLIPSIS hopefully

everywhere in the tree.
* Added the ellipsis to "About Haiku" in Deskbar as well.
* Minor cleanup of Deskbar's StatusView.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21156 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2007-05-16 16:34:09 +00:00
parent da7c734d5c
commit 66eba86f4b
27 changed files with 182 additions and 170 deletions

View File

@ -718,7 +718,7 @@ JobSetupView::AttachedToWindow()
/* preview */
button = new BButton(preview_rect, "preview", "Preview ...", new BMessage(kMsgPreview));
button = new BButton(preview_rect, "preview", "Preview" B_UTF8_ELLIPSIS, new BMessage(kMsgPreview));
AddChild(button);

View File

@ -74,20 +74,20 @@ RouteWindow::RouteWindow(RouteAppNodeManager* manager) :
BMenuBar* pMenuBar = new BMenuBar(b, "menuBar");
BMenu* pFileMenu = new BMenu("File");
BMenuItem* item = new BMenuItem(
"Open...",
"Open" B_UTF8_ELLIPSIS,
new BMessage(RouteApp::M_SHOW_OPEN_PANEL),
'O');
item->SetTarget(be_app);
pFileMenu->AddItem(item);
pFileMenu->AddItem(new BSeparatorItem());
item = new BMenuItem(
"Save Nodes...",
"Save Nodes" B_UTF8_ELLIPSIS,
new BMessage(RouteApp::M_SHOW_SAVE_PANEL),
'S');
item->SetTarget(be_app);
pFileMenu->AddItem(item);
pFileMenu->AddItem(new BSeparatorItem());
pFileMenu->AddItem(new BMenuItem("About Cortex/Route...",
pFileMenu->AddItem(new BMenuItem("About Cortex/Route" B_UTF8_ELLIPSIS,
new BMessage(B_ABOUT_REQUESTED)));
pFileMenu->AddItem(new BSeparatorItem());
pFileMenu->AddItem(new BMenuItem("Quit", new BMessage(B_QUIT_REQUESTED)));

View File

@ -232,11 +232,13 @@ TBeMenu::AddStandardBeMenuItems()
if (fBarView)
dragging = fBarView->Dragging();
BMenuItem* item = new BMenuItem(
#ifdef __HAIKU__
BMenuItem* item = new BMenuItem("About Haiku", new BMessage(kShowSplash));
"About Haiku"
#else
BMenuItem* item = new BMenuItem("About BeOS", new BMessage(kShowSplash));
"About BeOS"
#endif
B_UTF8_ELLIPSIS, new BMessage(kShowSplash));
item->SetEnabled(!dragging);
AddItem(item);

View File

@ -88,7 +88,8 @@ static void
DumpItem(DeskbarItemInfo *item)
{
printf("is addon: %i, id: %li\n", item->isAddOn, item->id);
printf("entry_ref: %ld, %Ld, %s\n", item->entryRef.device, item->entryRef.directory, item->entryRef.name);
printf("entry_ref: %ld, %Ld, %s\n", item->entryRef.device,
item->entryRef.directory, item->entryRef.name);
printf("node_ref: %ld, %Ld\n", item->nodeRef.device, item->nodeRef.node);
}
@ -115,7 +116,7 @@ DumpList(BList *itemlist)
// don't change the name of this view to anything other than "Status"!
TReplicantTray::TReplicantTray(TBarView *parent, bool vertical)
: BView(BRect(0, 0, 1, 1), "Status", B_FOLLOW_LEFT | B_FOLLOW_TOP,
: BView(BRect(0, 0, 1, 1), "Status", B_FOLLOW_LEFT | B_FOLLOW_TOP,
B_WILL_DRAW | B_FRAME_EVENTS),
fClock(NULL),
fBarView(parent),
@ -137,8 +138,10 @@ TReplicantTray::AttachedToWindow()
{
BView::AttachedToWindow();
SetViewColor(tint_color(ui_color(B_MENU_BACKGROUND_COLOR), B_DARKEN_1_TINT));
SetViewColor(tint_color(ui_color(B_MENU_BACKGROUND_COLOR),
B_DARKEN_1_TINT));
SetDrawingMode(B_OP_COPY);
Window()->SetPulseRate(1000000);
DealWithClock(fBarView->ShowingClock());
@ -233,8 +236,9 @@ TReplicantTray::DealWithClock(bool showClock)
if (!fClock) {
desk_settings *settings = ((TBarApp *)be_app)->Settings();
fClock = new TTimeView(settings->timeShowSeconds, settings->timeShowMil,
settings->timeFullDate, settings->timeShowEuro, false);
fClock = new TTimeView(settings->timeShowSeconds,
settings->timeShowMil, settings->timeFullDate,
settings->timeShowEuro, false);
AddChild(fClock);
fClock->MoveTo(Bounds().right - fClock->Bounds().Width() - 1, 2);
@ -252,12 +256,12 @@ TReplicantTray::DealWithClock(bool showClock)
}
/** width is set to a minimum of kMinimumReplicantCount by kMaxReplicantWidth
* if not in multirowmode and greater than kMinimumReplicantCount
* the width should be calculated based on the actual
* replicant widths
*/
/*!
Width is set to a minimum of kMinimumReplicantCount by kMaxReplicantWidth
if not in multirowmode and greater than kMinimumReplicantCount
the width should be calculated based on the actual
replicant widths
*/
void
TReplicantTray::GetPreferredSize(float *preferredWidth, float *preferredHeight)
{
@ -281,7 +285,8 @@ TReplicantTray::GetPreferredSize(float *preferredWidth, float *preferredHeight)
if (fShelf->CountReplicants() > 0) {
if (fBarView->ShowingClock()
&& fRightBottomReplicant.right + 6 >= fClock->Frame().left) {
width = fRightBottomReplicant.right + 6 + fClock->Frame().Width();
width = fRightBottomReplicant.right + 6
+ fClock->Frame().Width();
} else
width = fRightBottomReplicant.right + 3;
}
@ -384,7 +389,7 @@ TReplicantTray::ShowReplicantMenu(BPoint point)
// If the clock is visible, show the extended menu
// otheriwse, show "Show Time".
if (fBarView->ShowingClock())
fClock->ShowClockOptions(ConvertToScreen(point));
else {
@ -462,7 +467,8 @@ TReplicantTray::InitAddOnSupport()
// two computers would have to have exactly matching clocks, and launch
// Deskbar at the exact same time into the bootsequence in order for their
// security-ID to be identical
fDeskbarSecurityCode = ((real&0xffffffffULL)<<32)|(boot&0xffffffffULL);
fDeskbarSecurityCode = ((real & 0xffffffffULL) << 32)
| (boot & 0xffffffffULL);
if (find_directory (B_USER_SETTINGS_DIRECTORY, &path, true) == B_OK) {
path.Append(kDeskbarSecurityCodeFile);
@ -513,7 +519,8 @@ TReplicantTray::RunAddOnQuery(BVolume *volume, const char *predicate)
// newly mounted devices only - the Deskbar will automatically
// create an index for every device mounted at startup).
index_info info;
if (!volume->KnowsQuery() || fs_stat_index(volume->Device(),kStatusPredicate,&info) != 0)
if (!volume->KnowsQuery()
|| fs_stat_index(volume->Device(), kStatusPredicate, &info) != 0)
return;
// run a new query on a specific volume
@ -540,7 +547,8 @@ TReplicantTray::IsAddOn(entry_ref &ref)
BFile file(&ref, B_READ_ONLY);
char status[64];
ssize_t size = file.ReadAttr(kStatusPredicate, B_STRING_TYPE, 0, &status, 64);
ssize_t size = file.ReadAttr(kStatusPredicate, B_STRING_TYPE, 0, &status,
sizeof(status));
return size > 0;
}
@ -549,7 +557,7 @@ DeskbarItemInfo *
TReplicantTray::DeskbarItemFor(node_ref &nodeRef)
{
for (int32 i = fItemList->CountItems(); i-- > 0 ;) {
DeskbarItemInfo *item = static_cast<DeskbarItemInfo *>(fItemList->ItemAt(i));
DeskbarItemInfo *item = (DeskbarItemInfo *)fItemList->ItemAt(i);
if (item == NULL)
continue;
@ -565,7 +573,7 @@ DeskbarItemInfo *
TReplicantTray::DeskbarItemFor(int32 id)
{
for (int32 i = fItemList->CountItems(); i-- > 0 ;) {
DeskbarItemInfo *item = static_cast<DeskbarItemInfo *>(fItemList->ItemAt(i));
DeskbarItemInfo *item = (DeskbarItemInfo *)fItemList->ItemAt(i);
if (item == NULL)
continue;
@ -584,10 +592,9 @@ TReplicantTray::NodeExists(node_ref &nodeRef)
}
/** This handles B_NODE_MONITOR & B_QUERY_UPDATE messages received
* for the registered add-ons.
*/
/*! This handles B_NODE_MONITOR & B_QUERY_UPDATE messages received
for the registered add-ons.
*/
void
TReplicantTray::HandleEntryUpdate(BMessage *message)
{
@ -598,82 +605,82 @@ TReplicantTray::HandleEntryUpdate(BMessage *message)
BPath path;
switch (opcode) {
case B_ENTRY_CREATED:
{
// entry was just listed, matches live query
{
const char *name;
ino_t directory;
dev_t device;
// received when an app adds a ref to the
// Deskbar add-ons folder
if (message->FindString("name", &name) == B_OK
&& message->FindInt64("directory", &directory) == B_OK
&& message->FindInt32("device", &device) == B_OK) {
entry_ref ref(device, directory, name);
// see if this item has the attribute
// that we expect
if (IsAddOn(ref)) {
int32 id;
BEntry entry(&ref);
LoadAddOn(&entry, &id);
}
const char *name;
ino_t directory;
dev_t device;
// received when an app adds a ref to the
// Deskbar add-ons folder
if (message->FindString("name", &name) == B_OK
&& message->FindInt64("directory", &directory) == B_OK
&& message->FindInt32("device", &device) == B_OK) {
entry_ref ref(device, directory, name);
// see if this item has the attribute
// that we expect
if (IsAddOn(ref)) {
int32 id;
BEntry entry(&ref);
LoadAddOn(&entry, &id);
}
}
break;
}
case B_ATTR_CHANGED:
{
// from node watch on individual items
// (node_watch added in LoadAddOn)
{
node_ref nodeRef;
if (message->FindInt32("device", &(nodeRef.device)) == B_OK
&& message->FindInt64("node", &(nodeRef.node)) == B_OK) {
// get the add-on this is for
DeskbarItemInfo *item = DeskbarItemFor(nodeRef);
if (item == NULL)
break;
node_ref nodeRef;
if (message->FindInt32("device", &(nodeRef.device)) == B_OK
&& message->FindInt64("node", &(nodeRef.node)) == B_OK) {
// get the add-on this is for
DeskbarItemInfo *item = DeskbarItemFor(nodeRef);
if (item == NULL)
break;
BFile file(&item->entryRef, B_READ_ONLY);
BFile file(&item->entryRef, B_READ_ONLY);
char status[255];
ssize_t size = file.ReadAttr(kStatusPredicate,
B_STRING_TYPE, 0, status, sizeof(status) - 1);
status[sizeof(status) - 1] = '\0';
char status[255];
ssize_t size = file.ReadAttr(kStatusPredicate,
B_STRING_TYPE, 0, status, sizeof(status) - 1);
status[sizeof(status) - 1] = '\0';
// attribute was removed
if (size == B_ENTRY_NOT_FOUND) {
// cleans up and removes node_watch
UnloadAddOn(&nodeRef, NULL, true, false);
} else if (!strcmp(status, "enable")) {
int32 id;
BEntry entry(&item->entryRef, true);
LoadAddOn(&entry, &id);
}
// attribute was removed
if (size == B_ENTRY_NOT_FOUND) {
// cleans up and removes node_watch
UnloadAddOn(&nodeRef, NULL, true, false);
} else if (!strcmp(status, "enable")) {
int32 id;
BEntry entry(&item->entryRef, true);
LoadAddOn(&entry, &id);
}
}
break;
}
case B_ENTRY_MOVED:
{
entry_ref ref;
ino_t todirectory;
ino_t node;
const char *name;
if (message->FindString("name", &name) == B_OK
&& message->FindInt64("from directory", &(ref.directory)) == B_OK
&& message->FindInt64("to directory", &todirectory) == B_OK
&& message->FindInt32("device", &(ref.device)) == B_OK
&& message->FindInt64("node", &node) == B_OK ) {
{
entry_ref ref;
ino_t todirectory;
ino_t node;
const char *name;
if (message->FindString("name", &name) == B_OK
&& message->FindInt64("from directory", &(ref.directory)) == B_OK
&& message->FindInt64("to directory", &todirectory) == B_OK
&& message->FindInt32("device", &(ref.device)) == B_OK
&& message->FindInt64("node", &node) == B_OK ) {
if (!name)
break;
if (!name)
break;
ref.set_name(name);
// change the directory reference to
// the new directory
MoveItem(&ref, todirectory);
}
ref.set_name(name);
// change the directory reference to
// the new directory
MoveItem(&ref, todirectory);
}
break;
}
case B_ENTRY_REMOVED:
{
@ -692,41 +699,42 @@ TReplicantTray::HandleEntryUpdate(BMessage *message)
UnloadAddOn(&nodeRef, NULL, true, false);
}
break;
}
break;
case B_DEVICE_MOUNTED:
{
// run a new query on the new device
dev_t device;
if (message->FindInt32("new device", &device) != B_OK)
break;
{
// run a new query on the new device
dev_t device;
if (message->FindInt32("new device", &device) != B_OK)
break;
RunAddOnQuery(new BVolume(device), kEnabledPredicate);
}
RunAddOnQuery(new BVolume(device), kEnabledPredicate);
break;
}
case B_DEVICE_UNMOUNTED:
{
// remove all items associated with the device
// unmounted
// contrary to what the BeBook says, the item is called "device",
// not "new device" like it is for B_DEVICE_MOUNTED
dev_t device;
if (message->FindInt32("device", &device) != B_OK)
break;
{
// remove all items associated with the device
// unmounted
// contrary to what the BeBook says, the item is called "device",
// not "new device" like it is for B_DEVICE_MOUNTED
dev_t device;
if (message->FindInt32("device", &device) != B_OK)
break;
UnloadAddOn(NULL, &device, false, true);
}
UnloadAddOn(NULL, &device, false, true);
break;
}
}
}
/** The add-ons must support the exported C function API
* if they do, they will be loaded and added to deskbar
* primary function is the Instantiate function
*/
/*!
The add-ons must support the exported C function API
if they do, they will be loaded and added to deskbar
primary function is the Instantiate function
*/
status_t
TReplicantTray::LoadAddOn(BEntry *entry, int32 *id, bool force)
{
@ -746,21 +754,24 @@ TReplicantTray::LoadAddOn(BEntry *entry, int32 *id, bool force)
return error;
uint64 deskbarID;
ssize_t size = node.ReadAttr(kDeskbarSecurityCodeAttr, B_UINT64_TYPE, 0,
&deskbarID, sizeof(fDeskbarSecurityCode));
if (size != sizeof(fDeskbarSecurityCode) || deskbarID != fDeskbarSecurityCode) {
ssize_t size = node.ReadAttr(kDeskbarSecurityCodeAttr, B_UINT64_TYPE,
0, &deskbarID, sizeof(fDeskbarSecurityCode));
if (size != sizeof(fDeskbarSecurityCode)
|| deskbarID != fDeskbarSecurityCode) {
// no code or code doesn't match
return B_ERROR;
}
}
BPath path;
entry->GetPath(&path);
status_t status = entry->GetPath(&path);
if (status < B_OK)
return status;
// load the add-on
image_id image = load_add_on(path.Path());
if (image < 0)
return (status_t)image;
if (image < B_OK)
return image;
// get the view loading function symbol
// we first look for a symbol that takes an image_id
@ -774,19 +785,17 @@ TReplicantTray::LoadAddOn(BEntry *entry, int32 *id, bool force)
entry->GetRef(&ref);
if (get_image_symbol(image, kInstantiateEntryCFunctionName,
B_SYMBOL_TYPE_TEXT, (void **)&entryFunction) >= 0) {
B_SYMBOL_TYPE_TEXT, (void **)&entryFunction) >= B_OK) {
view = (*entryFunction)(image, &ref);
} else if (get_image_symbol(image, kInstantiateItemCFunctionName,
B_SYMBOL_TYPE_TEXT, (void **)&itemFunction) >= 0) {
B_SYMBOL_TYPE_TEXT, (void **)&itemFunction) >= B_OK) {
view = (*itemFunction)();
} else {
unload_add_on(image);
return B_ERROR;
}
if (!view || IconExists(view->Name())) {
if (view == NULL || IconExists(view->Name())) {
delete view;
unload_add_on(image);
return B_ERROR;

View File

@ -995,9 +995,9 @@ void
CalcView::_CreatePopUpMenu()
{
// construct items
fAboutItem = new BMenuItem("About Calculator...",
fAboutItem = new BMenuItem("About Calculator" B_UTF8_ELLIPSIS,
new BMessage(B_ABOUT_REQUESTED));
fOptionsItem = new BMenuItem("Options...",
fOptionsItem = new BMenuItem("Options" B_UTF8_ELLIPSIS,
new BMessage(K_OPTIONS_REQUESTED));
// construct menu

View File

@ -52,11 +52,11 @@ ExpanderWindow::ExpanderWindow(BRect frame, const entry_ref *ref, BMessage *sett
fBar = new BMenuBar(BRect(0, 0, Bounds().right, 20), "menu_bar");
BMenu *menu = new BMenu("File");
BMenuItem *item;
menu->AddItem(item = new BMenuItem("About Expander...", new BMessage(B_ABOUT_REQUESTED)));
menu->AddItem(item = new BMenuItem("About Expander" B_UTF8_ELLIPSIS, new BMessage(B_ABOUT_REQUESTED)));
item->SetTarget(be_app_messenger);
menu->AddSeparatorItem();
menu->AddItem(fSourceItem = new BMenuItem("Set Source...", new BMessage(MSG_SOURCE), 'O'));
menu->AddItem(fDestItem = new BMenuItem("Set Destination...", new BMessage(MSG_DEST), 'D'));
menu->AddItem(fSourceItem = new BMenuItem("Set Source" B_UTF8_ELLIPSIS, new BMessage(MSG_SOURCE), 'O'));
menu->AddItem(fDestItem = new BMenuItem("Set Destination" B_UTF8_ELLIPSIS, new BMessage(MSG_DEST), 'D'));
menu->AddSeparatorItem();
menu->AddItem(fExpandItem = new BMenuItem("Expand", new BMessage(MSG_EXPAND), 'E'));
fExpandItem->SetEnabled(false);
@ -70,7 +70,7 @@ ExpanderWindow::ExpanderWindow(BRect frame, const entry_ref *ref, BMessage *sett
fBar->AddItem(menu);
menu = new BMenu("Edit");
menu->AddItem(fPreferencesItem = new BMenuItem("Preferences...",
menu->AddItem(fPreferencesItem = new BMenuItem("Preferences" B_UTF8_ELLIPSIS,
new BMessage(MSG_PREFERENCES), 'P'));
fBar->AddItem(menu);
AddChild(fBar);

View File

@ -1378,7 +1378,7 @@ TMailWindow::TMailWindow(BRect rect, const char *title, const entry_ref *ref,
menu->AddSeparatorItem();
menu->AddItem(item = new BMenuItem(
MDR_DIALECT_CHOICE ("About", "A) Mailについて") B_UTF8_ELLIPSIS,
MDR_DIALECT_CHOICE ("About Mail", "A) Mailについて") B_UTF8_ELLIPSIS,
new BMessage(B_ABOUT_REQUESTED)));
item->SetTarget(be_app);

View File

@ -274,7 +274,7 @@ MainWin::CreateMenu()
fFileMenu->AddItem(new BMenuItem("Open File"B_UTF8_ELLIPSIS, new BMessage(M_FILE_OPEN), 'O', B_COMMAND_KEY));
fFileMenu->AddItem(new BMenuItem("File Info"B_UTF8_ELLIPSIS, new BMessage(M_FILE_INFO), 'I', B_COMMAND_KEY));
fFileMenu->AddSeparatorItem();
fFileMenu->AddItem(new BMenuItem("About", new BMessage(M_FILE_ABOUT), 'A', B_COMMAND_KEY));
fFileMenu->AddItem(new BMenuItem("About" NAME B_UTF8_ELLIPSIS, new BMessage(M_FILE_ABOUT)));
fFileMenu->AddSeparatorItem();
fFileMenu->AddItem(new BMenuItem("Close", new BMessage(M_FILE_CLOSE), 'W', B_COMMAND_KEY));
fFileMenu->AddItem(new BMenuItem("Quit", new BMessage(M_FILE_QUIT), 'Q', B_COMMAND_KEY));
@ -480,7 +480,7 @@ MainWin::ShowContextMenu(const BPoint &screen_point)
menu->AddItem(item = new BMenuItem("Keep Aspect Ratio", new BMessage(M_TOGGLE_KEEP_ASPECT_RATIO), 'K', B_COMMAND_KEY));
item->SetMarked(fKeepAspectRatio);
menu->AddSeparatorItem();
menu->AddItem(new BMenuItem("About", new BMessage(M_FILE_ABOUT), 'A', B_COMMAND_KEY));
menu->AddItem(new BMenuItem("About" NAME B_UTF8_ELLIPSIS, new BMessage(M_FILE_ABOUT)));
menu->AddSeparatorItem();
menu->AddItem(new BMenuItem("Quit", new BMessage(M_FILE_QUIT), 'Q', B_COMMAND_KEY));

View File

@ -352,7 +352,7 @@ NetworkStatusView::MouseDown(BPoint point)
}
menu->AddSeparatorItem();
menu->AddItem(new BMenuItem("About" B_UTF8_ELLIPSIS,
menu->AddItem(new BMenuItem("About NetworkStatus" B_UTF8_ELLIPSIS,
new BMessage(B_ABOUT_REQUESTED)));
if (fInDeskbar)
menu->AddItem(new BMenuItem("Quit", new BMessage(B_QUIT_REQUESTED)));
@ -472,6 +472,7 @@ NetworkStatusView::_Update(bool force)
extern "C" _EXPORT BView *
instantiate_deskbar_item(void)
{
return new NetworkStatusView(BRect(0, 0, 15, 15), B_FOLLOW_NONE, true);
return new NetworkStatusView(BRect(0, 0, 15, 15),
B_FOLLOW_LEFT | B_FOLLOW_TOP, true);
}

View File

@ -38,7 +38,7 @@ TPeopleWindow::TPeopleWindow(BRect frame, char *title, entry_ref *ref)
BRect rect(0, 0, 32767, 15);
BMenuBar* menuBar = new BMenuBar(rect, "");
menu = new BMenu("File");
menu->AddItem(item = new BMenuItem("New Person", new BMessage(M_NEW), 'N'));
menu->AddItem(item = new BMenuItem("New Person" B_UTF8_ELLIPSIS, new BMessage(M_NEW), 'N'));
item->SetTarget(NULL, be_app);
menu->AddItem(new BMenuItem("Close", new BMessage(B_CLOSE_REQUESTED), 'W'));
menu->AddSeparatorItem();

View File

@ -18,11 +18,11 @@ extern const char* STR_ERR_CANT_START
extern const char* STR_MNU_FILE
= "File";
extern const char* STR_MNU_FILE_SAVE_AS
= "Save Console As...";
= "Save Console As" B_UTF8_ELLIPSIS;
extern const char* STR_MNU_FILE_SAVE_SELECTION
= "Save Console Selections As...";
= "Save Console Selections As" B_UTF8_ELLIPSIS;
extern const char* STR_MNU_FILE_ABOUT
= "About PoorMan";
= "About PoorMan" B_UTF8_ELLIPSIS;
extern const char* STR_MNU_FILE_QUIT
= "Quit";
extern const char* STR_MNU_EDIT
@ -32,7 +32,7 @@ extern const char* STR_MNU_EDIT_COPY
extern const char* STR_MNU_EDIT_SELECT_ALL
= "Select All";
extern const char* STR_MNU_EDIT_PREF
= "Preferences...";
= "Preferences" B_UTF8_ELLIPSIS;
extern const char* STR_MNU_CTRL
= "Controls";
extern const char* STR_MNU_CTRL_RUN_SERVER

View File

@ -773,7 +773,7 @@ thread_popup(void *arg)
addtopbottom(new BSeparatorItem ());
item = new IconMenuItem(gPCView->fProcessControllerIcon, "About ProcessController",
item = new IconMenuItem(gPCView->fProcessControllerIcon, "About ProcessController" B_UTF8_ELLIPSIS,
new BMessage(B_ABOUT_REQUESTED));
item->SetTarget(gPCView);
addtopbottom(item);

View File

@ -44,8 +44,8 @@ void PulseView::Init() {
popupmenu->SetFont(be_plain_font);
mode1 = new BMenuItem("", NULL, 0, 0);
mode2 = new BMenuItem("", NULL, 0, 0);
preferences = new BMenuItem("Preferences...", new BMessage(PV_PREFERENCES), 0, 0);
about = new BMenuItem("About...", new BMessage(PV_ABOUT), 0, 0);
preferences = new BMenuItem("Preferences" B_UTF8_ELLIPSIS, new BMessage(PV_PREFERENCES), 0, 0);
about = new BMenuItem("About Pulse" B_UTF8_ELLIPSIS, new BMessage(PV_ABOUT), 0, 0);
popupmenu->AddItem(mode1);
popupmenu->AddItem(mode2);

View File

@ -129,7 +129,7 @@ StyledEditWindow::InitWindow(uint32 encoding)
menu->AddItem(menuItem = new BMenuItem("New", new BMessage(MENU_NEW), 'N'));
menuItem->SetTarget(be_app);
menu->AddItem(menuItem = new BMenuItem(fRecentMenu = new BMenu("Open..."),
menu->AddItem(menuItem = new BMenuItem(fRecentMenu = new BMenu("Open" B_UTF8_ELLIPSIS),
new BMessage(MENU_OPEN)));
menuItem->SetShortcut('O', 0);
menuItem->SetTarget(be_app);
@ -137,18 +137,18 @@ StyledEditWindow::InitWindow(uint32 encoding)
menu->AddItem(fSaveItem = new BMenuItem("Save", new BMessage(MENU_SAVE), 'S'));
fSaveItem->SetEnabled(false);
menu->AddItem(menuItem = new BMenuItem("Save As...", new BMessage(MENU_SAVEAS)));
menu->AddItem(menuItem = new BMenuItem("Save As" B_UTF8_ELLIPSIS, new BMessage(MENU_SAVEAS)));
menuItem->SetShortcut('S',B_SHIFT_KEY);
menuItem->SetEnabled(true);
menu->AddItem(fRevertItem = new BMenuItem("Revert to Saved...",
menu->AddItem(fRevertItem = new BMenuItem("Revert to Saved" B_UTF8_ELLIPSIS,
new BMessage(MENU_REVERT)));
fRevertItem->SetEnabled(false);
menu->AddItem(menuItem = new BMenuItem("Close", new BMessage(MENU_CLOSE), 'W'));
menu->AddSeparatorItem();
menu->AddItem(menuItem = new BMenuItem("Page Setup...", new BMessage(MENU_PAGESETUP)));
menu->AddItem(menuItem = new BMenuItem("Print...", new BMessage(MENU_PRINT), 'P'));
menu->AddItem(menuItem = new BMenuItem("Page Setup" B_UTF8_ELLIPSIS, new BMessage(MENU_PAGESETUP)));
menu->AddItem(menuItem = new BMenuItem("Print" B_UTF8_ELLIPSIS, new BMessage(MENU_PRINT), 'P'));
menu->AddSeparatorItem();
menu->AddItem(menuItem = new BMenuItem("Quit", new BMessage(MENU_QUIT), 'Q'));
@ -180,12 +180,12 @@ StyledEditWindow::InitWindow(uint32 encoding)
menuItem->SetTarget(fTextView);
menu->AddSeparatorItem();
menu->AddItem(menuItem = new BMenuItem("Find...", new BMessage(MENU_FIND),'F'));
menu->AddItem(menuItem = new BMenuItem("Find" B_UTF8_ELLIPSIS, new BMessage(MENU_FIND),'F'));
menu->AddItem(fFindAgainItem= new BMenuItem("Find Again",new BMessage(MENU_FIND_AGAIN),'G'));
fFindAgainItem->SetEnabled(false);
menu->AddItem(menuItem = new BMenuItem("Find Selection", new BMessage(MENU_FIND_SELECTION),'H'));
menu->AddItem(menuItem = new BMenuItem("Replace...", new BMessage(MENU_REPLACE),'R'));
menu->AddItem(menuItem = new BMenuItem("Replace" B_UTF8_ELLIPSIS, new BMessage(MENU_REPLACE),'R'));
menu->AddItem(fReplaceSameItem = new BMenuItem("Replace Same", new BMessage(MENU_REPLACE_SAME),'T'));
fReplaceSameItem->SetEnabled(false);

View File

@ -48,7 +48,7 @@ PrefWindow::PrefWindow(BMessenger messenger)
fPrefDlgMessenger);
top->AddChild(prefView);
fSaveAsFileButton = new BButton(BRect(0, 0, 1, 1), "savebutton", "Save to File",
fSaveAsFileButton = new BButton(BRect(0, 0, 1, 1), "savebutton", "Save to File" B_UTF8_ELLIPSIS,
new BMessage(MSG_SAVEAS_PRESSED), B_FOLLOW_TOP, B_WILL_DRAW);
fSaveAsFileButton->ResizeToPreferred();
fSaveAsFileButton->MoveTo(5, top->Bounds().Height() - 5 -

View File

@ -221,12 +221,12 @@ TermWindow::SetupMenu(void)
// Make File Menu.
fFilemenu = new BMenu("Terminal");
fFilemenu->AddItem(new BMenuItem("Switch Terminals", new BMessage(MENU_SWITCH_TERM),'G'));
fFilemenu->AddItem(new BMenuItem("Start New Terminal", new BMessage(MENU_NEW_TERM), 'N'));
fFilemenu->AddItem(new BMenuItem("New Terminal" B_UTF8_ELLIPSIS, new BMessage(MENU_NEW_TERM), 'N'));
fFilemenu->AddSeparatorItem();
fFilemenu->AddItem(new BMenuItem("Page Setup...", new BMessage(MENU_PAGE_SETUP)));
fFilemenu->AddItem(new BMenuItem("Print", new BMessage(MENU_PRINT),'P'));
fFilemenu->AddSeparatorItem();
fFilemenu->AddItem(new BMenuItem("About Terminal...", new BMessage(B_ABOUT_REQUESTED)));
fFilemenu->AddItem(new BMenuItem("About Terminal" B_UTF8_ELLIPSIS, new BMessage(B_ABOUT_REQUESTED)));
fFilemenu->AddSeparatorItem();
fFilemenu->AddItem(new BMenuItem("Quit", new BMessage(B_QUIT_REQUESTED), 'Q'));
fMenubar->AddItem(fFilemenu);
@ -239,7 +239,7 @@ TermWindow::SetupMenu(void)
fEditmenu->AddItem (new BMenuItem ("Select All", new BMessage (B_SELECT_ALL), 'A'));
fEditmenu->AddItem (new BMenuItem ("Clear All", new BMessage (MENU_CLEAR_ALL), 'L'));
fEditmenu->AddSeparatorItem ();
fEditmenu->AddItem (new BMenuItem ("Find", new BMessage (MENU_FIND_STRING),'F'));
fEditmenu->AddItem (new BMenuItem ("Find" B_UTF8_ELLIPSIS, new BMessage (MENU_FIND_STRING),'F'));
fFindBackwardMenuItem = new BMenuItem ("Find Backward", new BMessage (MENU_FIND_BACKWARD), '[');
fEditmenu->AddItem (fFindBackwardMenuItem);
fFindBackwardMenuItem->SetEnabled(false);
@ -282,7 +282,7 @@ TermWindow::SetupMenu(void)
fHelpmenu->AddItem(fEncodingmenu);
// fHelpmenu->AddItem(fNewFontMenu);
fHelpmenu->AddSeparatorItem();
fHelpmenu->AddItem(new BMenuItem("Preferences", new BMessage(MENU_PREF_OPEN)));
fHelpmenu->AddItem(new BMenuItem("Preferences" B_UTF8_ELLIPSIS, new BMessage(MENU_PREF_OPEN)));
fHelpmenu->AddSeparatorItem();
fHelpmenu->AddItem(new BMenuItem("Save as default", new BMessage(SAVE_AS_DEFAULT)));
fMenubar->AddItem(fHelpmenu);

View File

@ -126,10 +126,10 @@ TerminalWindow::InitWindow(int32 id, entry_ref * settingsRef)
fTerminal->AddItem(fSwitchTerminals);
fSwitchTerminals->SetTrigger('T');
fStartNewTerminal = new BMenuItem("Start New Terminal", new BMessage(TERMINAL_START_NEW_TERMINAL), 'N');
fStartNewTerminal = new BMenuItem("New Terminal" B_UTF8_ELLIPSIS, new BMessage(TERMINAL_START_NEW_TERMINAL), 'N');
fTerminal->AddItem(fStartNewTerminal);
fLogToFile = new BMenuItem("Log to File...", new BMessage(TERMINAL_LOG_TO_FILE));
fLogToFile = new BMenuItem("Log to File" B_UTF8_ELLIPSIS, new BMessage(TERMINAL_LOG_TO_FILE));
fTerminal->AddItem(fLogToFile);
// Edit menu
@ -148,7 +148,7 @@ TerminalWindow::InitWindow(int32 id, entry_ref * settingsRef)
fSelectAll = new BMenuItem("Select All", new BMessage(B_SELECT_ALL), 'A');
fEdit->AddItem(fSelectAll);
fWriteSelection = new BMenuItem("Write Selection...", new BMessage(EDIT_WRITE_SELECTION));
fWriteSelection = new BMenuItem("Write Selection" B_UTF8_ELLIPSIS, new BMessage(EDIT_WRITE_SELECTION));
fEdit->AddItem(fWriteSelection);
fClearAll = new BMenuItem("Clear All", new BMessage(EDIT_CLEAR_ALL), 'L');
@ -156,7 +156,7 @@ TerminalWindow::InitWindow(int32 id, entry_ref * settingsRef)
fEdit->AddSeparatorItem();
fFind = new BMenuItem("Find...", new BMessage(EDIT_FIND),'F');
fFind = new BMenuItem("Find" B_UTF8_ELLIPSIS, new BMessage(EDIT_FIND),'F');
fEdit->AddItem(fFind);
fFindBackward = new BMenuItem("Find Backward",new BMessage(EDIT_FIND_BACKWARD),'[');

View File

@ -158,7 +158,7 @@ MainWin::CreateMenu()
fMenuBar->AddItem(fSettingsMenu);
fMenuBar->AddItem(fDebugMenu);
fFileMenu->AddItem(new BMenuItem("About", new BMessage(M_FILE_ABOUT), 'A', B_COMMAND_KEY));
fFileMenu->AddItem(new BMenuItem("About " NAME B_UTF8_ELLIPSIS, new BMessage(M_FILE_ABOUT)));
fFileMenu->AddSeparatorItem();
fFileMenu->AddItem(new BMenuItem("Quit", new BMessage(M_FILE_QUIT), 'Q', B_COMMAND_KEY));
@ -488,7 +488,7 @@ MainWin::ShowContextMenu(const BPoint &screen_point)
menu->AddItem(item = new BMenuItem("Keep Aspect Ratio", new BMessage(M_TOGGLE_KEEP_ASPECT_RATIO), 'K', B_COMMAND_KEY));
item->SetMarked(fKeepAspectRatio);
menu->AddSeparatorItem();
menu->AddItem(new BMenuItem("About", new BMessage(M_FILE_ABOUT), 'A', B_COMMAND_KEY));
menu->AddItem(new BMenuItem("About " NAME B_UTF8_ELLIPSIS, new BMessage(M_FILE_ABOUT)));
menu->AddSeparatorItem();
menu->AddItem(new BMenuItem("Quit", new BMessage(M_FILE_QUIT), 'Q', B_COMMAND_KEY));

View File

@ -593,7 +593,7 @@ BDragger::_BuildDefaultPopUp()
msg->AddString("target", name);
char about[B_OS_NAME_LENGTH];
snprintf(about, B_OS_NAME_LENGTH, "About %s", name);
snprintf(about, B_OS_NAME_LENGTH, "About %s" B_UTF8_ELLIPSIS, name);
fPopUp->AddItem(new BMenuItem(about, msg));
fPopUp->AddSeparatorItem();

View File

@ -211,7 +211,7 @@ DataTranslationsWindow::_SetupViews()
// Add the translator info button
BRect infoRect(0, 0, 80, 20);
BButton *button = new BButton(infoRect, "STD", "Info...",
BButton *button = new BButton(infoRect, "STD", "Info" B_UTF8_ELLIPSIS,
new BMessage(kMsgTranslatorInfo), B_FOLLOW_BOTTOM | B_FOLLOW_RIGHT,
B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE);
button->ResizeToPreferred();

View File

@ -153,8 +153,8 @@ void DevicesWindow::InitWindow(void)
menubar->AddItem(menu);
BMenu *jumperedDevicesMenu = new BMenu("New Jumpered Device");
jumperedDevicesMenu->AddItem(new BMenuItem("Custom ...", new BMessage(MENU_DEVICES_NEW_JUMPERED_DEVICE_CUSTOM), 0));
jumperedDevicesMenu->AddItem(new BMenuItem("Modem ...", new BMessage(MENU_DEVICES_NEW_JUMPERED_DEVICE_MODEM), 0));
jumperedDevicesMenu->AddItem(new BMenuItem("Custom" B_UTF8_ELLIPSIS, new BMessage(MENU_DEVICES_NEW_JUMPERED_DEVICE_CUSTOM), 0));
jumperedDevicesMenu->AddItem(new BMenuItem("Modem" B_UTF8_ELLIPSIS, new BMessage(MENU_DEVICES_NEW_JUMPERED_DEVICE_MODEM), 0));
//DevicesMenu->AddItem(new BMenuItem("New Jumpered Device", new BMessage(MENU_DEVICES_NEW_JUMPERED_DEVICE), NULL));
menu->AddItem(jumperedDevicesMenu);

View File

@ -58,7 +58,7 @@ void DUNWindow::InitWindow() {
float ButtonWidth = 24;
BRect btn1(10,ButtonTop,83,ButtonTop+ButtonWidth);
modembutton = new BButton(btn1,"Modem","Modem...", new BMessage(BTN_MODEM), B_FOLLOW_BOTTOM, B_WILL_DRAW | B_NAVIGABLE);
modembutton = new BButton(btn1,"Modem","Modem" B_UTF8_ELLIPSIS, new BMessage(BTN_MODEM), B_FOLLOW_BOTTOM, B_WILL_DRAW | B_NAVIGABLE);
BRect btn2(143,ButtonTop,218,ButtonTop+ButtonWidth);
disconnectbutton = new BButton(btn2,"Disconnect","Disconnect", new BMessage(BTN_DISCONNECT), B_FOLLOW_BOTTOM, B_WILL_DRAW | B_NAVIGABLE);
BRect btn3(230,ButtonTop,302,ButtonTop+ButtonWidth);
@ -82,7 +82,7 @@ void DUNWindow::InitWindow() {
conmenufield = new BMenu("Click to add");
//conmenufield = new BPopUpMenu("Click to add");
conmenufield->AddSeparatorItem();
conmenufield->AddItem(menuconnew = new BMenuItem("New...", new BMessage(MENU_CON_NEW)));
conmenufield->AddItem(menuconnew = new BMenuItem("New" B_UTF8_ELLIPSIS, new BMessage(MENU_CON_NEW)));
//menuconnew->SetTarget(be_app);
conmenufield->AddItem(menucondelete = new BMenuItem("Delete Current", new BMessage(MENU_CON_DELETE_CURRENT)));
menucondelete->SetEnabled(false);
@ -114,7 +114,7 @@ void DUNWindow::InitWindow() {
//menulocwork->SetTarget(be_app);
locmenufield->AddSeparatorItem();
locmenufield->AddItem(menulocnew = new BMenuItem("New...", new BMessage(MENU_LOC_NEW)));
locmenufield->AddItem(menulocnew = new BMenuItem("New" B_UTF8_ELLIPSIS, new BMessage(MENU_LOC_NEW)));
//menulocnew->SetTarget(be_app);
locmenufield->AddItem(menulocdelete = new BMenuItem("Delete Current", new BMessage(MENU_LOC_DELETE_CURRENT)));

View File

@ -55,7 +55,7 @@ BView(BRect(40,31,290,157),"detailsview",B_FOLLOW_NONE,B_WILL_DRAW)
btnr.top = btnr.bottom - 24;
btnr.left = btnr.right - 70;
settingsbtn = new BButton(btnr,"Settings...","Settings...", new BMessage(BTN_SETTINGS), B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_NAVIGABLE);
settingsbtn = new BButton(btnr,"Settings","Settings" B_UTF8_ELLIPSIS", new BMessage(BTN_SETTINGS), B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_NAVIGABLE);
AddChild(settingsbtn);
}
void DetailsView::MessageReceived(BMessage* msg)

View File

@ -50,7 +50,7 @@ void ModemWindow::InitWindow(void)
BRect btn1(10,r.bottom - 34,83,r.bottom - 16);
BRect btn2(108,r.bottom - 34,184,r.bottom - 16);
BRect btn3(196,r.bottom - 34,271,r.bottom - 16);
btnModemWindowCustom = new BButton(btn1,"Custom"," Custom ... ", new BMessage(BTN_MODEM_WINDOW_CUSTOM), B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_NAVIGABLE);
btnModemWindowCustom = new BButton(btn1,"Custom"," Custom" B_UTF8_ELLIPSIS " ", new BMessage(BTN_MODEM_WINDOW_CUSTOM), B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_NAVIGABLE);
btnModemWindowCancel = new BButton(btn2,"Cancel"," Cancel ", new BMessage(BTN_MODEM_WINDOW_CANCEL), B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_NAVIGABLE);
btnModemWindowDone = new BButton(btn3,"Done"," Done ", new BMessage(BTN_MODEM_WINDOW_DONE), B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_NAVIGABLE);
@ -59,7 +59,7 @@ void ModemWindow::InitWindow(void)
BMenuItem *menu[100];
YourModemIsMenu = new BMenu("<Pick One> ");
YourModemIsMenu->AddSeparatorItem();
YourModemIsMenu->AddItem(menu[1] = new BMenuItem("New...", new BMessage(MENU)));
YourModemIsMenu->AddItem(menu[1] = new BMenuItem("New" B_UTF8_ELLIPSIS, new BMessage(MENU)));
menu[1]->SetTarget(be_app);
YourModemIsMenuField = new BMenuField(mfld1,"yourmodem_menufield","Your modem is:",YourModemIsMenu,B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_NAVIGABLE);
YourModemIsMenuField->SetDivider(76);

View File

@ -144,7 +144,7 @@ void SettingsWindow::InitWindow()
BMenuItem* item1 = new BMenuItem("Standard PPP",NULL); //n.b bmessage left out, add later
YourServerTypeIsMenu->AddItem(item1);
BMenuItem* item2 = new BMenuItem("etc,etc...",NULL);
BMenuItem* item2 = new BMenuItem("Etc" B_UTF8_ELLIPSIS,NULL);
YourServerTypeIsMenu->AddItem(item2);

View File

@ -58,7 +58,7 @@ MenuBar::_BuildMenu()
new BMessage(ALT_MARKED_MSG), BTranslationUtils::GetBitmap(B_RAW_TYPE, "ALT"));
// color menu
BMenuItem* colorSchemeItem = new BMenuItem("Color Scheme...",
BMenuItem* colorSchemeItem = new BMenuItem("Color Scheme" B_UTF8_ELLIPSIS,
new BMessage(COLOR_SCHEME_OPEN_MSG), 0, 0);
// Add items to menubar

View File

@ -206,7 +206,7 @@ NetworkWindow::NetworkWindow()
fIdentityView->AddChild(fInterfaces);
workrect = fInterfaces->Bounds().InsetByCopy(5,5);
fSettings = new BButton(BRect(0,0,1,1),"Settings","Settings...",
fSettings = new BButton(BRect(0,0,1,1),"Settings","Settings" B_UTF8_ELLIPSIS,
new BMessage(kSettings_M),
B_FOLLOW_TOP | B_FOLLOW_RIGHT);
fSettings->ResizeToPreferred();
@ -221,7 +221,7 @@ NetworkWindow::NetworkWindow()
fInterfaces->AddChild(fClear);
workrect.OffsetBy(0,workrect.Height()+15);
fCustom = new BButton(workrect,"Custom","Custom...",new BMessage(kCustom_M),
fCustom = new BButton(workrect,"Custom","Custom" B_UTF8_ELLIPSIS,new BMessage(kCustom_M),
B_FOLLOW_TOP | B_FOLLOW_RIGHT);
fInterfaces->AddChild(fCustom);
@ -257,7 +257,7 @@ NetworkWindow::NetworkWindow()
fTelnetServer->MoveTo(10,height + 15);
fServicesView->AddChild(fTelnetServer);
fLoginInfo = new BButton(workrect,"Login_Info","Login Info...",
fLoginInfo = new BButton(workrect,"Login_Info","Login Info" B_UTF8_ELLIPSIS,
new BMessage(kLogin_Info_M));
fLoginInfo->ResizeToPreferred();
fLoginInfo->MoveTo(10,(height * 2) + 25);