Updated to use B_TRANSLATE* macros. relates to #5408.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36668 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+83
-77
@@ -19,17 +19,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of Be Incorporated shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings in
|
||||
this Software without prior written authorization from Be Incorporated.
|
||||
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
|
||||
of Be Incorporated in the United States and other countries. Other brand product
|
||||
names are registered trademarks or trademarks of their respective holders.
|
||||
All rights reserved.
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
|
||||
registered trademarks of Be Incorporated in the United States and other
|
||||
countries. Other brand product names are registered trademarks or trademarks
|
||||
of their respective holders. All rights reserved.
|
||||
*/
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ void Unicode2UTF8(int32 c, char **out);
|
||||
|
||||
|
||||
inline bool
|
||||
IsInitialUTF8Byte(uchar b)
|
||||
IsInitialUTF8Byte(uchar b)
|
||||
{
|
||||
return ((b & 0xC0) != 0x80);
|
||||
}
|
||||
@@ -309,7 +309,7 @@ CheckForURL(const char *string, size_t &urlLength, BString *url = NULL)
|
||||
for (const char **prefix = urlPrefixes; *prefix != 0; prefix++) {
|
||||
if (!cistrncmp(string, *prefix, strlen(*prefix))) {
|
||||
type = TYPE_URL;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -458,7 +458,7 @@ FillInQuoteTextRuns(BTextView* view, quote_context* context, const char* line,
|
||||
{
|
||||
text_run* runs = style->runs;
|
||||
int32 index = style->count;
|
||||
bool begin;
|
||||
bool begin;
|
||||
int32 pos = 0;
|
||||
int32 diffMode = 0;
|
||||
bool inDiff = false;
|
||||
@@ -742,8 +742,9 @@ TContentView::MessageReceived(BMessage *msg)
|
||||
} else {
|
||||
beep();
|
||||
(new BAlert("",
|
||||
TR("An error occurred trying to open this signature."),
|
||||
TR("Sorry")))->Go();
|
||||
B_TRANSLATE("An error occurred trying to open this "
|
||||
"signature."),
|
||||
B_TRANSLATE("Sorry")))->Go();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -768,9 +769,9 @@ TContentView::FindString(const char *str)
|
||||
if (str == NULL)
|
||||
return;
|
||||
|
||||
//
|
||||
//
|
||||
// Start from current selection or from the beginning of the pool
|
||||
//
|
||||
//
|
||||
const char *text = fTextView->Text();
|
||||
int32 count = fTextView->TextLength();
|
||||
fTextView->GetSelection(&start, &finish);
|
||||
@@ -779,7 +780,7 @@ TContentView::FindString(const char *str)
|
||||
if (!count || text == NULL)
|
||||
return;
|
||||
|
||||
//
|
||||
//
|
||||
// Do the find
|
||||
//
|
||||
while (pass < 2) {
|
||||
@@ -800,10 +801,10 @@ TContentView::FindString(const char *str)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
//
|
||||
// Select the text if it worked
|
||||
//
|
||||
//
|
||||
if (found != -1) {
|
||||
Window()->Activate();
|
||||
fTextView->Select(found, found + strlen(str));
|
||||
@@ -839,7 +840,7 @@ TContentView::FrameResized(float /* width */, float /* height */)
|
||||
{
|
||||
BRect r(fTextView->Bounds());
|
||||
r.OffsetTo(0, 0);
|
||||
r.InsetBy(5, 5);
|
||||
r.InsetBy(5, 5);
|
||||
fTextView->SetTextRect(r);
|
||||
}
|
||||
|
||||
@@ -882,9 +883,9 @@ TTextView::TTextView(BRect frame, BRect text, bool incoming,
|
||||
//
|
||||
fEnclosureMenu = new BPopUpMenu("Enclosure", false, false);
|
||||
fEnclosureMenu->SetFont(&menuFont);
|
||||
fEnclosureMenu->AddItem(new BMenuItem(TR("Save attachment" B_UTF8_ELLIPSIS),
|
||||
new BMessage(M_SAVE)));
|
||||
fEnclosureMenu->AddItem(new BMenuItem(TR("Open attachment"),
|
||||
fEnclosureMenu->AddItem(new BMenuItem(
|
||||
B_TRANSLATE("Save attachment" B_UTF8_ELLIPSIS), new BMessage(M_SAVE)));
|
||||
fEnclosureMenu->AddItem(new BMenuItem(B_TRANSLATE("Open attachment"),
|
||||
new BMessage(M_OPEN)));
|
||||
|
||||
//
|
||||
@@ -892,9 +893,9 @@ TTextView::TTextView(BRect frame, BRect text, bool incoming,
|
||||
//
|
||||
fLinkMenu = new BPopUpMenu("Link", false, false);
|
||||
fLinkMenu->SetFont(&menuFont);
|
||||
fLinkMenu->AddItem(new BMenuItem(TR("Open this link"),
|
||||
fLinkMenu->AddItem(new BMenuItem(B_TRANSLATE("Open this link"),
|
||||
new BMessage(M_OPEN)));
|
||||
fLinkMenu->AddItem(new BMenuItem(TR("Copy link location"),
|
||||
fLinkMenu->AddItem(new BMenuItem(B_TRANSLATE("Copy link location"),
|
||||
new BMessage(M_COPY)));
|
||||
|
||||
SetDoesUndo(true);
|
||||
@@ -1060,8 +1061,8 @@ TTextView::KeyDown(const char *key, int32 count)
|
||||
end = textLen;
|
||||
break;
|
||||
}
|
||||
}
|
||||
start = end;
|
||||
}
|
||||
start = end;
|
||||
}
|
||||
Select(start, start);
|
||||
ScrollToSelection();
|
||||
@@ -1124,7 +1125,7 @@ TTextView::KeyDown(const char *key, int32 count)
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
BTextView::KeyDown(key, count);
|
||||
break;
|
||||
|
||||
@@ -1314,10 +1315,10 @@ TTextView::MessageReceived(BMessage *msg)
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
// Tracker has responded to a BMessage that was dragged out of
|
||||
//
|
||||
// Tracker has responded to a BMessage that was dragged out of
|
||||
// this email message. It has created a file for us, we just have to
|
||||
// put the stuff in it.
|
||||
// put the stuff in it.
|
||||
//
|
||||
case B_COPY_TARGET:
|
||||
{
|
||||
@@ -1327,20 +1328,20 @@ TTextView::MessageReceived(BMessage *msg)
|
||||
const char *name;
|
||||
hyper_text *enclosure;
|
||||
|
||||
if (data.FindPointer("enclosure", (void **)&enclosure) == B_OK
|
||||
&& msg->FindString("name", &name) == B_OK
|
||||
if (data.FindPointer("enclosure", (void **)&enclosure) == B_OK
|
||||
&& msg->FindString("name", &name) == B_OK
|
||||
&& msg->FindRef("directory", &directory) == B_OK) {
|
||||
switch (enclosure->type) {
|
||||
case TYPE_ENCLOSURE:
|
||||
case TYPE_BE_ENCLOSURE:
|
||||
{
|
||||
//
|
||||
// Enclosure. Decode the data and write it out.
|
||||
// Enclosure. Decode the data and write it out.
|
||||
//
|
||||
BMessage saveMsg(M_SAVE);
|
||||
saveMsg.AddString("name", name);
|
||||
saveMsg.AddRef("directory", &directory);
|
||||
saveMsg.AddPointer("enclosure", enclosure);
|
||||
saveMsg.AddPointer("enclosure", enclosure);
|
||||
Save(&saveMsg, false);
|
||||
break;
|
||||
}
|
||||
@@ -1352,14 +1353,14 @@ TTextView::MessageReceived(BMessage *msg)
|
||||
// drag recipient didn't ask for any specific type,
|
||||
// create a bookmark file as default
|
||||
replyType = "application/x-vnd.Be-bookmark";
|
||||
|
||||
BDirectory dir(&directory);
|
||||
|
||||
BDirectory dir(&directory);
|
||||
BFile file(&dir, name, B_READ_WRITE);
|
||||
if (file.InitCheck() == B_OK) {
|
||||
if (strcmp(replyType, "application/x-vnd.Be-bookmark") == 0) {
|
||||
// we got a request to create a bookmark, stuff
|
||||
// it with the url attribute
|
||||
file.WriteAttr("META:url", B_STRING_TYPE, 0,
|
||||
file.WriteAttr("META:url", B_STRING_TYPE, 0,
|
||||
enclosure->name, strlen(enclosure->name) + 1);
|
||||
} else if (strcasecmp(replyType, "text/plain") == 0) {
|
||||
// create a plain text file, stuff it with
|
||||
@@ -1376,8 +1377,8 @@ TTextView::MessageReceived(BMessage *msg)
|
||||
case TYPE_MAILTO:
|
||||
{
|
||||
//
|
||||
// Add some attributes to the already created
|
||||
// person file. Strip out the 'mailto:' if
|
||||
// Add some attributes to the already created
|
||||
// person file. Strip out the 'mailto:' if
|
||||
// possible.
|
||||
//
|
||||
char *addrStart = enclosure->name;
|
||||
@@ -1388,7 +1389,7 @@ TTextView::MessageReceived(BMessage *msg)
|
||||
}
|
||||
|
||||
if (*addrStart == '\0') {
|
||||
addrStart = enclosure->name;
|
||||
addrStart = enclosure->name;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1401,13 +1402,13 @@ TTextView::MessageReceived(BMessage *msg)
|
||||
// create a bookmark file as default
|
||||
replyType = "application/x-vnd.Be-bookmark";
|
||||
|
||||
BDirectory dir(&directory);
|
||||
BDirectory dir(&directory);
|
||||
BFile file(&dir, name, B_READ_WRITE);
|
||||
if (file.InitCheck() == B_OK) {
|
||||
if (!strcmp(replyType, "application/x-person")) {
|
||||
// we got a request to create a bookmark, stuff
|
||||
// it with the address attribute
|
||||
file.WriteAttr("META:email", B_STRING_TYPE, 0,
|
||||
file.WriteAttr("META:email", B_STRING_TYPE, 0,
|
||||
addrStart, strlen(enclosure->name) + 1);
|
||||
} else if (!strcasecmp(replyType, "text/plain")) {
|
||||
// create a plain text file, stuff it with the
|
||||
@@ -1423,7 +1424,7 @@ TTextView::MessageReceived(BMessage *msg)
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Assume this is handled by BTextView...
|
||||
// Assume this is handled by BTextView...
|
||||
// (Probably drag clipping.)
|
||||
//
|
||||
BTextView::MessageReceived(msg);
|
||||
@@ -1444,7 +1445,8 @@ TTextView::MessageReceived(BMessage *msg)
|
||||
case B_INPUT_METHOD_STOPPED:
|
||||
fInputMethodUndoState.active = false;
|
||||
if (fInputMethodUndoBuffer.CountItems() > 0) {
|
||||
KUndoItem *undo = fInputMethodUndoBuffer.ItemAt(fInputMethodUndoBuffer.CountItems() - 1);
|
||||
KUndoItem *undo = fInputMethodUndoBuffer.ItemAt(
|
||||
fInputMethodUndoBuffer.CountItems() - 1);
|
||||
if (undo->History == K_INSERTED){
|
||||
fUndoBuffer.MakeNewUndoItem();
|
||||
fUndoBuffer.AddUndo(undo->RedoText, undo->Length,
|
||||
@@ -1548,7 +1550,7 @@ TTextView::MouseDown(BPoint where)
|
||||
BMenuItem *addItem = NULL;
|
||||
if (!foundWord && gUserDict >= 0) {
|
||||
menu.AddSeparatorItem();
|
||||
addItem = new BMenuItem(TR("Add"), NULL);
|
||||
addItem = new BMenuItem(B_TRANSLATE("Add"), NULL);
|
||||
menu.AddItem(addItem);
|
||||
}
|
||||
|
||||
@@ -1606,12 +1608,12 @@ TTextView::MouseDown(BPoint where)
|
||||
bool held = false;
|
||||
uint32 buttons = 0;
|
||||
if (Window()->CurrentMessage()) {
|
||||
Window()->CurrentMessage()->FindInt32("buttons",
|
||||
Window()->CurrentMessage()->FindInt32("buttons",
|
||||
(int32 *) &buttons);
|
||||
}
|
||||
|
||||
//
|
||||
// If this is the primary button, wait to see if the user is going
|
||||
// If this is the primary button, wait to see if the user is going
|
||||
// to single click, hold, or drag.
|
||||
//
|
||||
if (buttons != B_SECONDARY_MOUSE_BUTTON) {
|
||||
@@ -1644,8 +1646,8 @@ TTextView::MouseDown(BPoint where)
|
||||
}
|
||||
|
||||
//
|
||||
// If the user has right clicked on this menu,
|
||||
// or held the button down on it for a while,
|
||||
// If the user has right clicked on this menu,
|
||||
// or held the button down on it for a while,
|
||||
// pop up a context menu.
|
||||
//
|
||||
if (buttons == B_SECONDARY_MOUSE_BUTTON || held) {
|
||||
@@ -1673,7 +1675,7 @@ TTextView::MouseDown(BPoint where)
|
||||
}
|
||||
} else if (msg->what == M_COPY) {
|
||||
// copy link location to clipboard
|
||||
|
||||
|
||||
if (be_clipboard->Lock()) {
|
||||
be_clipboard->Clear();
|
||||
|
||||
@@ -1690,7 +1692,7 @@ TTextView::MouseDown(BPoint where)
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Left button. If the user single clicks, open this link.
|
||||
// Left button. If the user single clicks, open this link.
|
||||
// Otherwise, initiate a drag.
|
||||
//
|
||||
if (drag) {
|
||||
@@ -1711,7 +1713,7 @@ TTextView::MouseDown(BPoint where)
|
||||
|
||||
case TYPE_URL:
|
||||
//
|
||||
// URL. The user can drag it into the tracker to
|
||||
// URL. The user can drag it into the tracker to
|
||||
// create a bookmark file.
|
||||
//
|
||||
dragMessage.AddString("be:types", B_FILE_MIME_TYPE);
|
||||
@@ -1719,7 +1721,7 @@ TTextView::MouseDown(BPoint where)
|
||||
"application/x-vnd.Be-bookmark");
|
||||
dragMessage.AddString("be:filetypes", "text/plain");
|
||||
dragMessage.AddString("be:clip_name", "Bookmark");
|
||||
|
||||
|
||||
dragMessage.AddString("be:url", enclosure->name);
|
||||
break;
|
||||
|
||||
@@ -1729,28 +1731,28 @@ TTextView::MouseDown(BPoint where)
|
||||
// tracker to create a people file.
|
||||
//
|
||||
dragMessage.AddString("be:types", B_FILE_MIME_TYPE);
|
||||
dragMessage.AddString("be:filetypes",
|
||||
dragMessage.AddString("be:filetypes",
|
||||
"application/x-person");
|
||||
dragMessage.AddString("be:filetypes", "text/plain");
|
||||
dragMessage.AddString("be:clip_name", "Person");
|
||||
|
||||
|
||||
dragMessage.AddString("be:email", enclosure->name);
|
||||
break;
|
||||
|
||||
default:
|
||||
//
|
||||
//
|
||||
// Otherwise it doesn't have a type that I know how
|
||||
// to save. It won't have any types and if any
|
||||
// program wants to accept it, more power to them.
|
||||
// (tracker won't.)
|
||||
//
|
||||
//
|
||||
dragMessage.AddString("be:clip_name", "Hyperlink");
|
||||
}
|
||||
|
||||
BMessage data;
|
||||
data.AddPointer("enclosure", enclosure);
|
||||
dragMessage.AddMessage("be:originator-data", &data);
|
||||
|
||||
|
||||
BRegion selectRegion;
|
||||
GetTextRegion(start, finish, &selectRegion);
|
||||
DragMessage(&dragMessage, selectRegion.Frame(), this);
|
||||
@@ -1758,7 +1760,7 @@ TTextView::MouseDown(BPoint where)
|
||||
//
|
||||
// User Single clicked on the attachment. Open it.
|
||||
//
|
||||
Open(enclosure);
|
||||
Open(enclosure);
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -1890,7 +1892,8 @@ TTextView::Open(hyper_text *enclosure)
|
||||
if (result != B_NO_ERROR && result != B_ALREADY_RUNNING) {
|
||||
beep();
|
||||
(new BAlert("",
|
||||
TR("There is no installed handler for URL links."),
|
||||
B_TRANSLATE("There is no installed handler for "
|
||||
"URL links."),
|
||||
"Sorry"))->Go();
|
||||
}
|
||||
break;
|
||||
@@ -1971,12 +1974,12 @@ TTextView::Save(BMessage *msg, bool makeNewFile)
|
||||
BEntry entry;
|
||||
if (dir.FindEntry(name, &entry) == B_NO_ERROR)
|
||||
entry.Remove();
|
||||
|
||||
|
||||
if ((enclosure->have_ref) && (!enclosure->saved)) {
|
||||
entry.SetTo(&enclosure->ref);
|
||||
|
||||
|
||||
//
|
||||
// Added true arg and entry_name so MoveTo clobbers as
|
||||
// Added true arg and entry_name so MoveTo clobbers as
|
||||
// before. This may not be the correct behaviour, but
|
||||
// it's the preserved behaviour.
|
||||
//
|
||||
@@ -1990,7 +1993,7 @@ TTextView::Save(BMessage *msg, bool makeNewFile)
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (result == B_NO_ERROR) {
|
||||
result = dir.CreateFile(name, &file);
|
||||
if (result == B_NO_ERROR && enclosure->content_type) {
|
||||
@@ -2009,7 +2012,7 @@ TTextView::Save(BMessage *msg, bool makeNewFile)
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// This file was dragged into the tracker or desktop. The file
|
||||
// This file was dragged into the tracker or desktop. The file
|
||||
// already exists.
|
||||
//
|
||||
result = file.SetTo(&dir, name, B_WRITE_ONLY);
|
||||
@@ -2035,12 +2038,13 @@ TTextView::Save(BMessage *msg, bool makeNewFile)
|
||||
!cistrcmp("application/octet-stream", enclosure->content_type ? enclosure->content_type : B_EMPTY_STRING));
|
||||
entry.GetNodeRef(&enclosure->node);
|
||||
watch_node(&enclosure->node, B_WATCH_NAME, this);
|
||||
}
|
||||
}
|
||||
|
||||
if (result != B_NO_ERROR) {
|
||||
beep();
|
||||
(new BAlert("", TR("An error occurred trying to save the attachment."),
|
||||
TR("Sorry")))->Go();
|
||||
(new BAlert("", B_TRANSLATE("An error occurred trying to save "
|
||||
"the attachment."),
|
||||
B_TRANSLATE("Sorry")))->Go();
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -2237,7 +2241,7 @@ TTextView::AddAsContent(BEmailMessage *mail, bool wrap, uint32 charset, mail_enc
|
||||
if (vScroller != NULL)
|
||||
vScroller->SetTarget(this);
|
||||
if (hScroller != NULL)
|
||||
hScroller->SetTarget(this);
|
||||
hScroller->SetTarget(this);
|
||||
|
||||
Show();
|
||||
window->EnableUpdates();
|
||||
@@ -2320,7 +2324,7 @@ TTextView::Reader::ParseMail(BMailContainer *container,
|
||||
|
||||
BPath path(fileName);
|
||||
enclosure->name = strdup(path.Leaf());
|
||||
|
||||
|
||||
BMimeType type;
|
||||
component->MIMEType(&type);
|
||||
enclosure->content_type = strdup(type.Type());
|
||||
@@ -2328,7 +2332,7 @@ TTextView::Reader::ParseMail(BMailContainer *container,
|
||||
char typeDescription[B_MIME_TYPE_LENGTH];
|
||||
if (type.GetShortDescription(typeDescription) != B_OK)
|
||||
strcpy(typeDescription, type.Type() ? type.Type() : B_EMPTY_STRING);
|
||||
|
||||
|
||||
name = "\n<Enclosure: ";
|
||||
name << enclosure->name << " (Type: " << typeDescription << ")>\n";
|
||||
|
||||
@@ -2496,7 +2500,7 @@ TTextView::Reader::Run(void *_this)
|
||||
buffer = (char *)realloc(buffer, length + 1);
|
||||
if (buffer == NULL)
|
||||
goto done;
|
||||
|
||||
|
||||
memcpy(buffer, header, length);
|
||||
|
||||
length = rfc2047_to_utf8(&buffer, &length, length);
|
||||
@@ -3077,7 +3081,7 @@ TTextView::WindowActivated(bool flag)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
void
|
||||
TTextView::AddQuote(int32 start, int32 finish)
|
||||
{
|
||||
BRect rect = Bounds();
|
||||
@@ -3154,7 +3158,7 @@ TTextView::AddQuote(int32 start, int32 finish)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
void
|
||||
TTextView::RemoveQuote(int32 start, int32 finish)
|
||||
{
|
||||
BRect rect = Bounds();
|
||||
@@ -3279,8 +3283,9 @@ TTextView::Undo(BClipboard */*clipboard*/)
|
||||
} else {
|
||||
::beep();
|
||||
(new BAlert("",
|
||||
TR("Inconsistency occurred in the undo/redo buffer."),
|
||||
TR("OK")))->Go();
|
||||
B_TRANSLATE("Inconsistency occurred in the undo/redo "
|
||||
"buffer."),
|
||||
B_TRANSLATE("OK")))->Go();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -3325,8 +3330,9 @@ TTextView::Redo()
|
||||
case K_REPLACED:
|
||||
::beep();
|
||||
(new BAlert("",
|
||||
TR("Inconsistency occurred in the undo/redo buffer."),
|
||||
TR("OK")))->Go();
|
||||
B_TRANSLATE("Inconsistency occurred in the undo/redo "
|
||||
"buffer."),
|
||||
B_TRANSLATE("OK")))->Go();
|
||||
break;
|
||||
}
|
||||
ScrollToSelection();
|
||||
|
||||
@@ -19,24 +19,25 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of Be Incorporated shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings in
|
||||
this Software without prior written authorization from Be Incorporated.
|
||||
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
|
||||
of Be Incorporated in the United States and other countries. Other brand product
|
||||
names are registered trademarks or trademarks of their respective holders.
|
||||
All rights reserved.
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
|
||||
registered trademarks of Be Incorporated in the United States and other
|
||||
countries. Other brand product names are registered trademarks or trademarks
|
||||
of their respective holders. All rights reserved.
|
||||
*/
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// Enclosures.cpp
|
||||
// The enclosures list view (TListView), the list items (TListItem),
|
||||
// and the view containing the list and handling the messages (TEnclosuresView).
|
||||
// and the view containing the list
|
||||
// and handling the messages (TEnclosuresView).
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
#include "Enclosures.h"
|
||||
@@ -68,7 +69,7 @@ All rights reserved.
|
||||
|
||||
static const float kPlainFontSizeScale = 0.9;
|
||||
|
||||
static status_t
|
||||
static status_t
|
||||
GetTrackerIcon(BMimeType &type, BBitmap *icon, icon_size iconSize)
|
||||
{
|
||||
// set some icon size related variables
|
||||
@@ -139,14 +140,14 @@ TEnclosuresView::TEnclosuresView(BRect rect, BRect wind_rect)
|
||||
|
||||
BRect r;
|
||||
r.left = ENCLOSE_TEXT_H + font.StringWidth(
|
||||
TR("Attachments: ")) + 5;
|
||||
B_TRANSLATE("Attachments: ")) + 5;
|
||||
r.top = ENCLOSE_FIELD_V;
|
||||
r.right = wind_rect.right - wind_rect.left - B_V_SCROLL_BAR_WIDTH - 9;
|
||||
r.bottom = Frame().Height() - 8;
|
||||
fList = new TListView(r, this);
|
||||
fList->SetInvocationMessage(new BMessage(LIST_INVOKED));
|
||||
|
||||
BScrollView *scroll = new BScrollView("", fList, B_FOLLOW_LEFT_RIGHT |
|
||||
BScrollView *scroll = new BScrollView("", fList, B_FOLLOW_LEFT_RIGHT |
|
||||
B_FOLLOW_TOP, 0, false, true);
|
||||
AddChild(scroll);
|
||||
scroll->ScrollBar(B_VERTICAL)->SetRange(0, 0);
|
||||
@@ -224,10 +225,10 @@ TEnclosuresView::MessageReceived(BMessage *msg)
|
||||
if (window && window->Mail())
|
||||
window->Mail()->RemoveComponent(item->Component());
|
||||
|
||||
(new BAlert("", TR(
|
||||
(new BAlert("", B_TRANSLATE(
|
||||
"Removing attachments from a forwarded mail is not yet "
|
||||
"implemented!\nIt will not yet work correctly."),
|
||||
TR("OK")))->Go();
|
||||
B_TRANSLATE("OK")))->Go();
|
||||
}
|
||||
else
|
||||
watch_node(item->NodeRef(), B_STOP_WATCHING, this);
|
||||
@@ -268,7 +269,7 @@ TEnclosuresView::MessageReceived(BMessage *msg)
|
||||
fList->AddItem(item = new TListItem(&ref));
|
||||
fList->Select(fList->CountItems() - 1);
|
||||
fList->ScrollToSelection();
|
||||
|
||||
|
||||
watch_node(item->NodeRef(), B_WATCH_NAME, this);
|
||||
}
|
||||
else
|
||||
@@ -278,8 +279,8 @@ TEnclosuresView::MessageReceived(BMessage *msg)
|
||||
{
|
||||
beep();
|
||||
(new BAlert("",
|
||||
TR("Only files can be added as attachments."),
|
||||
TR("OK")))->Go();
|
||||
B_TRANSLATE("Only files can be added as attachments."),
|
||||
B_TRANSLATE("OK")))->Go();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -355,15 +356,15 @@ static void recursive_attachment_search(TEnclosuresView *us,BMailContainer *mail
|
||||
BMailComponent *component = mail->GetComponent(i);
|
||||
if (component == body)
|
||||
continue;
|
||||
|
||||
|
||||
if (component->ComponentType() == B_MAIL_MULTIPART_CONTAINER)
|
||||
recursive_attachment_search(us,dynamic_cast<BMIMEMultipartMailContainer *>(component),body);
|
||||
recursive_attachment_search(us,dynamic_cast<BMIMEMultipartMailContainer *>(component),body);
|
||||
|
||||
us->fList->AddItem(new TListItem(component));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
TEnclosuresView::AddEnclosuresFromMail(BEmailMessage *mail)
|
||||
{
|
||||
for (int32 i = 0; i < mail->CountComponents(); i++)
|
||||
@@ -371,7 +372,7 @@ TEnclosuresView::AddEnclosuresFromMail(BEmailMessage *mail)
|
||||
BMailComponent *component = mail->GetComponent(i);
|
||||
if (component == mail->Body())
|
||||
continue;
|
||||
|
||||
|
||||
if (component->ComponentType() == B_MAIL_MULTIPART_CONTAINER)
|
||||
recursive_attachment_search(this,dynamic_cast<BMIMEMultipartMailContainer *>(component),mail->Body());
|
||||
|
||||
@@ -413,7 +414,7 @@ TListView::MakeFocus(bool focus)
|
||||
void
|
||||
TListView::MouseDown(BPoint point)
|
||||
{
|
||||
int32 buttons;
|
||||
int32 buttons;
|
||||
Looper()->CurrentMessage()->FindInt32("buttons",&buttons);
|
||||
|
||||
if (buttons & B_SECONDARY_MOUSE_BUTTON)
|
||||
@@ -423,13 +424,13 @@ TListView::MouseDown(BPoint point)
|
||||
|
||||
BPopUpMenu menu("enclosure", false, false);
|
||||
menu.SetFont(&font);
|
||||
menu.AddItem(new BMenuItem(TR("Open attachment"),
|
||||
menu.AddItem(new BMenuItem(B_TRANSLATE("Open attachment"),
|
||||
new BMessage(LIST_INVOKED)));
|
||||
menu.AddItem(new BMenuItem(TR("Remove attachment"),
|
||||
menu.AddItem(new BMenuItem(B_TRANSLATE("Remove attachment"),
|
||||
new BMessage(M_REMOVE)));
|
||||
|
||||
BPoint menuStart = ConvertToScreen(point);
|
||||
|
||||
|
||||
BMenuItem *item;
|
||||
if ((item = menu.Go(menuStart)) != NULL)
|
||||
{
|
||||
@@ -471,7 +472,7 @@ TListItem::TListItem(entry_ref *ref)
|
||||
fComponent = NULL;
|
||||
fRef = *ref;
|
||||
|
||||
BEntry entry(ref);
|
||||
BEntry entry(ref);
|
||||
entry.GetNodeRef(&fNodeRef);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,17 +19,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of Be Incorporated shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings in
|
||||
this Software without prior written authorization from Be Incorporated.
|
||||
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
|
||||
of Be Incorporated in the United States and other countries. Other brand product
|
||||
names are registered trademarks or trademarks of their respective holders.
|
||||
All rights reserved.
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
|
||||
registered trademarks of Be Incorporated in the United States and other
|
||||
countries. Other brand product names are registered trademarks or trademarks
|
||||
of their respective holders. All rights reserved.
|
||||
*/
|
||||
|
||||
// ===========================================================================
|
||||
@@ -77,14 +77,14 @@ void FindWindow::DoFind(BWindow* window, const char* text)
|
||||
break; // Found a window
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* ask that window who is in the front */
|
||||
window = dynamic_cast<TMailWindow*>(window)->FrontmostWindow();
|
||||
if (window == NULL)
|
||||
return;
|
||||
|
||||
|
||||
// Found a window, send a find message
|
||||
|
||||
|
||||
if (!window->Lock())
|
||||
return;
|
||||
BView* focus = window->FindView("m_content");
|
||||
@@ -112,13 +112,14 @@ FindPanel::FindPanel(BRect rect)
|
||||
fTextControl->SetText(sPreviousFind.String());
|
||||
fTextControl->MakeFocus();
|
||||
AddChild(fTextControl);
|
||||
|
||||
fFindButton = new BButton(BRect(0, 0, 90, 20),"FINDBUTTON", TR("Find"),
|
||||
|
||||
fFindButton = new BButton(BRect(0, 0, 90, 20),"FINDBUTTON",
|
||||
B_TRANSLATE("Find"),
|
||||
new BMessage(FINDBUTTON),B_FOLLOW_LEFT | B_FOLLOW_BOTTOM);
|
||||
fFindButton->ResizeToPreferred();
|
||||
AddChild(fFindButton);
|
||||
r = fFindButton->Bounds();
|
||||
|
||||
|
||||
fFindButton->MoveTo(Bounds().right - r.Width() - 8,
|
||||
Bounds().bottom - r.Height() - 8);
|
||||
fFindButton->SetEnabled(sPreviousFind.Length());
|
||||
@@ -137,12 +138,12 @@ void FindPanel::AttachedToWindow()
|
||||
SetViewColor(216, 216, 216);
|
||||
Window()->SetDefaultButton(fFindButton);
|
||||
fFindButton->SetTarget(this);
|
||||
|
||||
|
||||
fTextControl->SetTarget(this);
|
||||
fTextControl->ResizeToPreferred();
|
||||
fTextControl->ResizeTo(Bounds().Width() - 20,
|
||||
fTextControl->Frame().Height());
|
||||
|
||||
|
||||
fTextControl->MakeFocus(true);
|
||||
fTextControl->TextView()->SelectAll();
|
||||
}
|
||||
@@ -214,9 +215,9 @@ void FindPanel::Find()
|
||||
|
||||
|
||||
FindWindow::FindWindow()
|
||||
: BWindow(FindWindow::fLastPosition, TR("Find"), B_FLOATING_WINDOW,
|
||||
B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_WILL_ACCEPT_FIRST_CLICK
|
||||
| B_CLOSE_ON_ESCAPE)
|
||||
: BWindow(FindWindow::fLastPosition, B_TRANSLATE("Find"),
|
||||
B_FLOATING_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE
|
||||
| B_WILL_ACCEPT_FIRST_CLICK | B_CLOSE_ON_ESCAPE)
|
||||
{
|
||||
fFindPanel = new FindPanel(Bounds());
|
||||
AddChild(fFindPanel);
|
||||
|
||||
+43
-39
@@ -19,17 +19,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of Be Incorporated shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings in
|
||||
this Software without prior written authorization from Be Incorporated.
|
||||
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
|
||||
of Be Incorporated in the United States and other countries. Other brand product
|
||||
names are registered trademarks or trademarks of their respective holders.
|
||||
All rights reserved.
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
|
||||
registered trademarks of Be Incorporated in the United States and other
|
||||
countries. Other brand product names are registered trademarks or trademarks
|
||||
of their respective holders. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "MailApp.h"
|
||||
@@ -90,7 +90,7 @@ class QPopupMenu : public QueryMenu {
|
||||
public:
|
||||
QPopupMenu(const char *title);
|
||||
|
||||
private:
|
||||
private:
|
||||
void AddPersonItem(const entry_ref *ref, ino_t node, BString &name,
|
||||
BString &email, const char *attr, BMenu *groupMenu,
|
||||
BMenuItem *superItem);
|
||||
@@ -159,7 +159,7 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
|
||||
BMessage* msg;
|
||||
|
||||
float x = StringWidth( /* The longest title string in the header area */
|
||||
TR("Attachments: ")) + 9;
|
||||
B_TRANSLATE("Attachments: ")) + 9;
|
||||
float y = TO_FIELD_V;
|
||||
|
||||
BMenuBar* dummy = new BMenuBar(BRect(0, 0, 100, 15), "Dummy");
|
||||
@@ -248,17 +248,18 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
|
||||
if (fIncoming && !resending) {
|
||||
// Set up the character set pop-up menu on the right of "To" box.
|
||||
r.Set (windowRect.Width() - widestCharacterSet -
|
||||
StringWidth (TR("Decoding:")) - 2 * SEPARATOR_MARGIN, y - 2,
|
||||
windowRect.Width() - SEPARATOR_MARGIN, y + menuFieldHeight);
|
||||
field = new BMenuField (r, "decoding", TR("Decoding:"), fEncodingMenu,
|
||||
true /* fixedSize */,
|
||||
StringWidth (B_TRANSLATE("Decoding:")) - 2 * SEPARATOR_MARGIN,
|
||||
y - 2, windowRect.Width() - SEPARATOR_MARGIN,
|
||||
y + menuFieldHeight);
|
||||
field = new BMenuField (r, "decoding", B_TRANSLATE("Decoding:"),
|
||||
fEncodingMenu, true /* fixedSize */,
|
||||
B_FOLLOW_TOP | B_FOLLOW_RIGHT,
|
||||
B_WILL_DRAW | B_NAVIGABLE | B_NAVIGABLE_JUMP);
|
||||
field->SetDivider(field->StringWidth(TR("Decoding:")) + 5);
|
||||
field->SetDivider(field->StringWidth(B_TRANSLATE("Decoding:")) + 5);
|
||||
AddChild(field);
|
||||
r.Set(SEPARATOR_MARGIN, y,
|
||||
field->Frame().left - SEPARATOR_MARGIN, y + menuFieldHeight);
|
||||
sprintf(string, TR("From:"));
|
||||
sprintf(string, B_TRANSLATE("From:"));
|
||||
} else {
|
||||
r.Set(x - 12, y, windowRect.Width() - SEPARATOR_MARGIN,
|
||||
y + menuFieldHeight);
|
||||
@@ -285,9 +286,10 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
|
||||
|
||||
if (!fIncoming || resending) {
|
||||
r.right = r.left - 5;
|
||||
r.left = r.right - ceilf(be_plain_font->StringWidth(TR("To:")) + 25);
|
||||
r.left = r.right - ceilf(be_plain_font->StringWidth(
|
||||
B_TRANSLATE("To:")) + 25);
|
||||
r.top -= 1;
|
||||
fToMenu = new QPopupMenu(TR("To:"));
|
||||
fToMenu = new QPopupMenu(B_TRANSLATE("To:"));
|
||||
field = new BMenuField(r, "", "", fToMenu, true,
|
||||
B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW);
|
||||
field->SetDivider(0.0);
|
||||
@@ -299,16 +301,16 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
|
||||
if (!fIncoming || resending) {
|
||||
// Put the character set box on the right of the From field.
|
||||
r.Set(windowRect.Width() - widestCharacterSet -
|
||||
StringWidth(TR("Encoding:")) - 2 * SEPARATOR_MARGIN,
|
||||
StringWidth(B_TRANSLATE("Encoding:")) - 2 * SEPARATOR_MARGIN,
|
||||
y - 2, windowRect.Width() - SEPARATOR_MARGIN, y + menuFieldHeight);
|
||||
BMenuField* encodingField = new BMenuField(r, "encoding",
|
||||
TR("Encoding:"), fEncodingMenu, true /* fixedSize */,
|
||||
B_TRANSLATE("Encoding:"), fEncodingMenu, true /* fixedSize */,
|
||||
B_FOLLOW_TOP | B_FOLLOW_RIGHT,
|
||||
B_WILL_DRAW | B_NAVIGABLE | B_NAVIGABLE_JUMP);
|
||||
encodingField->SetDivider(encodingField->StringWidth(TR("Encoding:"))
|
||||
+ 5);
|
||||
encodingField->SetDivider(encodingField->StringWidth(
|
||||
B_TRANSLATE("Encoding:")) + 5);
|
||||
AddChild(encodingField);
|
||||
|
||||
|
||||
field = encodingField;
|
||||
|
||||
// And now the "from account" pop-up menu, on the left side, taking the
|
||||
@@ -358,8 +360,8 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
|
||||
}
|
||||
r.Set(SEPARATOR_MARGIN, y - 2,
|
||||
field->Frame().left - SEPARATOR_MARGIN, y + menuFieldHeight);
|
||||
field = new BMenuField(r, "account", TR("From:"), fAccountMenu,
|
||||
true /* fixedSize */,
|
||||
field = new BMenuField(r, "account", B_TRANSLATE("From:"),
|
||||
fAccountMenu, true /* fixedSize */,
|
||||
B_FOLLOW_TOP | B_FOLLOW_LEFT_RIGHT,
|
||||
B_WILL_DRAW | B_NAVIGABLE | B_NAVIGABLE_JUMP);
|
||||
AddChild(field, encodingField);
|
||||
@@ -374,8 +376,8 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
|
||||
windowRect.Width() - SEPARATOR_MARGIN, y + menuFieldHeight);
|
||||
if (account)
|
||||
r.right -= SEPARATOR_MARGIN + ACCOUNT_FIELD_WIDTH;
|
||||
fAccountTo = new TTextControl(r, TR("To:"), NULL, fIncoming, false,
|
||||
B_FOLLOW_LEFT_RIGHT);
|
||||
fAccountTo = new TTextControl(r, B_TRANSLATE("To:"), NULL, fIncoming,
|
||||
false, B_FOLLOW_LEFT_RIGHT);
|
||||
fAccountTo->SetEnabled(false);
|
||||
fAccountTo->SetDivider(x - 12 - SEPARATOR_MARGIN);
|
||||
fAccountTo->SetAlignment(B_ALIGN_RIGHT, B_ALIGN_LEFT);
|
||||
@@ -383,8 +385,8 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
|
||||
|
||||
if (account) {
|
||||
r.left = r.right + 6; r.right = windowRect.Width() - SEPARATOR_MARGIN;
|
||||
fAccount = new TTextControl(r, TR("Account:"), NULL, fIncoming,
|
||||
false, B_FOLLOW_RIGHT | B_FOLLOW_TOP);
|
||||
fAccount = new TTextControl(r, B_TRANSLATE("Account:"), NULL,
|
||||
fIncoming, false, B_FOLLOW_RIGHT | B_FOLLOW_TOP);
|
||||
fAccount->SetEnabled(false);
|
||||
AddChild(fAccount);
|
||||
}
|
||||
@@ -395,8 +397,8 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
|
||||
r.Set(SEPARATOR_MARGIN, y,
|
||||
windowRect.Width() - SEPARATOR_MARGIN, y + menuFieldHeight);
|
||||
y += controlHeight;
|
||||
fSubject = new TTextControl(r, TR("Subject:"), new BMessage(SUBJECT_FIELD),
|
||||
fIncoming, false, B_FOLLOW_LEFT_RIGHT);
|
||||
fSubject = new TTextControl(r, B_TRANSLATE("Subject:"),
|
||||
new BMessage(SUBJECT_FIELD),fIncoming, false, B_FOLLOW_LEFT_RIGHT);
|
||||
AddChild(fSubject);
|
||||
(msg = new BMessage(FIELD_CHANGED))->AddInt32("bitmask", FIELD_SUBJECT);
|
||||
fSubject->SetModificationMessage(msg);
|
||||
@@ -418,9 +420,10 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
|
||||
fCc->SetModificationMessage(msg);
|
||||
|
||||
r.right = r.left - 5;
|
||||
r.left = r.right - ceilf(be_plain_font->StringWidth(TR("Cc:")) + 25);
|
||||
r.left = r.right - ceilf(be_plain_font->StringWidth(
|
||||
B_TRANSLATE("Cc:")) + 25);
|
||||
r.top -= 1;
|
||||
fCcMenu = new QPopupMenu(TR("Cc:"));
|
||||
fCcMenu = new QPopupMenu(B_TRANSLATE("Cc:"));
|
||||
field = new BMenuField(r, "", "", fCcMenu, true,
|
||||
B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW);
|
||||
|
||||
@@ -428,7 +431,7 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
|
||||
field->SetEnabled(true);
|
||||
AddChild(field);
|
||||
|
||||
r.Set(BCC_FIELD_H + be_plain_font->StringWidth(TR("Bcc:")), y,
|
||||
r.Set(BCC_FIELD_H + be_plain_font->StringWidth(B_TRANSLATE("Bcc:")), y,
|
||||
windowRect.Width() - SEPARATOR_MARGIN, y + menuFieldHeight);
|
||||
y += controlHeight;
|
||||
fBcc = new TTextControl(r, "", new BMessage(BCC_FIELD),
|
||||
@@ -441,9 +444,10 @@ THeaderView::THeaderView(BRect rect, BRect windowRect, bool incoming,
|
||||
fBcc->SetModificationMessage(msg);
|
||||
|
||||
r.right = r.left - 5;
|
||||
r.left = r.right - ceilf(be_plain_font->StringWidth(TR("Bcc:")) + 25);
|
||||
r.left = r.right - ceilf(be_plain_font->StringWidth(
|
||||
B_TRANSLATE("Bcc:")) + 25);
|
||||
r.top -= 1;
|
||||
fBccMenu = new QPopupMenu(TR("Bcc:"));
|
||||
fBccMenu = new QPopupMenu(B_TRANSLATE("Bcc:"));
|
||||
field = new BMenuField(r, "", "", fBccMenu, true,
|
||||
B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW);
|
||||
field->SetDivider(0.0);
|
||||
@@ -600,7 +604,7 @@ THeaderView::InitGroupCompletion()
|
||||
next = strchr(group, ',');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
map<BString *, BString *, CompareBStrings>::iterator iter;
|
||||
for (iter = groupMap.begin(); iter != groupMap.end();) {
|
||||
BString *group = iter->first;
|
||||
@@ -739,7 +743,7 @@ THeaderView::LoadMessage(BEmailMessage *mail)
|
||||
// #pragma mark - TTextControl
|
||||
|
||||
|
||||
TTextControl::TTextControl(BRect rect, const char *label, BMessage *msg,
|
||||
TTextControl::TTextControl(BRect rect, const char *label, BMessage *msg,
|
||||
bool incoming, bool resending, int32 resizingMode)
|
||||
: BComboBox(rect, "happy", label, msg, resizingMode),
|
||||
fRefDropMenu(NULL)
|
||||
@@ -900,7 +904,7 @@ TTextControl::MessageReceived(BMessage *msg)
|
||||
BString display;
|
||||
BString address;
|
||||
entry_ref ref;
|
||||
|
||||
|
||||
if (msg->FindString("address", &address) != B_OK
|
||||
|| msg->FindRef("ref", &ref) != B_OK)
|
||||
return;
|
||||
@@ -960,12 +964,12 @@ QPopupMenu::AddPersonItem(const entry_ref *ref, ino_t node, BString &name,
|
||||
BString sortKey;
|
||||
// For alphabetical order sorting, usually last name.
|
||||
|
||||
// if we have no Name, just use the email address
|
||||
// if we have no Name, just use the email address
|
||||
if (name.Length() == 0) {
|
||||
label = email;
|
||||
sortKey = email;
|
||||
} else {
|
||||
// otherwise, pretty-format it
|
||||
// otherwise, pretty-format it
|
||||
label << name << " (" << email << ")";
|
||||
|
||||
// Extract the last name (last word in the name),
|
||||
|
||||
@@ -19,17 +19,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of Be Incorporated shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings in
|
||||
this Software without prior written authorization from Be Incorporated.
|
||||
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
|
||||
of Be Incorporated in the United States and other countries. Other brand product
|
||||
names are registered trademarks or trademarks of their respective holders.
|
||||
All rights reserved.
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
|
||||
registered trademarks of Be Incorporated in the United States and other
|
||||
countries. Other brand product names are registered trademarks or trademarks
|
||||
of their respective holders. All rights reserved.
|
||||
*/
|
||||
|
||||
|
||||
@@ -122,8 +122,8 @@ TMailApp::TMailApp()
|
||||
// set default values
|
||||
fContentFont.SetSize(12.0);
|
||||
fAutoMarkRead = true;
|
||||
fSignature = (char*)malloc(strlen(TR("None")) + 1);
|
||||
strcpy(fSignature, TR("None"));
|
||||
fSignature = (char*)malloc(strlen(B_TRANSLATE("None")) + 1);
|
||||
strcpy(fSignature, B_TRANSLATE("None"));
|
||||
fReplyPreamble = (char*)malloc(1);
|
||||
fReplyPreamble[0] = '\0';
|
||||
|
||||
@@ -149,7 +149,7 @@ TMailApp::~TMailApp()
|
||||
void
|
||||
TMailApp::AboutRequested()
|
||||
{
|
||||
BAlert *alert = new BAlert("about", TR("Mail\n\n"
|
||||
BAlert *alert = new BAlert("about", B_TRANSLATE("Mail\n\n"
|
||||
"Written by Robert Polic.\n"
|
||||
"Enhanced by the Dr. Zoidberg crew.\n\n"
|
||||
"Copyright 1991-2001, Be Incorporated.\n"
|
||||
|
||||
@@ -19,17 +19,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of Be Incorporated shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings in
|
||||
this Software without prior written authorization from Be Incorporated.
|
||||
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
|
||||
of Be Incorporated in the United States and other countries. Other brand product
|
||||
names are registered trademarks or trademarks of their respective holders.
|
||||
All rights reserved.
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
|
||||
registered trademarks of Be Incorporated in the United States and other
|
||||
countries. Other brand product names are registered trademarks or trademarks
|
||||
of their respective holders. All rights reserved.
|
||||
*/
|
||||
|
||||
|
||||
@@ -97,9 +97,9 @@ TMenu::BuildMenu()
|
||||
|
||||
BMessage *msg = new BMessage(M_RANDOM_SIG);
|
||||
if (!fPopup) {
|
||||
AddItem(new BMenuItem(TR("Random"), msg, '0'), 0);
|
||||
AddItem(new BMenuItem(B_TRANSLATE("Random"), msg, '0'), 0);
|
||||
} else {
|
||||
AddItem(new BMenuItem(TR("Random"), msg), 0);
|
||||
AddItem(new BMenuItem(B_TRANSLATE("Random"), msg), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+143
-119
@@ -19,17 +19,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of Be Incorporated shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings in
|
||||
this Software without prior written authorization from Be Incorporated.
|
||||
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
|
||||
of Be Incorporated in the United States and other countries. Other brand product
|
||||
names are registered trademarks or trademarks of their respective holders.
|
||||
All rights reserved.
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
|
||||
registered trademarks of Be Incorporated in the United States and other
|
||||
countries. Other brand product names are registered trademarks or trademarks
|
||||
of their respective holders. All rights reserved.
|
||||
*/
|
||||
|
||||
|
||||
@@ -202,11 +202,12 @@ TMailWindow::TMailWindow(BRect rect, const char* title, TMailApp* app,
|
||||
|
||||
// File Menu
|
||||
|
||||
menu = new BMenu(TR("File"));
|
||||
menu = new BMenu(B_TRANSLATE("File"));
|
||||
|
||||
msg = new BMessage(M_NEW);
|
||||
msg->AddInt32("type", M_NEW);
|
||||
menu->AddItem(item = new BMenuItem(TR("New mail message"), msg, 'N'));
|
||||
menu->AddItem(item = new BMenuItem(B_TRANSLATE("New mail message"),
|
||||
msg, 'N'));
|
||||
item->SetTarget(be_app);
|
||||
|
||||
// Cheap hack - only show the drafts menu when composing messages. Insert
|
||||
@@ -222,7 +223,7 @@ TMailWindow::TMailWindow(BRect rect, const char* title, TMailApp* app,
|
||||
|
||||
if (!fIncoming) {
|
||||
QueryMenu *queryMenu;
|
||||
queryMenu = new QueryMenu(TR("Open draft"), false);
|
||||
queryMenu = new QueryMenu(B_TRANSLATE("Open draft"), false);
|
||||
queryMenu->SetTargetForItems(be_app);
|
||||
|
||||
queryMenu->SetPredicate("MAIL:draft==1");
|
||||
@@ -230,32 +231,32 @@ TMailWindow::TMailWindow(BRect rect, const char* title, TMailApp* app,
|
||||
}
|
||||
|
||||
if (!fIncoming || resending) {
|
||||
menu->AddItem(fSendLater = new BMenuItem(TR("Save as draft"),
|
||||
menu->AddItem(fSendLater = new BMenuItem(B_TRANSLATE("Save as draft"),
|
||||
new BMessage(M_SAVE_AS_DRAFT), 'S'));
|
||||
}
|
||||
|
||||
if (!resending && fIncoming) {
|
||||
menu->AddSeparatorItem();
|
||||
|
||||
subMenu = new BMenu(TR("Close and "));
|
||||
subMenu = new BMenu(B_TRANSLATE("Close and "));
|
||||
if (file.GetAttrInfo(B_MAIL_ATTR_STATUS, &info) == B_NO_ERROR)
|
||||
file.ReadAttr(B_MAIL_ATTR_STATUS, B_STRING_TYPE, 0, str, info.size);
|
||||
else
|
||||
str[0] = 0;
|
||||
|
||||
if (!strcmp(str, "New")) {
|
||||
subMenu->AddItem(item = new BMenuItem(TR("Leave as New"),
|
||||
subMenu->AddItem(item = new BMenuItem(B_TRANSLATE("Leave as New"),
|
||||
new BMessage(M_CLOSE_SAME), 'W', B_SHIFT_KEY));
|
||||
#if 0
|
||||
subMenu->AddItem(item = new BMenuItem(TR("Set to Read"),
|
||||
subMenu->AddItem(item = new BMenuItem(B_TRANSLATE("Set to Read"),
|
||||
new BMessage(M_CLOSE_READ), 'W'));
|
||||
#endif
|
||||
message = M_CLOSE_READ;
|
||||
} else {
|
||||
if (strlen(str))
|
||||
sprintf(status, TR("Leave as '%s'"), str);
|
||||
sprintf(status, B_TRANSLATE("Leave as '%s'"), str);
|
||||
else
|
||||
sprintf(status, TR("Leave same"));
|
||||
sprintf(status, B_TRANSLATE("Leave same"));
|
||||
subMenu->AddItem(item = new BMenuItem(status,
|
||||
new BMessage(M_CLOSE_SAME), 'W'));
|
||||
message = M_CLOSE_SAME;
|
||||
@@ -263,87 +264,93 @@ TMailWindow::TMailWindow(BRect rect, const char* title, TMailApp* app,
|
||||
new BMessage(M_CLOSE_SAME));
|
||||
}
|
||||
|
||||
subMenu->AddItem(new BMenuItem(TR("Move to trash"),
|
||||
subMenu->AddItem(new BMenuItem(B_TRANSLATE("Move to trash"),
|
||||
new BMessage(M_DELETE), 'T', B_CONTROL_KEY));
|
||||
AddShortcut('T', B_SHIFT_KEY | B_COMMAND_KEY,
|
||||
new BMessage(M_DELETE_NEXT));
|
||||
|
||||
subMenu->AddSeparatorItem();
|
||||
|
||||
subMenu->AddItem(new BMenuItem(TR("Set to Saved"),
|
||||
subMenu->AddItem(new BMenuItem(B_TRANSLATE("Set to Saved"),
|
||||
new BMessage(M_CLOSE_SAVED), 'W', B_CONTROL_KEY));
|
||||
|
||||
if (add_query_menu_items(subMenu, INDEX_STATUS, M_STATUS,
|
||||
TR("Set to %s")) > 0)
|
||||
B_TRANSLATE("Set to %s")) > 0)
|
||||
subMenu->AddSeparatorItem();
|
||||
|
||||
subMenu->AddItem(new BMenuItem(TR("Set to" B_UTF8_ELLIPSIS),
|
||||
subMenu->AddItem(new BMenuItem(B_TRANSLATE("Set to" B_UTF8_ELLIPSIS),
|
||||
new BMessage(M_CLOSE_CUSTOM)));
|
||||
|
||||
#if 0
|
||||
subMenu->AddItem(new BMenuItem(new TMenu(
|
||||
TR("Set to" B_UTF8_ELLIPSIS), INDEX_STATUS, M_STATUS, false, false),
|
||||
B_TRANSLATE("Set to" B_UTF8_ELLIPSIS), INDEX_STATUS, M_STATUS,
|
||||
false, false),
|
||||
new BMessage(M_CLOSE_CUSTOM)));
|
||||
#endif
|
||||
menu->AddItem(subMenu);
|
||||
} else {
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(new BMenuItem(TR("Close"),
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Close"),
|
||||
new BMessage(B_CLOSE_REQUESTED), 'W'));
|
||||
}
|
||||
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(fPrint = new BMenuItem(TR("Page setup" B_UTF8_ELLIPSIS),
|
||||
menu->AddItem(fPrint = new BMenuItem(
|
||||
B_TRANSLATE("Page setup" B_UTF8_ELLIPSIS),
|
||||
new BMessage(M_PRINT_SETUP)));
|
||||
menu->AddItem(fPrint = new BMenuItem(TR("Print" B_UTF8_ELLIPSIS),
|
||||
menu->AddItem(fPrint = new BMenuItem(
|
||||
B_TRANSLATE("Print" B_UTF8_ELLIPSIS),
|
||||
new BMessage(M_PRINT), 'P'));
|
||||
fMenuBar->AddItem(menu);
|
||||
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(item = new BMenuItem(
|
||||
TR("About Mail" B_UTF8_ELLIPSIS),
|
||||
B_TRANSLATE("About Mail" B_UTF8_ELLIPSIS),
|
||||
new BMessage(B_ABOUT_REQUESTED)));
|
||||
item->SetTarget(be_app);
|
||||
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(item = new BMenuItem(TR("Quit"),
|
||||
menu->AddItem(item = new BMenuItem(B_TRANSLATE("Quit"),
|
||||
new BMessage(B_QUIT_REQUESTED), 'Q'));
|
||||
item->SetTarget(be_app);
|
||||
|
||||
// Edit Menu
|
||||
|
||||
menu = new BMenu(TR("Edit"));
|
||||
menu->AddItem(fUndo = new BMenuItem(TR("Undo"), new BMessage(B_UNDO),
|
||||
'Z', 0));
|
||||
menu = new BMenu(B_TRANSLATE("Edit"));
|
||||
menu->AddItem(fUndo = new BMenuItem(B_TRANSLATE("Undo"),
|
||||
new BMessage(B_UNDO), 'Z', 0));
|
||||
fUndo->SetTarget(NULL, this);
|
||||
menu->AddItem(fRedo = new BMenuItem(TR("Redo"), new BMessage(M_REDO),
|
||||
'Z', B_SHIFT_KEY));
|
||||
menu->AddItem(fRedo = new BMenuItem(B_TRANSLATE("Redo"),
|
||||
new BMessage(M_REDO), 'Z', B_SHIFT_KEY));
|
||||
fRedo->SetTarget(NULL, this);
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(fCut = new BMenuItem(TR("Cut"), new BMessage(B_CUT), 'X'));
|
||||
menu->AddItem(fCut = new BMenuItem(B_TRANSLATE("Cut"),
|
||||
new BMessage(B_CUT), 'X'));
|
||||
fCut->SetTarget(NULL, this);
|
||||
menu->AddItem(fCopy = new BMenuItem(TR("Copy"), new BMessage(B_COPY), 'C'));
|
||||
menu->AddItem(fCopy = new BMenuItem(B_TRANSLATE("Copy"),
|
||||
new BMessage(B_COPY), 'C'));
|
||||
fCopy->SetTarget(NULL, this);
|
||||
menu->AddItem(fPaste = new BMenuItem(TR("Paste"), new BMessage(B_PASTE),
|
||||
menu->AddItem(fPaste = new BMenuItem(B_TRANSLATE("Paste"),
|
||||
new BMessage(B_PASTE),
|
||||
'V'));
|
||||
fPaste->SetTarget(NULL, this);
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(item = new BMenuItem(TR("Select all"), new BMessage(M_SELECT),
|
||||
'A'));
|
||||
menu->AddItem(item = new BMenuItem(B_TRANSLATE("Select all"),
|
||||
new BMessage(M_SELECT), 'A'));
|
||||
menu->AddSeparatorItem();
|
||||
item->SetTarget(NULL, this);
|
||||
menu->AddItem(new BMenuItem(TR("Find" B_UTF8_ELLIPSIS),
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Find" B_UTF8_ELLIPSIS),
|
||||
new BMessage(M_FIND), 'F'));
|
||||
menu->AddItem(new BMenuItem(TR("Find again"), new BMessage(M_FIND_AGAIN),
|
||||
'G'));
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Find again"),
|
||||
new BMessage(M_FIND_AGAIN), 'G'));
|
||||
if (!fIncoming) {
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(fQuote =new BMenuItem(TR("Quote"),
|
||||
menu->AddItem(fQuote =new BMenuItem(B_TRANSLATE("Quote"),
|
||||
new BMessage(M_QUOTE), B_RIGHT_ARROW));
|
||||
menu->AddItem(fRemoveQuote = new BMenuItem(TR("Remove quote"),
|
||||
menu->AddItem(fRemoveQuote = new BMenuItem(B_TRANSLATE("Remove quote"),
|
||||
new BMessage(M_REMOVE_QUOTE), B_LEFT_ARROW));
|
||||
menu->AddSeparatorItem();
|
||||
fSpelling = new BMenuItem(TR("Check spelling"),
|
||||
fSpelling = new BMenuItem(B_TRANSLATE("Check spelling"),
|
||||
new BMessage(M_CHECK_SPELLING), ';');
|
||||
menu->AddItem(fSpelling);
|
||||
if (fApp->StartWithSpellCheckOn())
|
||||
@@ -351,63 +358,64 @@ TMailWindow::TMailWindow(BRect rect, const char* title, TMailApp* app,
|
||||
}
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(item = new BMenuItem(
|
||||
TR("Preferences" B_UTF8_ELLIPSIS),
|
||||
B_TRANSLATE("Preferences" B_UTF8_ELLIPSIS),
|
||||
new BMessage(M_PREFS),','));
|
||||
item->SetTarget(be_app);
|
||||
fMenuBar->AddItem(menu);
|
||||
menu->AddItem(item = new BMenuItem(
|
||||
TR("Accounts" B_UTF8_ELLIPSIS),
|
||||
B_TRANSLATE("Accounts" B_UTF8_ELLIPSIS),
|
||||
new BMessage(M_ACCOUNTS),'-'));
|
||||
item->SetTarget(be_app);
|
||||
|
||||
// View Menu
|
||||
|
||||
if (!resending && fIncoming) {
|
||||
menu = new BMenu(TR("View"));
|
||||
menu->AddItem(fHeader = new BMenuItem(TR("Show header"),
|
||||
menu = new BMenu(B_TRANSLATE("View"));
|
||||
menu->AddItem(fHeader = new BMenuItem(B_TRANSLATE("Show header"),
|
||||
new BMessage(M_HEADER), 'H'));
|
||||
menu->AddItem(fRaw = new BMenuItem(TR("Show raw message"),
|
||||
menu->AddItem(fRaw = new BMenuItem(B_TRANSLATE("Show raw message"),
|
||||
new BMessage(M_RAW)));
|
||||
fMenuBar->AddItem(menu);
|
||||
}
|
||||
|
||||
// Message Menu
|
||||
|
||||
menu = new BMenu(TR("Message"));
|
||||
menu = new BMenu(B_TRANSLATE("Message"));
|
||||
|
||||
if (!resending && fIncoming) {
|
||||
BMenuItem *menuItem;
|
||||
menu->AddItem(new BMenuItem(TR("Reply"), new BMessage(M_REPLY),'R'));
|
||||
menu->AddItem(new BMenuItem(TR("Reply to sender"),
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Reply"),
|
||||
new BMessage(M_REPLY),'R'));
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Reply to sender"),
|
||||
new BMessage(M_REPLY_TO_SENDER),'R',B_OPTION_KEY));
|
||||
menu->AddItem(new BMenuItem(TR("Reply to all"),
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Reply to all"),
|
||||
new BMessage(M_REPLY_ALL), 'R', B_SHIFT_KEY));
|
||||
|
||||
menu->AddSeparatorItem();
|
||||
|
||||
menu->AddItem(new BMenuItem(TR("Forward"), new BMessage(M_FORWARD),
|
||||
'J'));
|
||||
menu->AddItem(new BMenuItem(TR("Forward without attachments"),
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Forward"),
|
||||
new BMessage(M_FORWARD), 'J'));
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Forward without attachments"),
|
||||
new BMessage(M_FORWARD_WITHOUT_ATTACHMENTS)));
|
||||
menu->AddItem(menuItem = new BMenuItem(TR("Resend"),
|
||||
menu->AddItem(menuItem = new BMenuItem(B_TRANSLATE("Resend"),
|
||||
new BMessage(M_RESEND)));
|
||||
menu->AddItem(menuItem = new BMenuItem(TR("Copy to new"),
|
||||
menu->AddItem(menuItem = new BMenuItem(B_TRANSLATE("Copy to new"),
|
||||
new BMessage(M_COPY_TO_NEW), 'D'));
|
||||
|
||||
menu->AddSeparatorItem();
|
||||
fDeleteNext = new BMenuItem(TR("Move to trash"),
|
||||
fDeleteNext = new BMenuItem(B_TRANSLATE("Move to trash"),
|
||||
new BMessage(M_DELETE_NEXT), 'T');
|
||||
menu->AddItem(fDeleteNext);
|
||||
menu->AddSeparatorItem();
|
||||
|
||||
fPrevMsg = new BMenuItem(TR("Previous message"),
|
||||
fPrevMsg = new BMenuItem(B_TRANSLATE("Previous message"),
|
||||
new BMessage(M_PREVMSG), B_UP_ARROW);
|
||||
menu->AddItem(fPrevMsg);
|
||||
fNextMsg = new BMenuItem(TR("Next message"), new BMessage(M_NEXTMSG),
|
||||
B_DOWN_ARROW);
|
||||
fNextMsg = new BMenuItem(B_TRANSLATE("Next message"),
|
||||
new BMessage(M_NEXTMSG), B_DOWN_ARROW);
|
||||
menu->AddItem(fNextMsg);
|
||||
menu->AddSeparatorItem();
|
||||
fSaveAddrMenu = subMenu = new BMenu(TR("Save address"));
|
||||
fSaveAddrMenu = subMenu = new BMenu(B_TRANSLATE("Save address"));
|
||||
|
||||
// create the list of addresses
|
||||
|
||||
@@ -462,23 +470,24 @@ TMailWindow::TMailWindow(BRect rect, const char* title, TMailApp* app,
|
||||
fMenuBar->AddItem(menu);
|
||||
}
|
||||
} else {
|
||||
menu->AddItem(fSendNow = new BMenuItem(TR("Send message"),
|
||||
menu->AddItem(fSendNow = new BMenuItem(B_TRANSLATE("Send message"),
|
||||
new BMessage(M_SEND_NOW), 'M'));
|
||||
|
||||
if (!fIncoming) {
|
||||
menu->AddSeparatorItem();
|
||||
fSignature = new TMenu(TR("Add signature"), INDEX_SIGNATURE,
|
||||
M_SIGNATURE);
|
||||
fSignature = new TMenu(B_TRANSLATE("Add signature"),
|
||||
INDEX_SIGNATURE, M_SIGNATURE);
|
||||
menu->AddItem(new BMenuItem(fSignature));
|
||||
menu->AddItem(item = new BMenuItem(
|
||||
TR("Edit signatures" B_UTF8_ELLIPSIS),
|
||||
B_TRANSLATE("Edit signatures" B_UTF8_ELLIPSIS),
|
||||
new BMessage(M_EDIT_SIGNATURE)));
|
||||
item->SetTarget(be_app);
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(fAdd = new BMenuItem(TR(
|
||||
"Add enclosure" B_UTF8_ELLIPSIS),
|
||||
menu->AddItem(fAdd = new BMenuItem(
|
||||
B_TRANSLATE("Add enclosure" B_UTF8_ELLIPSIS),
|
||||
new BMessage(M_ADD), 'E'));
|
||||
menu->AddItem(fRemove = new BMenuItem(TR("Remove enclosure"),
|
||||
menu->AddItem(fRemove = new BMenuItem(
|
||||
B_TRANSLATE("Remove enclosure"),
|
||||
new BMessage(M_REMOVE), 'T'));
|
||||
}
|
||||
fMenuBar->AddItem(menu);
|
||||
@@ -486,7 +495,7 @@ TMailWindow::TMailWindow(BRect rect, const char* title, TMailApp* app,
|
||||
|
||||
// Queries Menu
|
||||
|
||||
fQueryMenu = new BMenu(TR("Queries"));
|
||||
fQueryMenu = new BMenu(B_TRANSLATE("Queries"));
|
||||
fMenuBar->AddItem(fQueryMenu);
|
||||
|
||||
_RebuildQueryMenu(true);
|
||||
@@ -543,8 +552,8 @@ TMailWindow::TMailWindow(BRect rect, const char* title, TMailApp* app,
|
||||
|
||||
BString signature = fApp->Signature();
|
||||
|
||||
if (!fIncoming && strcmp(signature.String(), TR("None")) != 0) {
|
||||
if (strcmp(signature.String(), TR("Random")) == 0)
|
||||
if (!fIncoming && strcmp(signature.String(), B_TRANSLATE("None")) != 0) {
|
||||
if (strcmp(signature.String(), B_TRANSLATE("Random")) == 0)
|
||||
PostMessage(M_RANDOM_SIG);
|
||||
else {
|
||||
// Create a query to find this signature
|
||||
@@ -602,41 +611,47 @@ TMailWindow::BuildButtonBar()
|
||||
|
||||
bbar = new ButtonBar(BRect(0, 0, 100, 100), "ButtonBar", 2, 3, 0, 1, 10,
|
||||
2);
|
||||
bbar->AddButton(TR("New"), 28, new BMessage(M_NEW));
|
||||
bbar->AddButton(B_TRANSLATE("New"), 28, new BMessage(M_NEW));
|
||||
bbar->AddDivider(5);
|
||||
fButtonBar = bbar;
|
||||
|
||||
if (fResending) {
|
||||
fSendButton = bbar->AddButton(TR("Send"), 8, new BMessage(M_SEND_NOW));
|
||||
fSendButton = bbar->AddButton(B_TRANSLATE("Send"), 8,
|
||||
new BMessage(M_SEND_NOW));
|
||||
bbar->AddDivider(5);
|
||||
} else if (!fIncoming) {
|
||||
fSendButton = bbar->AddButton(TR("Send"), 8, new BMessage(M_SEND_NOW));
|
||||
fSendButton = bbar->AddButton(B_TRANSLATE("Send"), 8,
|
||||
new BMessage(M_SEND_NOW));
|
||||
fSendButton->SetEnabled(false);
|
||||
fSigButton = bbar->AddButton(TR("Signature"), 4,
|
||||
fSigButton = bbar->AddButton(B_TRANSLATE("Signature"), 4,
|
||||
new BMessage(M_SIG_MENU));
|
||||
fSigButton->InvokeOnButton(B_SECONDARY_MOUSE_BUTTON);
|
||||
fSaveButton = bbar->AddButton(TR("Save"), 44,
|
||||
fSaveButton = bbar->AddButton(B_TRANSLATE("Save"), 44,
|
||||
new BMessage(M_SAVE_AS_DRAFT));
|
||||
fSaveButton->SetEnabled(false);
|
||||
fPrintButton = bbar->AddButton(TR("Print"), 16, new BMessage(M_PRINT));
|
||||
fPrintButton = bbar->AddButton(B_TRANSLATE("Print"), 16,
|
||||
new BMessage(M_PRINT));
|
||||
fPrintButton->SetEnabled(false);
|
||||
bbar->AddButton(TR("Trash"), 0, new BMessage(M_DELETE));
|
||||
bbar->AddButton(B_TRANSLATE("Trash"), 0, new BMessage(M_DELETE));
|
||||
bbar->AddDivider(5);
|
||||
} else {
|
||||
BmapButton *button = bbar->AddButton(TR("Reply"), 12,
|
||||
BmapButton *button = bbar->AddButton(B_TRANSLATE("Reply"), 12,
|
||||
new BMessage(M_REPLY));
|
||||
button->InvokeOnButton(B_SECONDARY_MOUSE_BUTTON);
|
||||
button = bbar->AddButton(TR("Forward"), 40, new BMessage(M_FORWARD));
|
||||
button = bbar->AddButton(B_TRANSLATE("Forward"), 40,
|
||||
new BMessage(M_FORWARD));
|
||||
button->InvokeOnButton(B_SECONDARY_MOUSE_BUTTON);
|
||||
fPrintButton = bbar->AddButton(TR("Print"), 16, new BMessage(M_PRINT));
|
||||
bbar->AddButton(TR("Trash"), 0, new BMessage(M_DELETE_NEXT));
|
||||
fPrintButton = bbar->AddButton(B_TRANSLATE("Print"), 16,
|
||||
new BMessage(M_PRINT));
|
||||
bbar->AddButton(B_TRANSLATE("Trash"), 0, new BMessage(M_DELETE_NEXT));
|
||||
if (fApp->ShowSpamGUI()) {
|
||||
button = bbar->AddButton("Spam", 48, new BMessage(M_SPAM_BUTTON));
|
||||
button->InvokeOnButton(B_SECONDARY_MOUSE_BUTTON);
|
||||
}
|
||||
bbar->AddDivider(5);
|
||||
fNextButton = bbar->AddButton(TR("Next"), 24, new BMessage(M_NEXTMSG));
|
||||
bbar->AddButton(TR("Previous"), 20, new BMessage(M_PREVMSG));
|
||||
fNextButton = bbar->AddButton(B_TRANSLATE("Next"), 24,
|
||||
new BMessage(M_NEXTMSG));
|
||||
bbar->AddButton(B_TRANSLATE("Previous"), 20, new BMessage(M_PREVMSG));
|
||||
if (!fAutoMarkRead) {
|
||||
_AddReadButton();
|
||||
}
|
||||
@@ -1004,7 +1019,7 @@ TMailWindow::MessageReceived(BMessage *msg)
|
||||
A popup from a button is good only when the behavior has some
|
||||
consistency and there is some visual indication that a menu
|
||||
will be shown when clicked. A workable implementation would
|
||||
have an extra button attached to the main one which has a
|
||||
have an extra button attached to the main one which has a
|
||||
downward-pointing arrow. Mozilla Thunderbird's 'Get Mail'
|
||||
button is a good example of this.
|
||||
|
||||
@@ -1053,10 +1068,11 @@ TMailWindow::MessageReceived(BMessage *msg)
|
||||
if (msg->FindInt32("buttons", (int32 *)&buttons) == B_OK
|
||||
&& buttons == B_SECONDARY_MOUSE_BUTTON) {
|
||||
BPopUpMenu menu("Reply To", false, false);
|
||||
menu.AddItem(new BMenuItem(TR("Reply"),new BMessage(M_REPLY)));
|
||||
menu.AddItem(new BMenuItem(TR("Reply to sender"),
|
||||
menu.AddItem(new BMenuItem(B_TRANSLATE("Reply"),
|
||||
new BMessage(M_REPLY)));
|
||||
menu.AddItem(new BMenuItem(B_TRANSLATE("Reply to sender"),
|
||||
new BMessage(M_REPLY_TO_SENDER)));
|
||||
menu.AddItem(new BMenuItem(TR("Reply to all"),
|
||||
menu.AddItem(new BMenuItem(B_TRANSLATE("Reply to all"),
|
||||
new BMessage(M_REPLY_ALL)));
|
||||
|
||||
BPoint where;
|
||||
@@ -1079,9 +1095,10 @@ TMailWindow::MessageReceived(BMessage *msg)
|
||||
if (msg->FindInt32("buttons", (int32 *)&buttons) == B_OK
|
||||
&& buttons == B_SECONDARY_MOUSE_BUTTON) {
|
||||
BPopUpMenu menu("Forward", false, false);
|
||||
menu.AddItem(new BMenuItem(TR("Forward"),
|
||||
menu.AddItem(new BMenuItem(B_TRANSLATE("Forward"),
|
||||
new BMessage(M_FORWARD)));
|
||||
menu.AddItem(new BMenuItem(TR("Forward without attachments"),
|
||||
menu.AddItem(new BMenuItem(
|
||||
B_TRANSLATE("Forward without attachments"),
|
||||
new BMessage(M_FORWARD_WITHOUT_ATTACHMENTS)));
|
||||
|
||||
BPoint where;
|
||||
@@ -1140,8 +1157,8 @@ TMailWindow::MessageReceived(BMessage *msg)
|
||||
tracker.SendMessage(&msg);
|
||||
} else {
|
||||
(new BAlert("",
|
||||
TR("Need Tracker to move items to trash"),
|
||||
TR("Sorry")))->Go();
|
||||
B_TRANSLATE("Need Tracker to move items to trash"),
|
||||
B_TRANSLATE("Sorry")))->Go();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -1297,9 +1314,10 @@ TMailWindow::MessageReceived(BMessage *msg)
|
||||
1, &arg);
|
||||
|
||||
if (result != B_NO_ERROR)
|
||||
(new BAlert("", TR(
|
||||
"Sorry, could not find an application that supports"
|
||||
" the 'Person' data type."), TR("OK")))->Go();
|
||||
(new BAlert("", B_TRANSLATE(
|
||||
"Sorry, could not find an application that "
|
||||
"supports the 'Person' data type."),
|
||||
B_TRANSLATE("OK")))->Go();
|
||||
}
|
||||
free(arg);
|
||||
}
|
||||
@@ -1512,9 +1530,9 @@ TMailWindow::MessageReceived(BMessage *msg)
|
||||
if (!gDictCount) {
|
||||
beep();
|
||||
(new BAlert("",
|
||||
TR("Mail couldn't find its dictionary."),
|
||||
TR("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_OFFSET_SPACING,
|
||||
B_STOP_ALERT))->Go();
|
||||
B_TRANSLATE("Mail couldn't find its dictionary."),
|
||||
B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL,
|
||||
B_OFFSET_SPACING, B_STOP_ALERT))->Go();
|
||||
} else {
|
||||
fSpelling->SetMarked(!fSpelling->IsMarked());
|
||||
fContentView->fTextView->EnableSpellCheck(
|
||||
@@ -1616,15 +1634,17 @@ TMailWindow::QuitRequested()
|
||||
|| strlen(fHeaderView->fSubject->Text())
|
||||
|| (fHeaderView->fCc && strlen(fHeaderView->fCc->Text()))
|
||||
|| (fHeaderView->fBcc && strlen(fHeaderView->fBcc->Text()))
|
||||
|| (strlen(fContentView->fTextView->Text()) && (!fStartingText
|
||||
|| (strlen(fContentView->fTextView->Text()) && (!fStartingText
|
||||
|| (fStartingText
|
||||
&& strcmp(fContentView->fTextView->Text(), fStartingText))))
|
||||
|| (fEnclosuresView != NULL
|
||||
|| (fEnclosuresView != NULL
|
||||
&& fEnclosuresView->fList->CountItems()))) {
|
||||
if (fResending) {
|
||||
BAlert *alert = new BAlert("",
|
||||
TR("Do you wish to send this message before closing?"),
|
||||
TR("Discard"), TR("Cancel"), TR("Send"),
|
||||
BAlert *alert = new BAlert("", B_TRANSLATE(
|
||||
"Do you wish to send this message before closing?"),
|
||||
B_TRANSLATE("Discard"),
|
||||
B_TRANSLATE("Cancel"),
|
||||
B_TRANSLATE("Send"),
|
||||
B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_WARNING_ALERT);
|
||||
alert->SetShortcut(0, 'd');
|
||||
alert->SetShortcut(1, B_ESCAPE);
|
||||
@@ -1641,9 +1661,11 @@ TMailWindow::QuitRequested()
|
||||
}
|
||||
} else {
|
||||
BAlert *alert = new BAlert("",
|
||||
TR("Do you wish to save this message as a draft before closing?"
|
||||
),
|
||||
TR("Don't save"), TR("Cancel"), TR("Save"),
|
||||
B_TRANSLATE("Do you wish to save this message as a draft "
|
||||
"before closing?"),
|
||||
B_TRANSLATE("Don't save"),
|
||||
B_TRANSLATE("Cancel"),
|
||||
B_TRANSLATE("Save"),
|
||||
B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_WARNING_ALERT);
|
||||
alert->SetShortcut(0, 'd');
|
||||
alert->SetShortcut(1, B_ESCAPE);
|
||||
@@ -2201,8 +2223,8 @@ TMailWindow::Send(bool now)
|
||||
status_t status = SaveAsDraft();
|
||||
if (status != B_OK) {
|
||||
beep();
|
||||
(new BAlert("", TR("E-mail draft could not be saved!"),
|
||||
TR("OK")))->Go();
|
||||
(new BAlert("", B_TRANSLATE("E-mail draft could not be saved!"),
|
||||
B_TRANSLATE("OK")))->Go();
|
||||
}
|
||||
return status;
|
||||
}
|
||||
@@ -2283,7 +2305,7 @@ TMailWindow::Send(bool now)
|
||||
BString messageString;
|
||||
BString countString;
|
||||
countString << count;
|
||||
messageString << TR("Your main text contains %ld"
|
||||
messageString << B_TRANSLATE("Your main text contains %ld"
|
||||
" unencodable characters. Perhaps a different "
|
||||
"character set would work better? Hit Send to send it "
|
||||
"anyway "
|
||||
@@ -2292,8 +2314,8 @@ TMailWindow::Send(bool now)
|
||||
"and try fixing it up.");
|
||||
messageString.ReplaceFirst("%ld", countString);
|
||||
userAnswer = (new BAlert("Question", messageString.String(),
|
||||
TR("Send"),
|
||||
TR("Cancel"),
|
||||
B_TRANSLATE("Send"),
|
||||
B_TRANSLATE("Cancel"),
|
||||
NULL, B_WIDTH_AS_USUAL, B_OFFSET_SPACING,
|
||||
B_WARNING_ALERT))->Go();
|
||||
if (userAnswer == 1) {
|
||||
@@ -2427,9 +2449,9 @@ TMailWindow::Send(bool now)
|
||||
fSent = true;
|
||||
|
||||
int32 start = (new BAlert("no daemon",
|
||||
TR("The mail_daemon is not running. The message is queued and "
|
||||
"will be sent when the mail_daemon is started."),
|
||||
TR("Start now"), TR("OK")))->Go();
|
||||
B_TRANSLATE("The mail_daemon is not running. The message is "
|
||||
"queued and will be sent when the mail_daemon is started."),
|
||||
B_TRANSLATE("Start now"), B_TRANSLATE("OK")))->Go();
|
||||
|
||||
if (start == 0) {
|
||||
result = be_roster->Launch("application/x-vnd.Be-POST");
|
||||
@@ -2437,7 +2459,8 @@ TMailWindow::Send(bool now)
|
||||
BMailDaemon::SendQueuedMail();
|
||||
} else {
|
||||
errorMessage
|
||||
<< TR("The mail_daemon could not be started:\n\t")
|
||||
<< B_TRANSLATE("The mail_daemon could not be "
|
||||
"started:\n\t")
|
||||
<< strerror(result);
|
||||
}
|
||||
}
|
||||
@@ -2464,7 +2487,7 @@ TMailWindow::Send(bool now)
|
||||
|
||||
if (result != B_NO_ERROR && result != B_MAIL_NO_DAEMON) {
|
||||
beep();
|
||||
(new BAlert("", errorMessage.String(), TR("OK")))->Go();
|
||||
(new BAlert("", errorMessage.String(), B_TRANSLATE("OK")))->Go();
|
||||
}
|
||||
if (close) {
|
||||
PostMessage(B_QUIT_REQUESTED);
|
||||
@@ -2687,7 +2710,7 @@ ErrorExit:
|
||||
"Possibly useful error code: %s (%ld).",
|
||||
filePath.Path(), CommandWord, strerror (errorCode), errorCode);
|
||||
(new BAlert("", errorString,
|
||||
TR("OK")))->Go();
|
||||
B_TRANSLATE("OK")))->Go();
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
@@ -2973,7 +2996,8 @@ TMailWindow::_RebuildQueryMenu(bool firstTime)
|
||||
delete item;
|
||||
}
|
||||
|
||||
fQueryMenu->AddItem(new BMenuItem(TR("Edit queries" B_UTF8_ELLIPSIS),
|
||||
fQueryMenu->AddItem(new BMenuItem(B_TRANSLATE("Edit queries"
|
||||
B_UTF8_ELLIPSIS),
|
||||
new BMessage(M_EDIT_QUERIES), 'E', B_SHIFT_KEY));
|
||||
|
||||
bool queryItemsAdded = false;
|
||||
@@ -3138,10 +3162,10 @@ TMailWindow::_AddReadButton()
|
||||
int32 buttonIndex = fButtonBar->IndexOf(fNextButton);
|
||||
if (newMail)
|
||||
fReadButton = fButtonBar->AddButton(
|
||||
TR(" Read "), 24, new BMessage(M_READ), buttonIndex);
|
||||
B_TRANSLATE(" Read "), 24, new BMessage(M_READ), buttonIndex);
|
||||
else
|
||||
fReadButton = fButtonBar->AddButton(
|
||||
TR("Unread"), 28, new BMessage(M_UNREAD), buttonIndex);
|
||||
B_TRANSLATE("Unread"), 28, new BMessage(M_UNREAD), buttonIndex);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+70
-56
@@ -19,17 +19,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of Be Incorporated shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings in
|
||||
this Software without prior written authorization from Be Incorporated.
|
||||
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
|
||||
of Be Incorporated in the United States and other countries. Other brand product
|
||||
names are registered trademarks or trademarks of their respective holders.
|
||||
All rights reserved.
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
|
||||
registered trademarks of Be Incorporated in the United States and other
|
||||
countries. Other brand product names are registered trademarks or trademarks
|
||||
of their respective holders. All rights reserved.
|
||||
*/
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ TPrefsWindow::TPrefsWindow(BRect rect, BFont* font, int32* level, bool* wrap,
|
||||
char** preamble, char** sig, uint32* encoding, bool* warnUnencodable,
|
||||
bool* spellCheckStartOn, bool* autoMarkRead, uint8* buttonBar)
|
||||
:
|
||||
BWindow(rect, TR("Mail preferences"),
|
||||
BWindow(rect, B_TRANSLATE("Mail preferences"),
|
||||
B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE
|
||||
| B_AUTO_UPDATE_SIZE_LIMITS),
|
||||
|
||||
@@ -139,7 +139,7 @@ TPrefsWindow::TPrefsWindow(BRect rect, BFont* font, int32* level, bool* wrap,
|
||||
|
||||
fNewSpellCheckStartOn(spellCheckStartOn),
|
||||
fSpellCheckStartOn(*fNewSpellCheckStartOn),
|
||||
|
||||
|
||||
fNewAutoMarkRead(autoMarkRead),
|
||||
fAutoMarkRead(*fNewAutoMarkRead)
|
||||
{
|
||||
@@ -161,19 +161,20 @@ TPrefsWindow::TPrefsWindow(BRect rect, BFont* font, int32* level, bool* wrap,
|
||||
interfaceLayout->AlignLayoutWith(mailLayout, B_HORIZONTAL);
|
||||
|
||||
BBox* interfaceBox = new BBox(B_FANCY_BORDER, interfaceView);
|
||||
interfaceBox->SetLabel(TR("User interface"));
|
||||
interfaceBox->SetLabel(B_TRANSLATE("User interface"));
|
||||
BBox* mailBox = new BBox(B_FANCY_BORDER, mailView);
|
||||
mailBox->SetLabel(TR("Mailing"));
|
||||
mailBox->SetLabel(B_TRANSLATE("Mailing"));
|
||||
|
||||
// revert, ok & cancel
|
||||
|
||||
BButton* okButton = new BButton("ok", TR("OK"), new BMessage(P_OK));
|
||||
BButton* okButton = new BButton("ok", B_TRANSLATE("OK"),
|
||||
new BMessage(P_OK));
|
||||
okButton->MakeDefault(true);
|
||||
|
||||
BButton* cancelButton = new BButton("cancel", TR("Cancel"),
|
||||
BButton* cancelButton = new BButton("cancel", B_TRANSLATE("Cancel"),
|
||||
new BMessage(P_CANCEL));
|
||||
|
||||
fRevert = new BButton("revert", TR("Revert"),
|
||||
fRevert = new BButton("revert", B_TRANSLATE("Revert"),
|
||||
new BMessage(P_REVERT));
|
||||
fRevert->SetEnabled(false);
|
||||
|
||||
@@ -181,47 +182,53 @@ TPrefsWindow::TPrefsWindow(BRect rect, BFont* font, int32* level, bool* wrap,
|
||||
int32 layoutRow = 0;
|
||||
|
||||
fButtonBarMenu = _BuildButtonBarMenu(*buttonBar);
|
||||
menu = new BMenuField("bar", TR("Button bar:"), fButtonBarMenu, NULL);
|
||||
menu = new BMenuField("bar", B_TRANSLATE("Button bar:"),
|
||||
fButtonBarMenu, NULL);
|
||||
add_menu_to_layout(menu, interfaceLayout, layoutRow);
|
||||
|
||||
fFontMenu = _BuildFontMenu(font);
|
||||
menu = new BMenuField("font", TR("Font:"), fFontMenu, NULL);
|
||||
menu = new BMenuField("font", B_TRANSLATE("Font:"),
|
||||
fFontMenu, NULL);
|
||||
add_menu_to_layout(menu, interfaceLayout, layoutRow);
|
||||
|
||||
fSizeMenu = _BuildSizeMenu(font);
|
||||
menu = new BMenuField("size", TR("Size:"), fSizeMenu, NULL);
|
||||
menu = new BMenuField("size", B_TRANSLATE("Size:"), fSizeMenu, NULL);
|
||||
add_menu_to_layout(menu, interfaceLayout, layoutRow);
|
||||
|
||||
fColoredQuotesMenu = _BuildColoredQuotesMenu(fColoredQuotes);
|
||||
menu = new BMenuField("cquotes", TR("Colored quotes:"), fColoredQuotesMenu,
|
||||
NULL);
|
||||
menu = new BMenuField("cquotes", B_TRANSLATE("Colored quotes:"),
|
||||
fColoredQuotesMenu, NULL);
|
||||
add_menu_to_layout(menu, interfaceLayout, layoutRow);
|
||||
|
||||
fSpellCheckStartOnMenu = _BuildSpellCheckStartOnMenu(fSpellCheckStartOn);
|
||||
menu = new BMenuField("spellCheckStartOn", TR("Initial spell check mode:"),
|
||||
menu = new BMenuField("spellCheckStartOn",
|
||||
B_TRANSLATE("Initial spell check mode:"),
|
||||
fSpellCheckStartOnMenu, NULL);
|
||||
add_menu_to_layout(menu, interfaceLayout, layoutRow);
|
||||
|
||||
fAutoMarkReadMenu = _BuildAutoMarkReadMenu(fAutoMarkRead);
|
||||
menu = new BMenuField("autoMarkRead",
|
||||
TR("Automatically mark mail as read:"), fAutoMarkReadMenu, NULL);
|
||||
B_TRANSLATE("Automatically mark mail as read:"),
|
||||
fAutoMarkReadMenu, NULL);
|
||||
add_menu_to_layout(menu, interfaceLayout, layoutRow);
|
||||
// Mail Accounts
|
||||
|
||||
layoutRow = 0;
|
||||
|
||||
fAccountMenu = _BuildAccountMenu(fAccount);
|
||||
menu = new BMenuField("account", TR("Default account:"), fAccountMenu,
|
||||
NULL);
|
||||
menu = new BMenuField("account", B_TRANSLATE("Default account:"),
|
||||
fAccountMenu, NULL);
|
||||
add_menu_to_layout(menu, mailLayout, layoutRow);
|
||||
|
||||
fReplyToMenu = _BuildReplyToMenu(fReplyTo);
|
||||
menu = new BMenuField("replyTo", TR("Reply account:"), fReplyToMenu, NULL);
|
||||
menu = new BMenuField("replyTo", B_TRANSLATE("Reply account:"),
|
||||
fReplyToMenu, NULL);
|
||||
add_menu_to_layout(menu, mailLayout, layoutRow);
|
||||
|
||||
// Mail Contents
|
||||
|
||||
fReplyPreamble = new BTextControl("replytext", TR("Reply preamble:"),
|
||||
fReplyPreamble = new BTextControl("replytext",
|
||||
B_TRANSLATE("Reply preamble:"),
|
||||
*preamble, new BMessage(P_REPLY_PREAMBLE));
|
||||
fReplyPreamble->SetAlignment(B_ALIGN_RIGHT, B_ALIGN_LEFT);
|
||||
|
||||
@@ -236,24 +243,28 @@ TPrefsWindow::TPrefsWindow(BRect rect, BFont* font, int32* level, bool* wrap,
|
||||
layoutRow++;
|
||||
|
||||
fSignatureMenu = _BuildSignatureMenu(*sig);
|
||||
menu = new BMenuField("sig", TR("Auto signature:"), fSignatureMenu, NULL);
|
||||
menu = new BMenuField("sig", B_TRANSLATE("Auto signature:"),
|
||||
fSignatureMenu, NULL);
|
||||
add_menu_to_layout(menu, mailLayout, layoutRow);
|
||||
|
||||
fEncodingMenu = _BuildEncodingMenu(fEncoding);
|
||||
menu = new BMenuField("enc", TR("Encoding:"), fEncodingMenu, NULL);
|
||||
menu = new BMenuField("enc", B_TRANSLATE("Encoding:"),
|
||||
fEncodingMenu, NULL);
|
||||
add_menu_to_layout(menu, mailLayout, layoutRow);
|
||||
|
||||
fWarnUnencodableMenu = _BuildWarnUnencodableMenu(fWarnUnencodable);
|
||||
menu = new BMenuField("warnUnencodable", TR("Warn unencodable:"),
|
||||
menu = new BMenuField("warnUnencodable", B_TRANSLATE("Warn unencodable:"),
|
||||
fWarnUnencodableMenu, NULL);
|
||||
add_menu_to_layout(menu, mailLayout, layoutRow);
|
||||
|
||||
fWrapMenu = _BuildWrapMenu(*wrap);
|
||||
menu = new BMenuField("wrap", TR("Text wrapping:"), fWrapMenu, NULL);
|
||||
menu = new BMenuField("wrap", B_TRANSLATE("Text wrapping:"),
|
||||
fWrapMenu, NULL);
|
||||
add_menu_to_layout(menu, mailLayout, layoutRow);
|
||||
|
||||
|
||||
fAttachAttributesMenu = _BuildAttachAttributesMenu(*attachAttributes);
|
||||
menu = new BMenuField("attachAttributes", TR("Attach attributes:"),
|
||||
menu = new BMenuField("attachAttributes",
|
||||
B_TRANSLATE("Attach attributes:"),
|
||||
fAttachAttributesMenu, NULL);
|
||||
add_menu_to_layout(menu, mailLayout, layoutRow);
|
||||
|
||||
@@ -370,7 +381,8 @@ TPrefsWindow::MessageReceived(BMessage* msg)
|
||||
}
|
||||
|
||||
strcpy(label,fReplyTo == ACCOUNT_USE_DEFAULT
|
||||
? TR("Use default account") : TR("Account from mail"));
|
||||
? B_TRANSLATE("Use default account")
|
||||
: B_TRANSLATE("Account from mail"));
|
||||
if ((item = fReplyToMenu->FindItem(label)) != NULL)
|
||||
item->SetMarked(true);
|
||||
|
||||
@@ -379,8 +391,8 @@ TPrefsWindow::MessageReceived(BMessage* msg)
|
||||
item->SetMarked(true);
|
||||
|
||||
strcpy(label, fAttachAttributes
|
||||
? TR("Include file attributes in attachments")
|
||||
: TR("No file attributes, just plain data"));
|
||||
? B_TRANSLATE("Include file attributes in attachments")
|
||||
: B_TRANSLATE("No file attributes, just plain data"));
|
||||
if ((item = fAttachAttributesMenu->FindItem(label)) != NULL)
|
||||
item->SetMarked(true);
|
||||
|
||||
@@ -482,8 +494,9 @@ TPrefsWindow::MessageReceived(BMessage* msg)
|
||||
*fNewSignature = (char*)malloc(strlen(signature) + 1);
|
||||
strcpy(*fNewSignature, signature);
|
||||
} else {
|
||||
*fNewSignature = (char*)malloc(strlen(TR("None")) + 1);
|
||||
strcpy(*fNewSignature, TR("None"));
|
||||
*fNewSignature = (char*)malloc(
|
||||
strlen(B_TRANSLATE("None")) + 1);
|
||||
strcpy(*fNewSignature, B_TRANSLATE("None"));
|
||||
}
|
||||
break;
|
||||
case P_ENC:
|
||||
@@ -503,7 +516,7 @@ TPrefsWindow::MessageReceived(BMessage* msg)
|
||||
msg->FindInt8("bar", (int8*)fNewButtonBar);
|
||||
be_app->PostMessage(PREFS_CHANGED);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
BWindow::MessageReceived(msg);
|
||||
}
|
||||
@@ -595,13 +608,13 @@ TPrefsWindow::_BuildLevelMenu(int32 level)
|
||||
menu = new BPopUpMenu("");
|
||||
msg = new BMessage(P_LEVEL);
|
||||
msg->AddInt32("level", L_BEGINNER);
|
||||
menu->AddItem(item = new BMenuItem(TR("Beginner"), msg));
|
||||
menu->AddItem(item = new BMenuItem(B_TRANSLATE("Beginner"), msg));
|
||||
if (level == L_BEGINNER)
|
||||
item->SetMarked(true);
|
||||
|
||||
msg = new BMessage(P_LEVEL);
|
||||
msg->AddInt32("level", L_EXPERT);
|
||||
menu->AddItem(item = new BMenuItem(TR("Expert"), msg));
|
||||
menu->AddItem(item = new BMenuItem(B_TRANSLATE("Expert"), msg));
|
||||
if (level == L_EXPERT)
|
||||
item->SetMarked(true);
|
||||
|
||||
@@ -647,13 +660,13 @@ TPrefsWindow::_BuildReplyToMenu(int32 account)
|
||||
|
||||
BMenuItem* item;
|
||||
BMessage* msg;
|
||||
menu->AddItem(item = new BMenuItem(TR("Use default account"),
|
||||
menu->AddItem(item = new BMenuItem(B_TRANSLATE("Use default account"),
|
||||
msg = new BMessage(P_REPLYTO)));
|
||||
msg->AddInt32("replyTo", ACCOUNT_USE_DEFAULT);
|
||||
if (account == ACCOUNT_USE_DEFAULT)
|
||||
item->SetMarked(true);
|
||||
|
||||
menu->AddItem(item = new BMenuItem(TR("Account from mail"),
|
||||
menu->AddItem(item = new BMenuItem(B_TRANSLATE("Account from mail"),
|
||||
msg = new BMessage(P_REPLYTO)));
|
||||
msg->AddInt32("replyTo", ACCOUNT_FROM_MAIL);
|
||||
if (account == ACCOUNT_FROM_MAIL)
|
||||
@@ -671,11 +684,11 @@ TPrefsWindow::_BuildReplyPreambleMenu()
|
||||
"%f - First name",
|
||||
"%l - Last name",
|
||||
*/
|
||||
TR("%n - Full name"),
|
||||
TR("%e - E-mail address"),
|
||||
TR("%d - Date"),
|
||||
B_TRANSLATE("%n - Full name"),
|
||||
B_TRANSLATE("%e - E-mail address"),
|
||||
B_TRANSLATE("%d - Date"),
|
||||
"",
|
||||
TR("\\n - Newline"),
|
||||
B_TRANSLATE("\\n - Newline"),
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -709,15 +722,15 @@ TPrefsWindow::_BuildSignatureMenu(char* sig)
|
||||
BPopUpMenu* menu = new BPopUpMenu("");
|
||||
|
||||
msg = new BMessage(P_SIG);
|
||||
msg->AddString("signature", TR("None"));
|
||||
menu->AddItem(item = new BMenuItem(TR("None"), msg));
|
||||
if (!strcmp(sig, TR("None")))
|
||||
msg->AddString("signature", B_TRANSLATE("None"));
|
||||
menu->AddItem(item = new BMenuItem(B_TRANSLATE("None"), msg));
|
||||
if (!strcmp(sig, B_TRANSLATE("None")))
|
||||
item->SetMarked(true);
|
||||
|
||||
|
||||
msg = new BMessage(P_SIG);
|
||||
msg->AddString("signature", TR("Random"));
|
||||
menu->AddItem(item = new BMenuItem(TR("Random"), msg));
|
||||
if (!strcmp(sig, TR("Random")))
|
||||
msg->AddString("signature", B_TRANSLATE("Random"));
|
||||
menu->AddItem(item = new BMenuItem(B_TRANSLATE("Random"), msg));
|
||||
if (!strcmp(sig, B_TRANSLATE("Random")))
|
||||
item->SetMarked(true);
|
||||
menu->AddSeparatorItem();
|
||||
|
||||
@@ -808,14 +821,14 @@ TPrefsWindow::_BuildAttachAttributesMenu(bool attachAttributes)
|
||||
msg = new BMessage(P_ATTACH_ATTRIBUTES);
|
||||
msg->AddBool("attachAttributes", true);
|
||||
menu->AddItem(item = new BMenuItem(
|
||||
TR("Include file attributes in attachments"), msg));
|
||||
B_TRANSLATE("Include file attributes in attachments"), msg));
|
||||
if (attachAttributes)
|
||||
item->SetMarked(true);
|
||||
|
||||
msg = new BMessage(P_ATTACH_ATTRIBUTES);
|
||||
msg->AddInt32("attachAttributes", false);
|
||||
menu->AddItem(item = new BMenuItem(
|
||||
TR("No file attributes, just plain data"), msg));
|
||||
B_TRANSLATE("No file attributes, just plain data"), msg));
|
||||
if (!attachAttributes)
|
||||
item->SetMarked(true);
|
||||
|
||||
@@ -901,19 +914,20 @@ TPrefsWindow::_BuildButtonBarMenu(uint8 show)
|
||||
|
||||
msg = new BMessage(P_BUTTON_BAR);
|
||||
msg->AddInt8("bar", 1);
|
||||
menu->AddItem(item = new BMenuItem(TR("Show icons & labels"), msg));
|
||||
menu->AddItem(item = new BMenuItem(
|
||||
B_TRANSLATE("Show icons & labels"), msg));
|
||||
if (show & 1)
|
||||
item->SetMarked(true);
|
||||
|
||||
msg = new BMessage(P_BUTTON_BAR);
|
||||
msg->AddInt8("bar", 2);
|
||||
menu->AddItem(item = new BMenuItem(TR("Show icons only"), msg));
|
||||
menu->AddItem(item = new BMenuItem(B_TRANSLATE("Show icons only"), msg));
|
||||
if (show & 2)
|
||||
item->SetMarked(true);
|
||||
|
||||
msg = new BMessage(P_BUTTON_BAR);
|
||||
msg->AddInt8("bar", 0);
|
||||
menu->AddItem(item = new BMenuItem(TR("Hide"), msg));
|
||||
menu->AddItem(item = new BMenuItem(B_TRANSLATE("Hide"), msg));
|
||||
if (!show)
|
||||
item->SetMarked(true);
|
||||
|
||||
|
||||
@@ -19,17 +19,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of Be Incorporated shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings in
|
||||
this Software without prior written authorization from Be Incorporated.
|
||||
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
|
||||
of Be Incorporated in the United States and other countries. Other brand product
|
||||
names are registered trademarks or trademarks of their respective holders.
|
||||
All rights reserved.
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
|
||||
registered trademarks of Be Incorporated in the United States and other
|
||||
countries. Other brand product names are registered trademarks or trademarks
|
||||
of their respective holders. All rights reserved.
|
||||
*/
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ Settings::Settings()
|
||||
fContentFont(be_fixed_font)
|
||||
{
|
||||
fContentFont.SetSize(12.0);
|
||||
fSignature = TR("None");
|
||||
fSignature = B_TRANSLATE("None");
|
||||
|
||||
LoadSettings();
|
||||
|
||||
|
||||
+47
-34
@@ -19,17 +19,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of Be Incorporated shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings in
|
||||
this Software without prior written authorization from Be Incorporated.
|
||||
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
|
||||
of Be Incorporated in the United States and other countries. Other brand product
|
||||
names are registered trademarks or trademarks of their respective holders.
|
||||
All rights reserved.
|
||||
BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or
|
||||
registered trademarks of Be Incorporated in the United States and other
|
||||
countries. Other brand product names are registered trademarks or trademarks
|
||||
of their respective holders. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "Signature.h"
|
||||
@@ -60,7 +60,7 @@ extern const char *kRedoStrings[];
|
||||
|
||||
TSignatureWindow::TSignatureWindow(BRect rect)
|
||||
:
|
||||
BWindow (rect, TR("Signatures"), B_TITLED_WINDOW, 0),
|
||||
BWindow (rect, B_TRANSLATE("Signatures"), B_TITLED_WINDOW, 0),
|
||||
fFile(NULL)
|
||||
{
|
||||
BMenu *menu;
|
||||
@@ -70,30 +70,35 @@ TSignatureWindow::TSignatureWindow(BRect rect)
|
||||
BRect r = Bounds();
|
||||
/*** Set up the menus ****/
|
||||
menu_bar = new BMenuBar(r, "MenuBar");
|
||||
menu = new BMenu(TR("Signature"));
|
||||
menu->AddItem(fNew = new BMenuItem(TR("New"), new BMessage(M_NEW), 'N'));
|
||||
fSignature = new TMenu(TR("Open"), INDEX_SIGNATURE, M_SIGNATURE);
|
||||
menu = new BMenu(B_TRANSLATE("Signature"));
|
||||
menu->AddItem(fNew = new BMenuItem(B_TRANSLATE("New"),
|
||||
new BMessage(M_NEW), 'N'));
|
||||
fSignature = new TMenu(B_TRANSLATE("Open"), INDEX_SIGNATURE, M_SIGNATURE);
|
||||
menu->AddItem(new BMenuItem(fSignature));
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(fSave = new BMenuItem(TR("Save"), new BMessage(M_SAVE), 'S'));
|
||||
menu->AddItem(fDelete = new BMenuItem(TR("Delete"), new BMessage(M_DELETE),
|
||||
'T'));
|
||||
menu->AddItem(fSave = new BMenuItem(B_TRANSLATE("Save"),
|
||||
new BMessage(M_SAVE), 'S'));
|
||||
menu->AddItem(fDelete = new BMenuItem(B_TRANSLATE("Delete"),
|
||||
new BMessage(M_DELETE), 'T'));
|
||||
menu_bar->AddItem(menu);
|
||||
|
||||
menu = new BMenu(TR("Edit"));
|
||||
menu->AddItem(fUndo = new BMenuItem(TR("Undo"), new BMessage(B_UNDO), 'Z'));
|
||||
menu = new BMenu(B_TRANSLATE("Edit"));
|
||||
menu->AddItem(fUndo = new BMenuItem(B_TRANSLATE("Undo"),
|
||||
new BMessage(B_UNDO), 'Z'));
|
||||
fUndo->SetTarget(NULL, this);
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(fCut = new BMenuItem(TR("Cut"), new BMessage(B_CUT), 'X'));
|
||||
menu->AddItem(fCut = new BMenuItem(B_TRANSLATE("Cut"),
|
||||
new BMessage(B_CUT), 'X'));
|
||||
fCut->SetTarget(NULL, this);
|
||||
menu->AddItem(fCopy = new BMenuItem(TR("Copy"), new BMessage(B_COPY), 'C'));
|
||||
menu->AddItem(fCopy = new BMenuItem(B_TRANSLATE("Copy"),
|
||||
new BMessage(B_COPY), 'C'));
|
||||
fCopy->SetTarget(NULL, this);
|
||||
menu->AddItem(fPaste = new BMenuItem(TR("Paste"), new BMessage(B_PASTE),
|
||||
'V'));
|
||||
menu->AddItem(fPaste = new BMenuItem(B_TRANSLATE("Paste"),
|
||||
new BMessage(B_PASTE), 'V'));
|
||||
fPaste->SetTarget(NULL, this);
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(item = new BMenuItem(TR("Select all"), new BMessage(M_SELECT),
|
||||
'A'));
|
||||
menu->AddItem(item = new BMenuItem(B_TRANSLATE("Select all"),
|
||||
new BMessage(M_SELECT), 'A'));
|
||||
item->SetTarget(NULL, this);
|
||||
menu_bar->AddItem(menu);
|
||||
|
||||
@@ -189,9 +194,11 @@ TSignatureWindow::MessageReceived(BMessage* msg)
|
||||
|
||||
case M_DELETE:
|
||||
if (!(new BAlert("",
|
||||
TR("Really delete this signature? This cannot be undone."),
|
||||
TR("Cancel"), TR("Delete"), NULL, B_WIDTH_AS_USUAL,
|
||||
B_WARNING_ALERT))->Go())
|
||||
B_TRANSLATE("Really delete this signature? This cannot "
|
||||
"be undone."),
|
||||
B_TRANSLATE("Cancel"),
|
||||
B_TRANSLATE("Delete"),
|
||||
NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go())
|
||||
break;
|
||||
|
||||
if (fFile) {
|
||||
@@ -224,8 +231,9 @@ TSignatureWindow::MessageReceived(BMessage* msg)
|
||||
else {
|
||||
fFile = NULL;
|
||||
beep();
|
||||
(new BAlert("", TR("Couldn't open this signature. Sorry."),
|
||||
TR("OK")))->Go();
|
||||
(new BAlert("",
|
||||
B_TRANSLATE("Couldn't open this signature. Sorry."),
|
||||
B_TRANSLATE("OK")))->Go();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -280,8 +288,11 @@ TSignatureWindow::Clear()
|
||||
|
||||
if (IsDirty()) {
|
||||
beep();
|
||||
BAlert *alert = new BAlert("", TR("Save changes to this signature?"),
|
||||
TR("Don't save"), TR("Cancel"), TR("Save"),
|
||||
BAlert *alert = new BAlert("",
|
||||
B_TRANSLATE("Save changes to this signature?"),
|
||||
B_TRANSLATE("Don't save"),
|
||||
B_TRANSLATE("Cancel"),
|
||||
B_TRANSLATE("Save"),
|
||||
B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||
alert->SetShortcut(0, 'd');
|
||||
alert->SetShortcut(1, B_ESCAPE);
|
||||
@@ -374,8 +385,9 @@ TSignatureWindow::Save()
|
||||
|
||||
err_exit:
|
||||
beep();
|
||||
(new BAlert("", TR("An error occurred trying to save this signature."),
|
||||
TR("Sorry")))->Go();
|
||||
(new BAlert("",
|
||||
B_TRANSLATE("An error occurred trying to save this signature."),
|
||||
B_TRANSLATE("Sorry")))->Go();
|
||||
}
|
||||
|
||||
|
||||
@@ -393,8 +405,8 @@ void
|
||||
TSignatureView::AttachedToWindow()
|
||||
{
|
||||
BRect rect = Bounds();
|
||||
float name_text_length = StringWidth(TR("Title:"));
|
||||
float sig_text_length = StringWidth(TR("Signature:"));
|
||||
float name_text_length = StringWidth(B_TRANSLATE("Title:"));
|
||||
float sig_text_length = StringWidth(B_TRANSLATE("Signature:"));
|
||||
float divide_length;
|
||||
|
||||
if (name_text_length > sig_text_length)
|
||||
@@ -405,7 +417,8 @@ TSignatureView::AttachedToWindow()
|
||||
rect.InsetBy(8,0);
|
||||
rect.top+= 8;
|
||||
|
||||
fName = new TNameControl(rect, TR("Title:"), new BMessage(NAME_FIELD));
|
||||
fName = new TNameControl(rect, B_TRANSLATE("Title:"),
|
||||
new BMessage(NAME_FIELD));
|
||||
AddChild(fName);
|
||||
|
||||
fName->SetDivider(divide_length + 10);
|
||||
@@ -427,7 +440,7 @@ TSignatureView::AttachedToWindow()
|
||||
|
||||
rect = scroller->Frame();
|
||||
BStringView *stringView = new BStringView(rect, "SigLabel",
|
||||
TR("Signature:"));
|
||||
B_TRANSLATE("Signature:"));
|
||||
AddChild(stringView);
|
||||
|
||||
float tWidth, tHeight;
|
||||
|
||||
Reference in New Issue
Block a user