diff --git a/src/add-ons/input_server/filters/shortcut_catcher/CommandActuators.cpp b/src/add-ons/input_server/filters/shortcut_catcher/CommandActuators.cpp index 44cf89a8bb..0bf96af83c 100644 --- a/src/add-ons/input_server/filters/shortcut_catcher/CommandActuators.cpp +++ b/src/add-ons/input_server/filters/shortcut_catcher/CommandActuators.cpp @@ -34,32 +34,32 @@ || (msg->what == B_UNMAPPED_KEY_DOWN)) // Factory function -CommandActuator* +CommandActuator* CreateCommandActuator(const char* command) { - CommandActuator* act = NULL; + CommandActuator* act = NULL; int32 argc; char** argv = ParseArgvFromString(command, argc); if (command[0] == '*') { if (argc > 0) { char* c = argv[0] + 1; - if (strcmp(c, "InsertString") == 0) + if (strcmp(c, "InsertString") == 0) act = new KeyStrokeSequenceCommandActuator(argc, argv); else if (strcmp(c, "MoveMouse") == 0) act = new MoveMouseByCommandActuator(argc, argv); else if (strcmp(c, "MoveMouseTo") == 0) act = new MoveMouseToCommandActuator(argc, argv); - else if (strcmp(c, "MouseButton") == 0) + else if (strcmp(c, "MouseButton") == 0) act = new MouseButtonCommandActuator(argc, argv); else if (strcmp(c, "LaunchHandler") == 0) act = new MIMEHandlerCommandActuator(argc, argv); - else if (strcmp(c, "Multi") == 0) + else if (strcmp(c, "Multi") == 0) act = new MultiCommandActuator(argc, argv); - else if (strcmp(c, "MouseDown") == 0) + else if (strcmp(c, "MouseDown") == 0) act = new MouseDownCommandActuator(argc, argv); - else if (strcmp(c, "MouseUp") == 0) + else if (strcmp(c, "MouseUp") == 0) act = new MouseUpCommandActuator(argc, argv); - else if (strcmp(c, "SendMessage") == 0) + else if (strcmp(c, "SendMessage") == 0) act = new SendMessageCommandActuator(argc, argv); else act = new BeepCommandActuator(argc, argv); @@ -106,8 +106,8 @@ CommandActuator::Archive(BMessage* into, bool deep) const /////////////////////////////////////////////////////////////////////////////// LaunchCommandActuator::LaunchCommandActuator(int32 argc, char** argv) : - CommandActuator(argc, argv), - fArgv(CloneArgv(argv)), + CommandActuator(argc, argv), + fArgv(CloneArgv(argv)), fArgc(argc) { // empty @@ -131,10 +131,10 @@ LaunchCommandActuator::LaunchCommandActuator(BMessage* from) fArgc = argList.CountItems(); fArgv = new char*[fArgc+ 1]; - - for (int i = 0; i < fArgc; i++) + + for (int i = 0; i < fArgc; i++) fArgv[i] = (char*) argList.ItemAt(i); - + fArgv[fArgc] = NULL;// terminate the array } @@ -146,7 +146,7 @@ LaunchCommandActuator::~LaunchCommandActuator() filter_result -LaunchCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, +LaunchCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, void** setAsyncData, BMessage* lastMouseMove) { if (IS_KEY_DOWN(keyMsg)) { @@ -161,7 +161,7 @@ status_t LaunchCommandActuator::Archive(BMessage* into, bool deep) const { status_t ret = CommandActuator::Archive(into, deep); - + for (int i = 0; i < fArgc; i++) into->AddString("largv", fArgv[i]); @@ -180,13 +180,13 @@ LaunchCommandActuator ::Instantiate(BMessage* from) void -LaunchCommandActuator::KeyEventAsync(const BMessage* keyMsg, +LaunchCommandActuator::KeyEventAsync(const BMessage* keyMsg, void* asyncData) { if (be_roster) { status_t err = B_OK; - BString str; - BString str1("Shortcuts Launcher Error"); + BString str; + BString str1("Shortcuts launcher error"); if (fArgc < 1) str << "You didn't specify a command for this hotkey."; else if ((err = LaunchCommand(fArgv, fArgc)) != B_NO_ERROR) { @@ -196,7 +196,7 @@ LaunchCommandActuator::KeyEventAsync(const BMessage* keyMsg, } if (fArgc < 1 || err != B_NO_ERROR) - (new BAlert(str1.String(), str.String(), "Ok"))->Go(NULL); + (new BAlert(str1.String(), str.String(), "OK"))->Go(NULL); } } @@ -208,7 +208,7 @@ LaunchCommandActuator::KeyEventAsync(const BMessage* keyMsg, /////////////////////////////////////////////////////////////////////////////// MouseCommandActuator::MouseCommandActuator(int32 argc, char** argv) : - CommandActuator(argc, argv), + CommandActuator(argc, argv), fWhichButtons(B_PRIMARY_MOUSE_BUTTON) { if (argc > 1) { @@ -216,9 +216,9 @@ MouseCommandActuator::MouseCommandActuator(int32 argc, char** argv) for (int i = 1; i < argc; i++) { int buttonNumber = atoi(argv[i]); - + switch(buttonNumber) { - case 1: + case 1: fWhichButtons |= B_PRIMARY_MOUSE_BUTTON; break; case 2: @@ -252,7 +252,7 @@ status_t MouseCommandActuator::Archive(BMessage* into, bool deep) const { status_t ret = CommandActuator::Archive(into, deep); - into->AddInt32("buttons", fWhichButtons); + into->AddInt32("buttons", fWhichButtons); return ret; } @@ -265,30 +265,30 @@ MouseCommandActuator::_GetWhichButtons() const void -MouseCommandActuator::_GenerateMouseButtonEvent(bool mouseDown, +MouseCommandActuator::_GenerateMouseButtonEvent(bool mouseDown, const BMessage* keyMsg, BList* outlist, BMessage* lastMouseMove) -{ +{ BMessage* fakeMouse = new BMessage(*lastMouseMove); fakeMouse->what = mouseDown ? B_MOUSE_DOWN : B_MOUSE_UP; - + // Update the buttons to reflect which mouse buttons we are faking fakeMouse->RemoveName("buttons"); - - if (mouseDown) - fakeMouse->AddInt32("buttons", fWhichButtons); - // Trey sez you gotta keep then "when"'s increasing if you want + if (mouseDown) + fakeMouse->AddInt32("buttons", fWhichButtons); + + // Trey sez you gotta keep then "when"'s increasing if you want // click & drag to work! int64 when; - + const BMessage* lastMessage; - + if (outlist->CountItems() > 0) { int nr = outlist->CountItems() - 1; lastMessage = (const BMessage*)outlist->ItemAt(nr); } else lastMessage =keyMsg; - + if (lastMessage->FindInt64("when", &when) == B_NO_ERROR) { when++; fakeMouse->RemoveName("when"); @@ -326,12 +326,12 @@ MouseDownCommandActuator::~MouseDownCommandActuator() filter_result -MouseDownCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, +MouseDownCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, void** setAsyncData, BMessage* lastMouseMove) { - if (IS_KEY_DOWN(keyMsg)) + if (IS_KEY_DOWN(keyMsg)) _GenerateMouseButtonEvent(true, keyMsg, outlist, lastMouseMove); - + return B_DISPATCH_MESSAGE; } @@ -346,7 +346,7 @@ MouseDownCommandActuator::Archive(BMessage* into, bool deep) const BArchivable* MouseDownCommandActuator ::Instantiate(BMessage* from) { - if (validate_instantiation(from, "MouseDownCommandActuator")) + if (validate_instantiation(from, "MouseDownCommandActuator")) return new MouseDownCommandActuator(from); else return NULL; @@ -381,10 +381,10 @@ MouseUpCommandActuator::~MouseUpCommandActuator() filter_result -MouseUpCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, +MouseUpCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, void** setAsyncData, BMessage* lastMouseMove) { - if (IS_KEY_DOWN(keyMsg)) + if (IS_KEY_DOWN(keyMsg)) _GenerateMouseButtonEvent(false, keyMsg, outlist, lastMouseMove); return B_DISPATCH_MESSAGE; } @@ -400,7 +400,7 @@ MouseUpCommandActuator::Archive(BMessage* into, bool deep) const BArchivable* MouseUpCommandActuator ::Instantiate(BMessage* from) { - if (validate_instantiation(from, "MouseUpCommandActuator")) + if (validate_instantiation(from, "MouseUpCommandActuator")) return new MouseUpCommandActuator(from); else return NULL; @@ -437,16 +437,16 @@ MouseButtonCommandActuator::~MouseButtonCommandActuator() filter_result -MouseButtonCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, +MouseButtonCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, void** setAsyncData, BMessage* lastMouseMove) { if (IS_KEY_DOWN(keyMsg) != fKeyDown) { - _GenerateMouseButtonEvent(IS_KEY_DOWN(keyMsg), keyMsg, outlist, + _GenerateMouseButtonEvent(IS_KEY_DOWN(keyMsg), keyMsg, outlist, lastMouseMove); fKeyDown = IS_KEY_DOWN(keyMsg); return B_DISPATCH_MESSAGE; } else - // This will handle key-repeats, which we don't want turned into lots + // This will handle key-repeats, which we don't want turned into lots // of B_MOUSE_DOWN messages. return B_SKIP_MESSAGE; } @@ -462,7 +462,7 @@ MouseButtonCommandActuator::Archive(BMessage* into, bool deep) const BArchivable* MouseButtonCommandActuator ::Instantiate(BMessage* from) { - if (validate_instantiation(from, "MouseButtonCommandActuator")) + if (validate_instantiation(from, "MouseButtonCommandActuator")) return new MouseButtonCommandActuator(from); else return NULL; @@ -474,7 +474,7 @@ MouseButtonCommandActuator ::Instantiate(BMessage* from) // KeyStrokeSequenceCommandActuator // /////////////////////////////////////////////////////////////////////////////// -KeyStrokeSequenceCommandActuator::KeyStrokeSequenceCommandActuator(int32 argc, +KeyStrokeSequenceCommandActuator::KeyStrokeSequenceCommandActuator(int32 argc, char** argv) : CommandActuator(argc, argv) @@ -493,62 +493,62 @@ KeyStrokeSequenceCommandActuator::KeyStrokeSequenceCommandActuator(int32 argc, uint32 customKey= 0; int32 unicodeVal= 0; uint32 customMods = 0; - BString sub; + BString sub; fSequence.CopyInto(sub, nextStart + 2, nextEnd-(nextStart + 2)); sub.ToLower(); - + if ((sub.FindFirst('-') >= 0) || ((sub.Length() > 0) && ((sub.String()[0] < '0') || (sub.String()[0] > '9')))) { - + const char* s = sub.String(); while (*s == '-') s++;// go past any initial dashes bool lastWasDash = true; - while (*s) { + while (*s) { if (lastWasDash) { if (strncmp(s, "shift",5) == 0) customMods |=B_LEFT_SHIFT_KEY| B_SHIFT_KEY; - else if (strncmp(s, "leftsh", 6) == 0) + else if (strncmp(s, "leftsh", 6) == 0) customMods |=B_LEFT_SHIFT_KEY| B_SHIFT_KEY; - else if (strncmp(s, "rightsh",7) == 0) + else if (strncmp(s, "rightsh",7) == 0) customMods |=B_RIGHT_SHIFT_KEY | B_SHIFT_KEY; - else if (strncmp(s, "alt",3) == 0) + else if (strncmp(s, "alt",3) == 0) customMods |=B_LEFT_COMMAND_KEY| B_COMMAND_KEY; - else if (strncmp(s, "leftalt",7) == 0) + else if (strncmp(s, "leftalt",7) == 0) customMods |=B_LEFT_COMMAND_KEY| B_COMMAND_KEY; - else if (strncmp(s, "rightalt", 8) == 0) + else if (strncmp(s, "rightalt", 8) == 0) customMods |=B_RIGHT_COMMAND_KEY | B_COMMAND_KEY; - else if (strncmp(s, "com",3) == 0) + else if (strncmp(s, "com",3) == 0) customMods |=B_LEFT_COMMAND_KEY| B_COMMAND_KEY; - else if (strncmp(s, "leftcom",7) == 0) + else if (strncmp(s, "leftcom",7) == 0) customMods |=B_LEFT_COMMAND_KEY| B_COMMAND_KEY; - else if (strncmp(s, "rightcom", 8) == 0) + else if (strncmp(s, "rightcom", 8) == 0) customMods |=B_RIGHT_COMMAND_KEY | B_COMMAND_KEY; - else if (strncmp(s, "con",3) == 0) + else if (strncmp(s, "con",3) == 0) customMods |=B_LEFT_CONTROL_KEY| B_CONTROL_KEY; - else if (strncmp(s, "leftcon",7) == 0) + else if (strncmp(s, "leftcon",7) == 0) customMods |=B_LEFT_CONTROL_KEY| B_CONTROL_KEY; - else if (strncmp(s, "rightcon", 8) == 0) + else if (strncmp(s, "rightcon", 8) == 0) customMods |=B_RIGHT_CONTROL_KEY | B_CONTROL_KEY; - else if (strncmp(s, "win",3) == 0) + else if (strncmp(s, "win",3) == 0) customMods |=B_LEFT_OPTION_KEY | B_OPTION_KEY; - else if (strncmp(s, "leftwin",7) == 0) + else if (strncmp(s, "leftwin",7) == 0) customMods |=B_LEFT_OPTION_KEY | B_OPTION_KEY; - else if (strncmp(s, "rightwin", 8) == 0) + else if (strncmp(s, "rightwin", 8) == 0) customMods |=B_RIGHT_OPTION_KEY| B_OPTION_KEY; - else if (strncmp(s, "opt",3) == 0) + else if (strncmp(s, "opt",3) == 0) customMods |=B_LEFT_OPTION_KEY | B_OPTION_KEY; - else if (strncmp(s, "leftopt",7) == 0) + else if (strncmp(s, "leftopt",7) == 0) customMods |=B_LEFT_OPTION_KEY | B_OPTION_KEY; - else if (strncmp(s, "rightopt", 8) == 0) + else if (strncmp(s, "rightopt", 8) == 0) customMods |=B_RIGHT_OPTION_KEY| B_OPTION_KEY; - else if (strncmp(s, "menu", 4) == 0) + else if (strncmp(s, "menu", 4) == 0) customMods |=B_MENU_KEY; - else if (strncmp(s, "caps", 4) == 0) + else if (strncmp(s, "caps", 4) == 0) customMods |=B_CAPS_LOCK; - else if (strncmp(s, "scroll", 6) == 0) + else if (strncmp(s, "scroll", 6) == 0) customMods |=B_SCROLL_LOCK; - else if (strncmp(s, "num",3) == 0) + else if (strncmp(s, "num",3) == 0) customMods |=B_NUM_LOCK; else if (customKey == 0) { BString arg = s; @@ -561,7 +561,7 @@ KeyStrokeSequenceCommandActuator::KeyStrokeSequenceCommandActuator(int32 argc, if (key > 0) { customKey = key; - const char* u = GetKeyUTF8(key); + const char* u = GetKeyUTF8(key); //Parse the UTF8 back into an int32 switch(strlen(u)) { @@ -569,12 +569,12 @@ KeyStrokeSequenceCommandActuator::KeyStrokeSequenceCommandActuator(int32 argc, unicodeVal = ((uint32)(u[0]&0x7F)); break; case 2: - unicodeVal = ((uint32)(u[1]&0x3F)) | + unicodeVal = ((uint32)(u[1]&0x3F)) | (((uint32)(u[0]&0x1F)) << 6); break; case 3: - unicodeVal = ((uint32)(u[2]&0x3F)) | - (((uint32)(u[1]&0x3F)) << 6) | + unicodeVal = ((uint32)(u[2]&0x3F)) | + (((uint32)(u[1]&0x3F)) << 6) | (((uint32)(u[0]&0x0F)) << 12); break; default: unicodeVal = 0; @@ -610,7 +610,7 @@ KeyStrokeSequenceCommandActuator::KeyStrokeSequenceCommandActuator(int32 argc, fOverrideOffsets.AddItem((void*)newStr.Length()); fOverrideModifiers.AddItem((void*)customMods); fOverrideKeyCodes.AddItem((void*)customKey); - newStr.Append(((unicodeVal > 0) && (unicodeVal < 127)) ? + newStr.Append(((unicodeVal > 0) && (unicodeVal < 127)) ? ((char)unicodeVal): ' ',1); newStr.Append(&fSequence.String()[nextEnd + 2]); fSequence = newStr; @@ -628,26 +628,26 @@ KeyStrokeSequenceCommandActuator::KeyStrokeSequenceCommandActuator( { const char* seq; if (from->FindString("sequence", 0, &seq) == B_NO_ERROR) - fSequence = seq; + fSequence = seq; int32 temp; - for (int32 i = 0; from->FindInt32("ooffsets", i, &temp) == B_NO_ERROR; + for (int32 i = 0; from->FindInt32("ooffsets", i, &temp) == B_NO_ERROR; i++) { fOverrideOffsets.AddItem((void*)temp); - if (from->FindInt32("overrides", i, &temp) != B_NO_ERROR) + if (from->FindInt32("overrides", i, &temp) != B_NO_ERROR) temp = ' '; - + fOverrides.AddItem((void*)temp); if (from->FindInt32("omods", i, &temp) != B_NO_ERROR) temp = -1; - + fOverrideModifiers.AddItem((void*)temp); if (from->FindInt32("okeys", i, &temp) != B_NO_ERROR) temp = 0; - + fOverrideKeyCodes.AddItem((void*)temp); } _GenerateKeyCodes(); @@ -689,48 +689,48 @@ KeyStrokeSequenceCommandActuator::_GenerateKeyCodes() uint8* states = &fStates[i * 16]; int32& mod = fModCodes[i]; if (overrideKey == 0) { - // Gotta do reverse-lookups to find out the raw keycodes for a + // Gotta do reverse-lookups to find out the raw keycodes for a // given character. Expensive--there oughtta be a better way to do // this. char next = fSequence.ByteAt(i); int32 key = _LookupKeyCode(map, keys, map->normal_map, next, states , mod, 0); - if (key < 0) - key = _LookupKeyCode(map, keys, map->shift_map, next, states, + if (key < 0) + key = _LookupKeyCode(map, keys, map->shift_map, next, states, mod, B_LEFT_SHIFT_KEY | B_SHIFT_KEY); - if (key < 0) - key = _LookupKeyCode(map, keys, map->caps_map, next, states, + if (key < 0) + key = _LookupKeyCode(map, keys, map->caps_map, next, states, mod, B_CAPS_LOCK); - if (key < 0) - key = _LookupKeyCode(map, keys, map->caps_shift_map, next, - states, mod, B_LEFT_SHIFT_KEY | B_SHIFT_KEY + if (key < 0) + key = _LookupKeyCode(map, keys, map->caps_shift_map, next, + states, mod, B_LEFT_SHIFT_KEY | B_SHIFT_KEY | B_CAPS_LOCK); - if (key < 0) - key = _LookupKeyCode(map, keys, map->option_map, next, states, + if (key < 0) + key = _LookupKeyCode(map, keys, map->option_map, next, states, mod, B_LEFT_OPTION_KEY | B_OPTION_KEY); - if (key < 0) - key = _LookupKeyCode(map, keys, map->option_shift_map, next, - states, mod, B_LEFT_OPTION_KEY | B_OPTION_KEY + if (key < 0) + key = _LookupKeyCode(map, keys, map->option_shift_map, next, + states, mod, B_LEFT_OPTION_KEY | B_OPTION_KEY | B_LEFT_SHIFT_KEY | B_SHIFT_KEY); - if (key < 0) - key = _LookupKeyCode(map, keys, map->option_caps_map, next, - states, mod, B_LEFT_OPTION_KEY | B_OPTION_KEY + if (key < 0) + key = _LookupKeyCode(map, keys, map->option_caps_map, next, + states, mod, B_LEFT_OPTION_KEY | B_OPTION_KEY | B_CAPS_LOCK); - if (key < 0) - key = _LookupKeyCode(map, keys, map->option_caps_shift_map, + if (key < 0) + key = _LookupKeyCode(map, keys, map->option_caps_shift_map, next, states, mod, B_LEFT_OPTION_KEY | B_OPTION_KEY | B_CAPS_LOCK | B_LEFT_SHIFT_KEY | B_SHIFT_KEY); - if (key < 0) + if (key < 0) key = _LookupKeyCode(map, keys, map->control_map, next, states, mod, B_CONTROL_KEY); - + fKeyCodes[i] = (key >= 0) ? key : 0; } @@ -754,45 +754,45 @@ KeyStrokeSequenceCommandActuator::_GenerateKeyCodes() // And then set any bits that were specified in our override. if (mod & B_CAPS_LOCK) _SetStateBit(states, map->caps_key); - - if (mod & B_SCROLL_LOCK) + + if (mod & B_SCROLL_LOCK) _SetStateBit(states, map->scroll_key); - + if (mod & B_NUM_LOCK) _SetStateBit(states, map->num_key); - + if (mod & B_MENU_KEY) _SetStateBit(states, map->menu_key); - + if (mod & B_LEFT_SHIFT_KEY) _SetStateBit(states, map->left_shift_key); - - if (mod & B_RIGHT_SHIFT_KEY) + + if (mod & B_RIGHT_SHIFT_KEY) _SetStateBit(states, map->right_shift_key); - + if (mod & B_LEFT_COMMAND_KEY) _SetStateBit(states, map->left_command_key); - - if (mod & B_RIGHT_COMMAND_KEY) + + if (mod & B_RIGHT_COMMAND_KEY) _SetStateBit(states, map->right_command_key); - + if (mod & B_LEFT_CONTROL_KEY) _SetStateBit(states, map->left_control_key); - - if (mod & B_RIGHT_CONTROL_KEY) + + if (mod & B_RIGHT_CONTROL_KEY) _SetStateBit(states, map->right_control_key); - - if (mod & B_LEFT_OPTION_KEY) + + if (mod & B_LEFT_OPTION_KEY) _SetStateBit(states, map->left_option_key); - + if (mod & B_RIGHT_OPTION_KEY) _SetStateBit(states, map->right_option_key); } if (overrideKey > 0) { - if (overrideKey > 127) + if (overrideKey > 127) overrideKey = 0;// invalid value!? - + fKeyCodes[i] = overrideKey; _SetStateBit(states, overrideKey); } @@ -801,26 +801,26 @@ KeyStrokeSequenceCommandActuator::_GenerateKeyCodes() int32 -KeyStrokeSequenceCommandActuator::_LookupKeyCode(key_map* map, char* keys, +KeyStrokeSequenceCommandActuator::_LookupKeyCode(key_map* map, char* keys, int32 offsets[128], char c, uint8* setStates, int32& setMod, int32 setTo) const { for (int i = 0; i < 128; i++) { if (keys[offsets[i]+ 1] == c) { _SetStateBit(setStates, i); - + if (setTo & B_SHIFT_KEY) _SetStateBit(setStates, map->left_shift_key); - + if (setTo & B_OPTION_KEY) _SetStateBit(setStates, map->left_option_key); - + if (setTo & B_CONTROL_KEY) _SetStateBit(setStates, map->left_control_key); - + if (setTo & B_CAPS_LOCK) _SetStateBit(setStates, map->caps_key); - + setMod = setTo; return i; } @@ -830,12 +830,12 @@ KeyStrokeSequenceCommandActuator::_LookupKeyCode(key_map* map, char* keys, void -KeyStrokeSequenceCommandActuator::_SetStateBit(uint8* setStates, uint32 key, +KeyStrokeSequenceCommandActuator::_SetStateBit(uint8* setStates, uint32 key, bool on) const { if (on) setStates[key / 8] |= (0x80 >> (key%8)); - else + else setStates[key / 8] &= ~(0x80 >> (key%8)); } @@ -851,18 +851,18 @@ KeyStrokeSequenceCommandActuator::Archive(BMessage* into, bool deep) const ret = into->AddInt32("ooffsets", (int32)fOverrideOffsets.ItemAt(i)); if (ret != B_NO_ERROR) tmp = B_ERROR; - + ret = into->AddInt32("overrides", (int32)fOverrides.ItemAt(i)); - if (ret != B_NO_ERROR) + if (ret != B_NO_ERROR) tmp = B_ERROR; - + ret = into->AddInt32("omods", (int32)fOverrideModifiers.ItemAt(i)); if (ret != B_NO_ERROR) tmp = B_ERROR; - + ret = into->AddInt32("okeys", (int32)fOverrideKeyCodes.ItemAt(i)); } - + if (tmp == B_ERROR) return tmp; else @@ -871,7 +871,7 @@ KeyStrokeSequenceCommandActuator::Archive(BMessage* into, bool deep) const filter_result -KeyStrokeSequenceCommandActuator::KeyEvent(const BMessage* keyMsg, +KeyStrokeSequenceCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, void** setAsyncData, BMessage* lastMouseMove) { if (IS_KEY_DOWN(keyMsg)) { @@ -879,15 +879,15 @@ KeyStrokeSequenceCommandActuator::KeyEvent(const BMessage* keyMsg, int numChars = fSequence.Length(); for (int i = 0; i < numChars; i++) { char nextChar = fSequence.ByteAt(i); - + temp.RemoveName("modifiers"); temp.AddInt32("modifiers", fModCodes[i]); temp.RemoveName("key"); - temp.AddInt32("key", fKeyCodes[i]); + temp.AddInt32("key", fKeyCodes[i]); temp.RemoveName("raw_char"); temp.AddInt32("raw_char", (int32) nextChar); temp.RemoveName("byte"); - + int32 override = -1; for (int32 j = fOverrideOffsets.CountItems()-1; j >= 0; j--) { int32 offset = (int32) fOverrideOffsets.ItemAt(j); @@ -921,7 +921,7 @@ KeyStrokeSequenceCommandActuator::KeyEvent(const BMessage* keyMsg, } temp.RemoveName("byte"); - + for (int m = 0; t[m] != 0x00; m++) temp.AddInt8("byte", t[m]); @@ -944,7 +944,7 @@ KeyStrokeSequenceCommandActuator::KeyEvent(const BMessage* keyMsg, BArchivable* KeyStrokeSequenceCommandActuator::Instantiate(BMessage* from) { - if (validate_instantiation(from, "KeyStrokeSequenceCommandActuator")) + if (validate_instantiation(from, "KeyStrokeSequenceCommandActuator")) return new KeyStrokeSequenceCommandActuator(from); else return NULL; @@ -958,7 +958,7 @@ KeyStrokeSequenceCommandActuator::Instantiate(BMessage* from) /////////////////////////////////////////////////////////////////////////////// MIMEHandlerCommandActuator::MIMEHandlerCommandActuator(int32 argc, char** argv) : - CommandActuator(argc, argv), + CommandActuator(argc, argv), fMimeType((argc > 1) ? argv[1] : "") { // empty @@ -971,7 +971,7 @@ MIMEHandlerCommandActuator::MIMEHandlerCommandActuator(BMessage* from) { const char* temp; if (from->FindString("mimeType", 0, &temp) == B_NO_ERROR) - fMimeType = temp; + fMimeType = temp; } @@ -991,7 +991,7 @@ MIMEHandlerCommandActuator::Archive(BMessage* into, bool deep) const filter_result -MIMEHandlerCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, +MIMEHandlerCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, void** setAsyncData, BMessage* lastMouseMove) { if (IS_KEY_DOWN(keyMsg)) @@ -1001,19 +1001,19 @@ MIMEHandlerCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, } -void -MIMEHandlerCommandActuator::KeyEventAsync(const BMessage* keyMsg, +void +MIMEHandlerCommandActuator::KeyEventAsync(const BMessage* keyMsg, void* asyncData) { if (be_roster) { BString str; - BString str1("Shortcuts MIME Launcher Error"); + BString str1("Shortcuts MIME launcher error"); status_t ret = be_roster->Launch(fMimeType.String()); if ((ret != B_NO_ERROR) && (ret != B_ALREADY_RUNNING)) { str << "Can't launch handler for "; - str << ", no such MIME type exists.Please check your Shortcuts"; - str << " settings. Please check your Shortcuts settings."; - (new BAlert(str1.String(), str.String(), "Ok"))->Go(NULL); + str << ", no such MIME type exists. Please check your Shortcuts"; + str << " settings."; + (new BAlert(str1.String(), str.String(), "OK"))->Go(NULL); } } } @@ -1021,7 +1021,7 @@ MIMEHandlerCommandActuator::KeyEventAsync(const BMessage* keyMsg, BArchivable* MIMEHandlerCommandActuator ::Instantiate(BMessage* from) { - if (validate_instantiation(from, "MIMEHandlerCommandActuator")) + if (validate_instantiation(from, "MIMEHandlerCommandActuator")) return new MIMEHandlerCommandActuator(from); else return NULL; @@ -1065,7 +1065,7 @@ BeepCommandActuator::Archive(BMessage* into, bool deep) const BArchivable* BeepCommandActuator ::Instantiate(BMessage* from) { - if (validate_instantiation(from, "BeepCommandActuator")) + if (validate_instantiation(from, "BeepCommandActuator")) return new BeepCommandActuator(from); else return NULL; @@ -1073,12 +1073,12 @@ BeepCommandActuator ::Instantiate(BMessage* from) filter_result -BeepCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, +BeepCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, void** setAsyncData, BMessage* lastMouseMove) { if (IS_KEY_DOWN(keyMsg)) beep(); - + return B_SKIP_MESSAGE; } @@ -1097,7 +1097,7 @@ MultiCommandActuator::MultiCommandActuator(BMessage* from) BArchivable* subObj = instantiate_object(&msg); if (subObj) { CommandActuator* ca = dynamic_cast < CommandActuator*>(subObj); - + if (ca) fSubActuators.AddItem(ca); else @@ -1113,7 +1113,7 @@ MultiCommandActuator::MultiCommandActuator(int32 argc, char** argv) { for (int i = 1; i < argc; i++) { CommandActuator* sub = CreateCommandActuator(argv[i]); - + if (sub) fSubActuators.AddItem(sub); else @@ -1136,15 +1136,15 @@ MultiCommandActuator::Archive(BMessage* into, bool deep) const status_t ret = CommandActuator::Archive(into, deep); if (ret != B_NO_ERROR) return ret; - + int numSubs = fSubActuators.CountItems(); for (int i = 0; i < numSubs; i++) { BMessage msg; ret = ((CommandActuator*)fSubActuators.ItemAt(i))->Archive(&msg, deep); - + if (ret != B_NO_ERROR) return ret; - + into->AddMessage("subs", &msg); } return B_NO_ERROR; @@ -1154,7 +1154,7 @@ MultiCommandActuator::Archive(BMessage* into, bool deep) const BArchivable* MultiCommandActuator ::Instantiate(BMessage* from) { - if (validate_instantiation(from, "MultiCommandActuator")) + if (validate_instantiation(from, "MultiCommandActuator")) return new MultiCommandActuator(from); else return NULL; @@ -1162,7 +1162,7 @@ MultiCommandActuator ::Instantiate(BMessage* from) filter_result -MultiCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, +MultiCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, void** asyncData, BMessage* lastMouseMove) { BList* aDataList = NULL; // demand-allocated @@ -1172,15 +1172,15 @@ MultiCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, void* aData = NULL; status_t next = ((CommandActuator*)fSubActuators.ItemAt(i))-> KeyEvent(keyMsg, outlist, &aData, lastMouseMove); - - if (next == B_DISPATCH_MESSAGE) + + if (next == B_DISPATCH_MESSAGE) // dispatch message if at least one sub wants it dispatched res = B_DISPATCH_MESSAGE; - + if (aData) { if (aDataList == NULL) *asyncData = aDataList = new BList; - + while (aDataList->CountItems() < i - 1) aDataList->AddItem(NULL); aDataList->AddItem(aData); @@ -1197,7 +1197,7 @@ MultiCommandActuator::KeyEventAsync(const BMessage* keyUpMsg, void* asyncData) int numSubs = list->CountItems(); for (int i = 0; i < numSubs; i++) { void* aData = list->ItemAt(i); - if (aData) + if (aData) ((CommandActuator*) fSubActuators.ItemAt(i))-> KeyEventAsync(keyUpMsg, aData); } @@ -1214,32 +1214,32 @@ MoveMouseCommandActuator::MoveMouseCommandActuator(BMessage* from) : CommandActuator(from) { - if (from->FindFloat("xPercent", &fXPercent) != B_NO_ERROR) + if (from->FindFloat("xPercent", &fXPercent) != B_NO_ERROR) fXPercent = 0.0f; - if (from->FindFloat("yPercent", &fYPercent) != B_NO_ERROR) + if (from->FindFloat("yPercent", &fYPercent) != B_NO_ERROR) fYPercent = 0.0f; - if (from->FindFloat("xPixels", &fXPixels) != B_NO_ERROR) + if (from->FindFloat("xPixels", &fXPixels) != B_NO_ERROR) fXPixels = 0; - if (from->FindFloat("yPixels", &fYPixels) != B_NO_ERROR) + if (from->FindFloat("yPixels", &fYPixels) != B_NO_ERROR) fYPixels = 0; } MoveMouseCommandActuator::MoveMouseCommandActuator(int32 argc, char** argv) : - CommandActuator(argc, argv), - fXPercent(0.0f), - fYPercent(0.0f), - fXPixels(0), + CommandActuator(argc, argv), + fXPercent(0.0f), + fYPercent(0.0f), + fXPixels(0), fYPixels(0) { - if (argc > 1) + if (argc > 1) _ParseArg(argv[1], fXPercent, fXPixels); - - if (argc > 2) + + if (argc > 2) _ParseArg(argv[2], fYPercent, fYPixels); } @@ -1250,7 +1250,7 @@ MoveMouseCommandActuator::~MoveMouseCommandActuator() } -status_t +status_t MoveMouseCommandActuator::Archive(BMessage* into, bool deep) const { status_t ret = CommandActuator::Archive(into, deep); @@ -1273,7 +1273,7 @@ MoveMouseCommandActuator::CalculateCoords(float& setX, float& setY) const BMessage* -MoveMouseCommandActuator::CreateMouseMovedMessage(const BMessage* origMsg, +MoveMouseCommandActuator::CreateMouseMovedMessage(const BMessage* origMsg, BPoint p, BList* outlist) const { // Force p into the screen space @@ -1288,24 +1288,24 @@ MoveMouseCommandActuator::CreateMouseMovedMessage(const BMessage* origMsg, int32 buttons = 0; (void)origMsg->FindInt32("buttons", &buttons); - + if (buttons == 0) buttons = 1; - + newMsg->AddInt32("buttons", buttons); - + // Trey sez you gotta keep then "when"'s increasing if you want click&drag // to work! const BMessage* lastMessage; int nr = outlist->CountItems() - 1; - + if (outlist->CountItems() > 0) lastMessage = (const BMessage*)outlist->ItemAt(nr); else lastMessage = origMsg; - + int64 when; - + if (lastMessage->FindInt64("when", &when) == B_NO_ERROR) { when++; newMsg->RemoveName("when"); @@ -1324,12 +1324,12 @@ static bool IsNumeric(char c) // Parse a string of the form "10", "10%", "10+ 10%", or "10%+ 10" void -MoveMouseCommandActuator::_ParseArg(const char* arg, float& setPercent, +MoveMouseCommandActuator::_ParseArg(const char* arg, float& setPercent, float& setPixels) const { char* temp = new char[strlen(arg) + 1]; strcpy(temp, arg); - + // Find the percent part, if any char* percent = strchr(temp, '%'); if (percent) { @@ -1337,7 +1337,7 @@ MoveMouseCommandActuator::_ParseArg(const char* arg, float& setPercent, char* beginNum = percent - 1; while (beginNum >= temp) { char c = *beginNum; - if (IsNumeric(c)) + if (IsNumeric(c)) beginNum--; else break; @@ -1350,7 +1350,7 @@ MoveMouseCommandActuator::_ParseArg(const char* arg, float& setPercent, while (beginNum <= percent) *(beginNum++) = ' '; } - + // Find the pixel part, if any char* pixel = temp; while (!IsNumeric(*pixel)) { @@ -1400,7 +1400,7 @@ MoveMouseToCommandActuator::Archive(BMessage* into, bool deep) const BArchivable* MoveMouseToCommandActuator ::Instantiate(BMessage* from) { - if (validate_instantiation(from, "MoveMouseToCommandActuator")) + if (validate_instantiation(from, "MoveMouseToCommandActuator")) return new MoveMouseToCommandActuator(from); else return NULL; @@ -1408,7 +1408,7 @@ MoveMouseToCommandActuator ::Instantiate(BMessage* from) filter_result -MoveMouseToCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, +MoveMouseToCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, void** setAsyncData, BMessage* lastMouseMove) { if (IS_KEY_DOWN(keyMsg)) { @@ -1461,7 +1461,7 @@ status_t MoveMouseByCommandActuator::Archive(BMessage* into, bool deep) const BArchivable* MoveMouseByCommandActuator ::Instantiate(BMessage* from) { - if (validate_instantiation(from, "MoveMouseByCommandActuator")) + if (validate_instantiation(from, "MoveMouseByCommandActuator")) return new MoveMouseByCommandActuator(from); else return NULL; @@ -1469,7 +1469,7 @@ MoveMouseByCommandActuator ::Instantiate(BMessage* from) filter_result -MoveMouseByCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, +MoveMouseByCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, void** setAsyncData, BMessage* lastMouseMove) { if (IS_KEY_DOWN(keyMsg)) { @@ -1508,11 +1508,11 @@ SendMessageCommandActuator::SendMessageCommandActuator(int32 argc, char** argv) if (argc > 2) { const char* whatStr = argv[2]; - if ((whatStr[0] == '\'') - && (strlen(whatStr) == 6) + if ((whatStr[0] == '\'') + && (strlen(whatStr) == 6) && (whatStr[5] == '\'')) { // Translate the characters into the uint32 they stand for. - // Note that we must do this in a byte-endian-independant fashion + // Note that we must do this in a byte-endian-independant fashion // (no casting!) fSendMsg.what = 0; uint32 mult = 1; @@ -1520,10 +1520,10 @@ SendMessageCommandActuator::SendMessageCommandActuator(int32 argc, char** argv) fSendMsg.what += ((uint32)(whatStr[4 - i]))* mult; mult <<= 8; } - } else if (strncmp(whatStr, "0x", 2) == 0) + } else if (strncmp(whatStr, "0x", 2) == 0) // translate hex string to decimal fSendMsg.what = strtoul(&whatStr[2], NULL, 16); - else + else fSendMsg.what = atoi(whatStr); } else fSendMsg.what = 0; @@ -1534,40 +1534,40 @@ SendMessageCommandActuator::SendMessageCommandActuator(int32 argc, char** argv) BString argStr(arg); const char* equals = strchr(arg, ' = '); const char* value = "true";// default if no value is present - + if (equals) { tc = B_STRING_TYPE;// default type when value is present value = equals + 1; const char* colon = strchr(arg, ':'); - if (colon > equals) + if (colon > equals) colon = NULL;// colons after the equals sign don't count - + if (colon) { - const char* typeStr = colon + 1; + const char* typeStr = colon + 1; if (strncasecmp(typeStr, "string", 6) == 0) tc = B_STRING_TYPE; else if (strncasecmp(typeStr, "int8", 4) == 0) tc = B_INT8_TYPE; - else if (strncasecmp(typeStr, "int16", 5) == 0) + else if (strncasecmp(typeStr, "int16", 5) == 0) tc = B_INT16_TYPE; - else if (strncasecmp(typeStr, "int32", 5) == 0) + else if (strncasecmp(typeStr, "int32", 5) == 0) tc = B_INT32_TYPE; - else if (strncasecmp(typeStr, "int64", 5) == 0) + else if (strncasecmp(typeStr, "int64", 5) == 0) tc = B_INT64_TYPE; - else if (strncasecmp(typeStr, "bool", 4) == 0) + else if (strncasecmp(typeStr, "bool", 4) == 0) tc = B_BOOL_TYPE; - else if (strncasecmp(typeStr, "float", 5) == 0) + else if (strncasecmp(typeStr, "float", 5) == 0) tc = B_FLOAT_TYPE; - else if (strncasecmp(typeStr, "double", 6) == 0) + else if (strncasecmp(typeStr, "double", 6) == 0) tc = B_DOUBLE_TYPE; - else if (strncasecmp(typeStr, "point", 5) == 0) + else if (strncasecmp(typeStr, "point", 5) == 0) tc = B_POINT_TYPE; - else if (strncasecmp(typeStr, "rect", 4) == 0) + else if (strncasecmp(typeStr, "rect", 4) == 0) tc = B_RECT_TYPE; - + // remove the colon and stuff argStr = argStr.Truncate(colon - arg); - } else + } else // remove the equals and arg argStr = argStr.Truncate(equals - arg); } @@ -1576,50 +1576,50 @@ SendMessageCommandActuator::SendMessageCommandActuator(int32 argc, char** argv) case B_STRING_TYPE: fSendMsg.AddString(argStr.String(), value); break; - - case B_INT8_TYPE: + + case B_INT8_TYPE: fSendMsg.AddInt8(argStr.String(), (int8)atoi(value)); break; - + case B_INT16_TYPE: - fSendMsg.AddInt16(argStr.String(), (int16)atoi(value)); + fSendMsg.AddInt16(argStr.String(), (int16)atoi(value)); break; - + case B_INT32_TYPE: fSendMsg.AddInt32(argStr.String(), (int32)atoi(value)); break; - + case B_INT64_TYPE: fSendMsg.AddInt64(argStr.String(), (int64)atoi(value)); break; - + case B_BOOL_TYPE: - fSendMsg.AddBool(argStr.String(), ((value[0] == 't') + fSendMsg.AddBool(argStr.String(), ((value[0] == 't') || (value[0] == 'T'))); break; - + case B_FLOAT_TYPE: fSendMsg.AddFloat(argStr.String(), atof(value)); break; - + case B_DOUBLE_TYPE: fSendMsg.AddDouble(argStr.String(), (double)atof(value)); break; - - case B_POINT_TYPE: + + case B_POINT_TYPE: { float pts[2] = {0.0f, 0.0f}; _ParseFloatArgs(pts, 2, value); - fSendMsg.AddPoint(argStr.String(), BPoint(pts[0], pts[1])); + fSendMsg.AddPoint(argStr.String(), BPoint(pts[0], pts[1])); break; } - - case B_RECT_TYPE: + + case B_RECT_TYPE: { float pts[4] = {0.0f, 0.0f, 0.0f, 0.0f}; _ParseFloatArgs(pts, 4, value); - fSendMsg.AddRect(argStr.String(), - BRect(pts[0], pts[1], pts[2], pts[3])); + fSendMsg.AddRect(argStr.String(), + BRect(pts[0], pts[1], pts[2], pts[3])); break; } } @@ -1628,7 +1628,7 @@ SendMessageCommandActuator::SendMessageCommandActuator(int32 argc, char** argv) void -SendMessageCommandActuator::_ParseFloatArgs(float* args, int maxArgs, +SendMessageCommandActuator::_ParseFloatArgs(float* args, int maxArgs, const char* str) const { const char* next = str; @@ -1646,10 +1646,10 @@ SendMessageCommandActuator::SendMessageCommandActuator(BMessage* from) CommandActuator(from) { const char* temp; - + if (from->FindString("signature", 0, &temp) == B_NO_ERROR) fSignature = temp; - + (void) from->FindMessage("sendmsg", &fSendMsg); } @@ -1671,31 +1671,31 @@ SendMessageCommandActuator::Archive(BMessage* into, bool deep) const filter_result -SendMessageCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, +SendMessageCommandActuator::KeyEvent(const BMessage* keyMsg, BList* outlist, void** setAsyncData, BMessage* lastMouseMove) { if (IS_KEY_DOWN(keyMsg)) // cause KeyEventAsync() to be called asynchronously *setAsyncData = (void*) true; - + return B_SKIP_MESSAGE; } void -SendMessageCommandActuator::KeyEventAsync(const BMessage* keyMsg, +SendMessageCommandActuator::KeyEventAsync(const BMessage* keyMsg, void* asyncData) { if (be_roster) { BString str; - BString str1("Shortcuts SendMessage Error"); + BString str1("Shortcuts SendMessage error"); if (fSignature.Length() == 0) { - str << "SendMessage: Target App Signature not specified"; - (new BAlert(str1.String(), str.String(), "Ok"))->Go(NULL); + str << "SendMessage: Target application signature not specified"; + (new BAlert(str1.String(), str.String(), "OK"))->Go(NULL); } else { status_t error = B_OK; BMessenger msngr(fSignature.String(), -1, &error); - + if (error == B_OK) msngr.SendMessage(&fSendMsg); } @@ -1706,7 +1706,7 @@ SendMessageCommandActuator::KeyEventAsync(const BMessage* keyMsg, BArchivable* SendMessageCommandActuator ::Instantiate(BMessage* from) { - if (validate_instantiation(from, "SendMessageCommandActuator")) + if (validate_instantiation(from, "SendMessageCommandActuator")) return new SendMessageCommandActuator(from); else return NULL; diff --git a/src/add-ons/input_server/methods/pen/PenInputServerMethod.cpp b/src/add-ons/input_server/methods/pen/PenInputServerMethod.cpp index ccdc373b67..d47b21c7ba 100644 --- a/src/add-ons/input_server/methods/pen/PenInputServerMethod.cpp +++ b/src/add-ons/input_server/methods/pen/PenInputServerMethod.cpp @@ -51,7 +51,7 @@ PenInputServerMethod::PenInputServerMethod() PRINT(("%s\n", __FUNCTION__)); #if DEBUG //fDebugFile.SetTo("/tmp/PenInputMethodMessages.txt", B_READ_WRITE|B_CREATE_FILE); - fDebugAlert = new BAlert("PenInput Debug", "Plip \n\n\n\n\n\n\n\n\n\n\n\n\n", "Ok"); + fDebugAlert = new BAlert("PenInput Debug", "Plip \n\n\n\n\n\n\n\n\n\n\n\n\n", "OK"); fDebugAlert->SetLook(B_TITLED_WINDOW_LOOK); fDebugAlert->TextView()->MakeSelectable(); fDebugAlert->TextView()->SelectAll(); diff --git a/src/add-ons/input_server/methods/pen/RestartInputServer.sh b/src/add-ons/input_server/methods/pen/RestartInputServer.sh index b9f71d71cf..084b1afc27 100755 --- a/src/add-ons/input_server/methods/pen/RestartInputServer.sh +++ b/src/add-ons/input_server/methods/pen/RestartInputServer.sh @@ -6,7 +6,7 @@ tagfile=/tmp/dokillinputserver tmout=$((30)) touch $tagfile -(alert "All is fine" "Ok"; rm $tagfile) & +(alert "All is fine." "OK"; rm $tagfile) & sleep $tmout diff --git a/src/add-ons/input_server/methods/t9/DictionaryInputServerMethod.cpp b/src/add-ons/input_server/methods/t9/DictionaryInputServerMethod.cpp index 39581f0afd..f6a75ee727 100644 --- a/src/add-ons/input_server/methods/t9/DictionaryInputServerMethod.cpp +++ b/src/add-ons/input_server/methods/t9/DictionaryInputServerMethod.cpp @@ -94,16 +94,16 @@ T9InputServerMethod::T9InputServerMethod() BMessage *msg = new BMessage('SetM'); msg->AddInt32("t9mode", WordMode); BMenuItem *item; - item = new BMenuItem(_T("Word Mode"), msg); + item = new BMenuItem(_T("Word mode"), msg); item->SetMarked(true); fDeskbarMenu->AddItem(item); msg = new BMessage('SetM'); msg->AddInt32("t9mode", CharMode); - item = new BMenuItem(_T("Character Mode"), msg); + item = new BMenuItem(_T("Character mode"), msg); fDeskbarMenu->AddItem(item); msg = new BMessage('SetM'); msg->AddInt32("t9mode", NumMode); - item = new BMenuItem(_T("Numeric Mode"), msg); + item = new BMenuItem(_T("Numeric mode"), msg); fDeskbarMenu->AddItem(item); fDeskbarMenu->SetFont(be_plain_font); // doesn't seem to work here @@ -177,7 +177,7 @@ void T9InputServerMethod::MessageReceived(BMessage *message) s << (long) fDeskbarMenu->FindMarked(); s << " - "; s << (long) fDeskbarMenu->ItemAt(v); - BAlert *a = new BAlert("Plop", s.String(), "Ok"); + BAlert *a = new BAlert("Plop", s.String(), "OK"); a->Go(NULL); }*/ break; diff --git a/src/add-ons/input_server/methods/t9/T9InputServerMethod.cpp b/src/add-ons/input_server/methods/t9/T9InputServerMethod.cpp index 39a481aa3e..4552baa039 100644 --- a/src/add-ons/input_server/methods/t9/T9InputServerMethod.cpp +++ b/src/add-ons/input_server/methods/t9/T9InputServerMethod.cpp @@ -94,16 +94,16 @@ T9InputServerMethod::T9InputServerMethod() BMessage *msg = new BMessage('SetM'); msg->AddInt32("t9mode", WordMode); BMenuItem *item; - item = new BMenuItem(_T("Word Mode"), msg); + item = new BMenuItem(_T("Word mode"), msg); item->SetMarked(true); fDeskbarMenu->AddItem(item); msg = new BMessage('SetM'); msg->AddInt32("t9mode", CharMode); - item = new BMenuItem(_T("Character Mode"), msg); + item = new BMenuItem(_T("Character mode"), msg); fDeskbarMenu->AddItem(item); msg = new BMessage('SetM'); msg->AddInt32("t9mode", NumMode); - item = new BMenuItem(_T("Numeric Mode"), msg); + item = new BMenuItem(_T("Numeric mode"), msg); fDeskbarMenu->AddItem(item); fDeskbarMenu->SetFont(be_plain_font); // doesn't seem to work here @@ -177,7 +177,7 @@ void T9InputServerMethod::MessageReceived(BMessage *message) s << (long) fDeskbarMenu->FindMarked(); s << " - "; s << (long) fDeskbarMenu->ItemAt(v); - BAlert *a = new BAlert("Plop", s.String(), "Ok"); + BAlert *a = new BAlert("Plop", s.String(), "OK"); a->Go(NULL); }*/ break; diff --git a/src/add-ons/mail_daemon/inbound_filters/match_header/ConfigView.cpp b/src/add-ons/mail_daemon/inbound_filters/match_header/ConfigView.cpp index b924729753..1526264893 100644 --- a/src/add-ons/mail_daemon/inbound_filters/match_header/ConfigView.cpp +++ b/src/add-ons/mail_daemon/inbound_filters/match_header/ConfigView.cpp @@ -49,20 +49,20 @@ RuleFilterConfig::RuleFilterConfig(BMessage *settings) : BView(BRect(0,0,260,85) if (settings->HasString("attribute")) attr->SetText(settings->FindString("attribute")); AddChild(attr); - + regex = new BTextControl(BRect(104,5,255,20),"attr",MDR_DIALECT_CHOICE (" has "," が "),MDR_DIALECT_CHOICE ("value (use REGEX: in from of regular expressions like *spam*)","値(正規表現対応)"),NULL); regex->SetDivider(be_plain_font->StringWidth(MDR_DIALECT_CHOICE (" has "," が ")) + 4); if (settings->HasString("regex")) regex->SetText(settings->FindString("regex")); AddChild(regex); - - arg = new BFileControl(BRect(5,55,255,80),"arg",NULL,MDR_DIALECT_CHOICE ("this field is based on the Action","ここは動作によって意味が変わります")); + + arg = new BFileControl(BRect(5,55,255,80),"arg",NULL,MDR_DIALECT_CHOICE ("this field is based on the action","ここは動作によって意味が変わります")); if (BControl *control = (BControl *)arg->FindView("select_file")) control->SetEnabled(false); if (settings->HasString("argument")) arg->SetText(settings->FindString("argument")); - - outbound = new BPopUpMenu(MDR_DIALECT_CHOICE ("","<アカウントを選択>")); + + outbound = new BPopUpMenu(MDR_DIALECT_CHOICE ("","<アカウントを選択>")); BList list; GetOutboundMailChains(&list); if (settings->HasInt32("do_what")) @@ -81,27 +81,27 @@ RuleFilterConfig::RuleFilterConfig(BMessage *settings) : BView(BRect(0,0,260,85) item->SetMarked(true); delete (BMailChain *)(list.ItemAt(i)); } - + } - + void RuleFilterConfig::AttachedToWindow() { if (menu != NULL) return; // We switched back from another tab - - menu = new BPopUpMenu(MDR_DIALECT_CHOICE ("","<動作を選択>")); - menu->AddItem(new BMenuItem(MDR_DIALECT_CHOICE ("Move To","移動する"), new BMessage(kMsgActionMoveTo))); - menu->AddItem(new BMenuItem(MDR_DIALECT_CHOICE ("Set Flags To","フラグを指定する"), new BMessage(kMsgActionSetTo))); - menu->AddItem(new BMenuItem(MDR_DIALECT_CHOICE ("Delete Message","削除する"), new BMessage(kMsgActionDelete))); - menu->AddItem(new BMenuItem(MDR_DIALECT_CHOICE ("Reply With","返事を書く"), new BMessage(kMsgActionReplyWith))); - menu->AddItem(new BMenuItem(MDR_DIALECT_CHOICE ("Set As Read","既読にする"), new BMessage(kMsgActionSetRead))); + + menu = new BPopUpMenu(MDR_DIALECT_CHOICE ("","<動作を選択>")); + menu->AddItem(new BMenuItem(MDR_DIALECT_CHOICE ("Move to","移動する"), new BMessage(kMsgActionMoveTo))); + menu->AddItem(new BMenuItem(MDR_DIALECT_CHOICE ("Set flags to","フラグを指定する"), new BMessage(kMsgActionSetTo))); + menu->AddItem(new BMenuItem(MDR_DIALECT_CHOICE ("Delete message","削除する"), new BMessage(kMsgActionDelete))); + menu->AddItem(new BMenuItem(MDR_DIALECT_CHOICE ("Reply with","返事を書く"), new BMessage(kMsgActionReplyWith))); + menu->AddItem(new BMenuItem(MDR_DIALECT_CHOICE ("Set as read","既読にする"), new BMessage(kMsgActionSetRead))); menu->SetTargetForItems(this); BMenuField *field = new BMenuField(BRect(5,30,210,50),"do_what",MDR_DIALECT_CHOICE ("Then","ならば"),menu); field->ResizeToPreferred(); field->SetDivider(be_plain_font->StringWidth(MDR_DIALECT_CHOICE ("Then","ならば")) + 8); AddChild(field); - + outbound_field = new BMenuField(BRect(5,55,255,80),"reply","Foo",outbound); outbound_field->ResizeToPreferred(); outbound_field->SetDivider(0); @@ -123,7 +123,7 @@ status_t RuleFilterConfig::Archive(BMessage *into, bool deep) const { into->AddInt32("argument",outbound->FindMarked()->Message()->what); } else into->AddString("argument",arg->Text()); - + return B_OK; } @@ -132,7 +132,7 @@ void RuleFilterConfig::MessageReceived(BMessage *msg) { { case kMsgActionMoveTo: case kMsgActionSetTo: - if (BControl *control = (BControl *)arg->FindView("file_path")) + if (BControl *control = (BControl *)arg->FindView("file_path")) arg->SetEnabled(true); if (BControl *control = (BControl *)arg->FindView("select_file")) control->SetEnabled(msg->what == kMsgActionMoveTo); diff --git a/src/add-ons/mail_daemon/inbound_filters/spam_filter/SpamFilter.cpp b/src/add-ons/mail_daemon/inbound_filters/spam_filter/SpamFilter.cpp index 00de71d2b5..ed2bd33715 100644 --- a/src/add-ons/mail_daemon/inbound_filters/spam_filter/SpamFilter.cpp +++ b/src/add-ons/mail_daemon/inbound_filters/spam_filter/SpamFilter.cpp @@ -486,7 +486,7 @@ descriptive_name ( sprintf (buffer, "Spam >= %05.3f", (double) cutoffRatio); if (addMarker) - strcat (buffer, ", Mark Subject"); + strcat (buffer, ", Mark subject"); if (autoTraining) strcat (buffer, ", Self-training"); strcat (buffer, "."); diff --git a/src/add-ons/mail_daemon/inbound_filters/spam_filter/SpamFilterConfig.cpp b/src/add-ons/mail_daemon/inbound_filters/spam_filter/SpamFilterConfig.cpp index 813306c3bd..74420a41f1 100644 --- a/src/add-ons/mail_daemon/inbound_filters/spam_filter/SpamFilterConfig.cpp +++ b/src/add-ons/mail_daemon/inbound_filters/spam_filter/SpamFilterConfig.cpp @@ -178,7 +178,7 @@ void AGMSBayesianSpamFilterConfig::AttachedToWindow () fAddSpamToSubjectCheckBoxPntr = new BCheckBox ( tempRect, "AddToSubject", - "Add spam rating to start of Subject", + "Add spam rating to start of subject", new BMessage (kAddSpamToSubjectPressed)); AddChild (fAddSpamToSubjectCheckBoxPntr); fAddSpamToSubjectCheckBoxPntr->ResizeToPreferred (); @@ -194,7 +194,7 @@ void AGMSBayesianSpamFilterConfig::AttachedToWindow () fNoWordsMeansSpamCheckBoxPntr = new BCheckBox ( tempRect, "NoWordsMeansSpam", - "or empty E-mail", + "or empty e-mail", new BMessage (kNoWordsMeansSpam)); AddChild (fNoWordsMeansSpamCheckBoxPntr); fNoWordsMeansSpamCheckBoxPntr->ResizeToPreferred (); @@ -250,7 +250,7 @@ void AGMSBayesianSpamFilterConfig::AttachedToWindow () fAutoTrainingCheckBoxPntr = new BCheckBox ( tempRect, "autoTraining", - "Learn from all incoming E-mail", + "Learn from all incoming e-mail", new BMessage (kAutoTrainingPressed)); AddChild (fAutoTrainingCheckBoxPntr); fAutoTrainingCheckBoxPntr->ResizeToPreferred (); diff --git a/src/add-ons/mail_daemon/inbound_protocols/imap/imap_config.cpp b/src/add-ons/mail_daemon/inbound_protocols/imap/imap_config.cpp index 59da1f31e7..5a712b9f88 100644 --- a/src/add-ons/mail_daemon/inbound_protocols/imap/imap_config.cpp +++ b/src/add-ons/mail_daemon/inbound_protocols/imap/imap_config.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2007-2008, Haiku Inc. All Rights Reserved. + * Copyright 2007-2009, Haiku, Inc. All rights reserved. * Copyright 2001-2002 Dr. Zoidberg Enterprises. All rights reserved. * * Distributed under the terms of the MIT License. @@ -34,7 +34,7 @@ IMAPConfig::IMAPConfig(BMessage *archive) ) { #ifdef USE_SSL - AddFlavor("No Encryption"); + AddFlavor("No encryption"); AddFlavor("SSL"); #endif @@ -53,8 +53,8 @@ IMAPConfig::IMAPConfig(BMessage *archive) /*frame.top += 10; frame.bottom += 10;*/ - BTextControl *folder = new BTextControl(frame,"root","Top Mailbox Folder: ","",NULL); - folder->SetDivider(be_plain_font->StringWidth("Top Mailbox Folder: ")); + BTextControl *folder = new BTextControl(frame,"root","Top mailbox folder: ","",NULL); + folder->SetDivider(be_plain_font->StringWidth("Top mailbox folder: ")); if (archive->HasString("root")) folder->SetText(archive->FindString("root")); diff --git a/src/add-ons/mail_daemon/inbound_protocols/pop3/pop3.cpp b/src/add-ons/mail_daemon/inbound_protocols/pop3/pop3.cpp index 0850e2eb32..55c3d0c08e 100644 --- a/src/add-ons/mail_daemon/inbound_protocols/pop3/pop3.cpp +++ b/src/add-ons/mail_daemon/inbound_protocols/pop3/pop3.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2007-2008, Haiku Inc. All Rights Reserved. + * Copyright 2007-2009, Haiku, Inc. All rights reserved. * Copyright 2001-2002 Dr. Zoidberg Enterprises. All rights reserved. * * Distributed under the terms of the MIT License. @@ -85,7 +85,7 @@ POP3Protocol::~POP3Protocol() status_t POP3Protocol::Open(const char *server, int port, int) { - runner->ReportProgress(0, 0, MDR_DIALECT_CHOICE("Connecting to POP3 Server...", + runner->ReportProgress(0, 0, MDR_DIALECT_CHOICE("Connecting to POP3 server...", "POP3サーバに接続しています...")); if (port <= 0) { @@ -169,7 +169,7 @@ POP3Protocol::Open(const char *server, int port, int) << settings->FindString("server"); if (port != 995) error << ":" << port; - error << ". (SSL Connection Error)"; + error << ". (SSL connection error)"; runner->ShowError(error.String()); SSL_CTX_free(fSSLContext); #ifndef HAIKU_TARGET_PLATFORM_BEOS @@ -765,11 +765,11 @@ instantiate_config_panel(BMessage *settings, BMessage *) | B_MAIL_PROTOCOL_HAS_FLAVORS #endif ); - view->AddAuthMethod("Plain Text"); + view->AddAuthMethod("Plain text"); view->AddAuthMethod("APOP"); #if USE_SSL - view->AddFlavor("No Encryption"); + view->AddFlavor("No encryption"); view->AddFlavor("SSL"); #endif diff --git a/src/add-ons/mail_daemon/outbound_filters/fortune/ConfigView.cpp b/src/add-ons/mail_daemon/outbound_filters/fortune/ConfigView.cpp index a86933c7f6..7d4d754b41 100644 --- a/src/add-ons/mail_daemon/outbound_filters/fortune/ConfigView.cpp +++ b/src/add-ons/mail_daemon/outbound_filters/fortune/ConfigView.cpp @@ -27,28 +27,28 @@ ConfigView::ConfigView() BRect rect(5,4,250,25); rect.bottom = rect.top - 2 + itemHeight; - BMailFileConfigView *fview = new BMailFileConfigView(MDR_DIALECT_CHOICE ("Fortune File:","予言ファイル:"),"fortune_file",false,"",B_FILE_NODE); + BMailFileConfigView *fview = new BMailFileConfigView(MDR_DIALECT_CHOICE ("Fortune file:","予言ファイル:"),"fortune_file",false,"",B_FILE_NODE); AddChild(fview); - + rect.top = rect.bottom + 8; rect.bottom = rect.top - 2 + itemHeight; - BTextControl * control = new BTextControl(rect,"tag_line",MDR_DIALECT_CHOICE ("Tag Line:","見出し:"),NULL,NULL); + BTextControl * control = new BTextControl(rect,"tag_line",MDR_DIALECT_CHOICE ("Tag line:","見出し:"),NULL,NULL); control->SetDivider(control->StringWidth(control->Label()) + 6); AddChild(control); ResizeToPreferred(); -} +} void ConfigView::SetTo(BMessage *archive) { if (BMailFileConfigView *control = (BMailFileConfigView *)FindView("fortune_file")) control->SetTo(archive,NULL); - + BString path = archive->FindString("tag_line"); if (!archive->HasString("tag_line")) - path = "Fortune Cookie Says:\n\n"; - + path = "Fortune cookie says:\n\n"; + path.Truncate(path.Length() - 2); if (BTextControl *control = (BTextControl *)FindView("tag_line")) control->SetText(path.String()); @@ -61,7 +61,7 @@ status_t ConfigView::Archive(BMessage *into,bool) const { control->Archive(into); } - + if (BTextControl *control = (BTextControl *)FindView("tag_line")) { BString line = control->Text(); @@ -73,7 +73,7 @@ status_t ConfigView::Archive(BMessage *into,bool) const return B_OK; } - + void ConfigView::GetPreferredSize(float *width, float *height) { *width = 258; diff --git a/src/add-ons/mail_daemon/outbound_protocols/smtp/smtp.cpp b/src/add-ons/mail_daemon/outbound_protocols/smtp/smtp.cpp index 8386dbae76..c32e90f164 100644 --- a/src/add-ons/mail_daemon/outbound_protocols/smtp/smtp.cpp +++ b/src/add-ons/mail_daemon/outbound_protocols/smtp/smtp.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2007-2008, Haiku Inc. All Rights Reserved. + * Copyright 2007-2009, Haiku, Inc. All rights reserved. * Copyright 2001-2002 Dr. Zoidberg Enterprises. All rights reserved. * * Distributed under the terms of the MIT License. @@ -257,7 +257,7 @@ SMTPProtocol::SMTPProtocol(BMessage *message, BMailChainRunner *run) // to the SMTP server first... fStatus = POP3Authentification(); if (fStatus < B_OK) { - error_msg << MDR_DIALECT_CHOICE ("POP3 authentification failed. The server said:\n","POP3認証に失敗しました\n") << fLog; + error_msg << MDR_DIALECT_CHOICE ("POP3 authentication failed. The server said:\n","POP3認証に失敗しました\n") << fLog; runner->ShowError(error_msg.String()); runner->Stop(true); return; @@ -423,7 +423,7 @@ SMTPProtocol::Open(const char *address, int port, bool esmtp) error << "Could not connect to SMTP server " << fSettings->FindString("server"); if (port != 465) error << ":" << port; - error << ". (SSL Connection Error)"; + error << ". (SSL connection error)"; runner->ShowError(error.String()); SSL_CTX_free(ctx); #ifndef HAIKU_TARGET_PLATFORM_BEOS @@ -1118,7 +1118,7 @@ instantiate_config_panel(BMessage *settings, BMessage *) view->AddAuthMethod(MDR_DIALECT_CHOICE ("POP3 before SMTP","送信前に受信する"), false); BTextControl *control = (BTextControl *)(view->FindView("host")); - control->SetLabel(MDR_DIALECT_CHOICE ("SMTP Server: ","SMTPサーバ: ")); + control->SetLabel(MDR_DIALECT_CHOICE ("SMTP server: ","SMTPサーバ: ")); // Reset the dividers after changing one float widestLabel=0; diff --git a/src/add-ons/mail_daemon/system_filters/notifier/ConfigView.cpp b/src/add-ons/mail_daemon/system_filters/notifier/ConfigView.cpp index 258165af0f..2117bb941f 100644 --- a/src/add-ons/mail_daemon/system_filters/notifier/ConfigView.cpp +++ b/src/add-ons/mail_daemon/system_filters/notifier/ConfigView.cpp @@ -37,8 +37,8 @@ ConfigView::ConfigView() MDR_DIALECT_CHOICE ("Beep","音"), MDR_DIALECT_CHOICE ("Alert","窓(メール毎)"), MDR_DIALECT_CHOICE ("Keyboard LEDs","キーボードLED"), - MDR_DIALECT_CHOICE ("Central Alert","窓(一括)"), - "Central Beep","Log Window"}; + MDR_DIALECT_CHOICE ("Central alert","窓(一括)"), + "Central beep","Log window"}; for (int32 i = 0,j = 1;i < 6;i++,j *= 2) menu->AddItem(new BMenuItem(notifyMethods[i],new BMessage(kMsgNotifyMethod))); diff --git a/src/add-ons/mail_daemon/system_filters/notifier/filter.cpp b/src/add-ons/mail_daemon/system_filters/notifier/filter.cpp index 5363a404ab..a9831ec14a 100644 --- a/src/add-ons/mail_daemon/system_filters/notifier/filter.cpp +++ b/src/add-ons/mail_daemon/system_filters/notifier/filter.cpp @@ -25,7 +25,7 @@ class NotifyCallback : public BMailChainCallback { public: NotifyCallback (int32 notification_method, BMailChainRunner *us,NotifyFilter *ref2); virtual void Callback(status_t result); - + uint32 num_messages; private: BMailChainRunner *chainrunner; @@ -43,10 +43,10 @@ class NotifyFilter : public BMailFilter BPositionIO** io_message, BEntry* io_entry, BMessage* io_headers, BPath* io_folder, const char* io_uid ); - + private: friend class NotifyCallback; - + NotifyCallback *callback; BMailChainRunner *_runner; int32 strategy; @@ -70,19 +70,19 @@ status_t NotifyFilter::ProcessMailMessage(BPositionIO**, BEntry*, BMessage*heade callback = new NotifyCallback(strategy,_runner,this); _runner->RegisterProcessCallback(callback); } - - if (!headers->FindBool("ENTIRE_MESSAGE")) { + + if (!headers->FindBool("ENTIRE_MESSAGE")) { BString status; headers->FindString("STATUS", &status); // do not notify about auto-read messages if (status.Compare("Read") != 0) callback->num_messages ++; } - + return B_OK; } -NotifyCallback::NotifyCallback (int32 notification_method, BMailChainRunner *us,NotifyFilter *ref2) : +NotifyCallback::NotifyCallback (int32 notification_method, BMailChainRunner *us,NotifyFilter *ref2) : num_messages(0), chainrunner(us), strategy(notification_method), @@ -92,13 +92,13 @@ NotifyCallback::NotifyCallback (int32 notification_method, BMailChainRunner *us, void NotifyCallback::Callback(status_t result) { parent->callback = NULL; - + if (num_messages == 0) return; - + if (strategy & do_beep) system_beep("New E-mail"); - + if (strategy & alert) { BString text; MDR_DIALECT_CHOICE ( @@ -106,27 +106,27 @@ void NotifyCallback::Callback(status_t result) { << " for " << chainrunner->Chain()->Name() << ".", text << chainrunner->Chain()->Name() << "より\n" << num_messages << " 通のメッセージが届きました"); - - BAlert *alert = new BAlert(MDR_DIALECT_CHOICE ("New Messages","新着メッセージ"), text.String(), "OK", NULL, NULL, B_WIDTH_AS_USUAL); + + BAlert *alert = new BAlert(MDR_DIALECT_CHOICE ("New messages","新着メッセージ"), text.String(), "OK", NULL, NULL, B_WIDTH_AS_USUAL); alert->SetFeel(B_NORMAL_WINDOW_FEEL); alert->Go(NULL); } - + if (strategy & blink_leds) be_app->PostMessage('mblk'); - + if (strategy & one_central_beep) be_app->PostMessage('mcbp'); - + if (strategy & big_doozy_alert) { BMessage msg('numg'); msg.AddInt32("num_messages",num_messages); msg.AddString("chain_name",chainrunner->Chain()->Name()); msg.AddInt32("chain_id",chainrunner->Chain()->ID()); - + be_app->PostMessage(&msg); } - + if (strategy & log_window) { BString message; message << num_messages << " new message" << ((num_messages != 1) ? "s" : ""); diff --git a/src/add-ons/screen_savers/ifs/IFSSaver.cpp b/src/add-ons/screen_savers/ifs/IFSSaver.cpp index 3dfa2bd16a..8aabbc3c4a 100644 --- a/src/add-ons/screen_savers/ifs/IFSSaver.cpp +++ b/src/add-ons/screen_savers/ifs/IFSSaver.cpp @@ -76,7 +76,7 @@ IFSSaver::StartConfig(BView *view) // the additive check box fSpeedS = new BSlider(frame, "speed setting", - "Morphing Speed:", + "Morphing speed:", new BMessage(MSG_SET_SPEED), 1, 12, B_BLOCK_THUMB, B_FOLLOW_LEFT_RIGHT | B_FOLLOW_BOTTOM); diff --git a/src/add-ons/screen_savers/slideshowsaver/SlideShowConfigView.cpp b/src/add-ons/screen_savers/slideshowsaver/SlideShowConfigView.cpp index 4e27a439d3..bbbfee70ab 100644 --- a/src/add-ons/screen_savers/slideshowsaver/SlideShowConfigView.cpp +++ b/src/add-ons/screen_savers/slideshowsaver/SlideShowConfigView.cpp @@ -68,7 +68,7 @@ SlideShowConfigView::SlideShowConfigView(const BRect &frame, const char *name, // Show Caption checkbox pMsg = new BMessage(CHANGE_CAPTION); fShowCaption = new BCheckBox(BRect(10, 45, 180, 62), - "Show Caption", "Show Caption", pMsg); + "Show caption", "Show caption", pMsg); val = (fSettings->SetGetBool(SAVER_SETTING_CAPTION)) ? 1 : 0; fShowCaption->SetValue(val); fShowCaption->SetViewColor(ViewColor()); @@ -77,7 +77,7 @@ SlideShowConfigView::SlideShowConfigView(const BRect &frame, const char *name, // Change Border checkbox pMsg = new BMessage(CHANGE_BORDER); fShowBorder = new BCheckBox(BRect(10, 70, 180, 87), - "Show Border", "Show Border", pMsg); + "Show border", "Show border", pMsg); val = (fSettings->SetGetBool(SAVER_SETTING_BORDER)) ? 1 : 0; fShowBorder->SetValue(val); fShowBorder->SetViewColor(ViewColor()); @@ -86,13 +86,13 @@ SlideShowConfigView::SlideShowConfigView(const BRect &frame, const char *name, // Delay Menu // setup PNG interlace options menu int32 currentDelay = fSettings->SetGetInt32(SAVER_SETTING_DELAY) / 1000; - fDelayMenu = new BPopUpMenu("Delay Menu"); + fDelayMenu = new BPopUpMenu("Delay menu"); struct DelayItem { const char *name; int32 delay; }; DelayItem items[] = { - {"No Delay", 0}, + {"No delay", 0}, {"1 second", 1}, {"2 seconds", 2}, {"3 seconds", 3}, @@ -128,7 +128,7 @@ SlideShowConfigView::SlideShowConfigView(const BRect &frame, const char *name, // Choose Image Folder button pMsg = new BMessage(CHOOSE_DIRECTORY); fChooseFolder = new BButton(BRect(50, 160, 180, 180), - "Choose Folder", "Choose Image Folder" B_UTF8_ELLIPSIS, pMsg); + "Choose Folder", "Choose image folder" B_UTF8_ELLIPSIS, pMsg); AddChild(fChooseFolder); // Setup choose folder file panel @@ -317,6 +317,6 @@ SlideShowConfigView::Draw(BRect area) // Draw current folder BString strFolder; fSettings->GetString(SAVER_SETTING_DIRECTORY, strFolder); - strFolder.Prepend("Image Folder: "); + strFolder.Prepend("Image folder: "); DrawString(strFolder.String(), BPoint(10, yplain * 9 + ybold)); } diff --git a/src/add-ons/screen_savers/spider/SpiderSaver.cpp b/src/add-ons/screen_savers/spider/SpiderSaver.cpp index 3331a58906..5457e1024b 100644 --- a/src/add-ons/screen_savers/spider/SpiderSaver.cpp +++ b/src/add-ons/screen_savers/spider/SpiderSaver.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2007, Haiku Inc. All rights reserved. + * Copyright 2007-2009, Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: @@ -353,7 +353,7 @@ SpiderView::SpiderView(BRect frame, SpiderSaver* saver, frame.top = 10.0; frame.bottom = frame.top + viewHeight; frame.OffsetBy(0.0, viewHeight); - fQueueNumberS = new BSlider(frame, "queue number", "Max Polygon Count", + fQueueNumberS = new BSlider(frame, "queue number", "Max. polygon count", new BMessage(MSG_QUEUE_NUMBER), 1, MAX_QUEUE_NUMBER); fQueueNumberS->SetHashMarks(B_HASH_MARKS_BOTTOM); @@ -361,7 +361,7 @@ SpiderView::SpiderView(BRect frame, SpiderSaver* saver, fQueueNumberS->SetValue(queueNumber); AddChild(fQueueNumberS); frame.OffsetBy(0.0, viewHeight); - fPolyNumberS = new BSlider(frame, "poly points", "Max Points per Polygon", + fPolyNumberS = new BSlider(frame, "poly points", "Max. points per polygon", new BMessage(MSG_POLY_NUMBER), MIN_POLY_POINTS, MAX_POLY_POINTS); fPolyNumberS->SetHashMarks(B_HASH_MARKS_BOTTOM); @@ -369,7 +369,7 @@ SpiderView::SpiderView(BRect frame, SpiderSaver* saver, fPolyNumberS->SetValue(maxPolyPoints); AddChild(fPolyNumberS); frame.OffsetBy(0.0, viewHeight); - fQueueDepthS = new BSlider(frame, "queue depth", "Trail Depth", + fQueueDepthS = new BSlider(frame, "queue depth", "Trail depth", new BMessage(MSG_QUEUE_DEPTH), MIN_QUEUE_DEPTH, MAX_QUEUE_DEPTH); fQueueDepthS->SetHashMarks(B_HASH_MARKS_BOTTOM); diff --git a/src/add-ons/tracker/iconvader/IconVader.cpp b/src/add-ons/tracker/iconvader/IconVader.cpp index 901c8f9560..42226a9b69 100644 --- a/src/add-ons/tracker/iconvader/IconVader.cpp +++ b/src/add-ons/tracker/iconvader/IconVader.cpp @@ -17,7 +17,7 @@ static void Error(BView *view, status_t status, bool unlock=false) if (view && unlock) view->UnlockLooper(); BString s(strerror(status)); - alert = new BAlert("Error", s.String(), "Ok"); + alert = new BAlert("Error", s.String(), "OK"); alert->Go(); } @@ -80,7 +80,7 @@ process_refs(entry_ref dir, BMessage* refs, void* /*reserved*/) - alert = new BAlert("Error", "IconVader:\nClick on the icons to get points.\nAvoid symlinks!", "Ok"); + alert = new BAlert("Error", "IconVader:\nClick on the icons to get points.\nAvoid symlinks!", "OK"); alert->Go(); diff --git a/src/add-ons/tracker/opentargetfolder/opentargetfolder.cpp b/src/add-ons/tracker/opentargetfolder/opentargetfolder.cpp index 281b365870..9e65ae3acf 100644 --- a/src/add-ons/tracker/opentargetfolder/opentargetfolder.cpp +++ b/src/add-ons/tracker/opentargetfolder/opentargetfolder.cpp @@ -40,7 +40,7 @@ process_refs(entry_ref directoryRef, BMessage *msg, void *) || targetEntry.GetParent(&targetEntry) != B_OK) { (new BAlert("Open Target Folder", "Cannot open target folder. Maybe this link is broken?", - "Ok", NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(NULL); + "OK", NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(NULL); continue; } @@ -62,7 +62,7 @@ process_refs(entry_ref directoryRef, BMessage *msg, void *) (new BAlert("Open Target Folder", "This add-on can only be used on symbolic links.\n" "It opens the folder of the link target in Tracker.", - "Ok"))->Go(NULL); + "OK"))->Go(NULL); } } diff --git a/src/add-ons/translators/bmp/BMPTranslator.cpp b/src/add-ons/translators/bmp/BMPTranslator.cpp index a78f021b8a..5b9444f4d7 100644 --- a/src/add-ons/translators/bmp/BMPTranslator.cpp +++ b/src/add-ons/translators/bmp/BMPTranslator.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2002-2006, Haiku. + * Copyright 2002-2009, Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: @@ -116,7 +116,7 @@ make_nth_translator(int32 n, image_id you, uint32 flags, ...) // Returns: // --------------------------------------------------------------- BMPTranslator::BMPTranslator() - : BaseTranslator("BMP Images", "BMP image translator", + : BaseTranslator("BMP images", "BMP image translator", BMP_TRANSLATOR_VERSION, gInputFormats, sizeof(gInputFormats) / sizeof(translation_format), gOutputFormats, sizeof(gOutputFormats) / sizeof(translation_format), diff --git a/src/add-ons/translators/bmp/BMPView.cpp b/src/add-ons/translators/bmp/BMPView.cpp index ba15f82e0f..659537b91d 100644 --- a/src/add-ons/translators/bmp/BMPView.cpp +++ b/src/add-ons/translators/bmp/BMPView.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2002-2006, Haiku, Inc. + * Copyright 2002-2009, Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT license. * * Authors: @@ -30,7 +30,7 @@ BMPView::BMPView(const BRect &frame, const char *name, uint32 resizeMode, float height = fontHeight.descent + fontHeight.ascent + fontHeight.leading; BRect rect(10, 10, 200, 10 + height); - BStringView *stringView = new BStringView(rect, "title", "BMP Image Translator"); + BStringView *stringView = new BStringView(rect, "title", "BMP image translator"); stringView->SetFont(be_bold_font); stringView->ResizeToPreferred(); AddChild(stringView); diff --git a/src/add-ons/translators/exr/ConfigView.cpp b/src/add-ons/translators/exr/ConfigView.cpp index e0e408f237..fbe6bcbecb 100644 --- a/src/add-ons/translators/exr/ConfigView.cpp +++ b/src/add-ons/translators/exr/ConfigView.cpp @@ -25,7 +25,7 @@ ConfigView::ConfigView(const BRect &frame, uint32 resize, uint32 flags) float height = fontHeight.descent + fontHeight.ascent + fontHeight.leading; BRect rect(10, 10, 200, 10 + height); - BStringView *stringView = new BStringView(rect, "title", "EXR Images"); + BStringView *stringView = new BStringView(rect, "title", "EXR images"); stringView->SetFont(be_bold_font); stringView->ResizeToPreferred(); AddChild(stringView); diff --git a/src/add-ons/translators/exr/EXRTranslator.cpp b/src/add-ons/translators/exr/EXRTranslator.cpp index 823e53ec58..a665768573 100644 --- a/src/add-ons/translators/exr/EXRTranslator.cpp +++ b/src/add-ons/translators/exr/EXRTranslator.cpp @@ -56,7 +56,7 @@ const uint32 kNumDefaultSettings = sizeof(sDefaultSettings) / sizeof(TranSetting EXRTranslator::EXRTranslator() - : BaseTranslator("EXR Images", "EXR Image Translator", + : BaseTranslator("EXR Images", "EXR image translator", EXR_TRANSLATOR_VERSION, sInputFormats, kNumInputFormats, sOutputFormats, kNumOutputFormats, diff --git a/src/add-ons/translators/gif/GIFTranslator.cpp b/src/add-ons/translators/gif/GIFTranslator.cpp index eda7a561a5..da2f13e713 100644 --- a/src/add-ons/translators/gif/GIFTranslator.cpp +++ b/src/add-ons/translators/gif/GIFTranslator.cpp @@ -40,19 +40,19 @@ bool DetermineType(BPositionIO *source, bool *is_gif); status_t GetBitmap(BPositionIO *in, BBitmap **out); /* Required data */ -char translatorName[] = "GIF Images"; -char translatorInfo[] = "GIF image translator v1.4"; +char translatorName[] = "GIF images"; +char translatorInfo[] = "GIF image translator v1.4"; int32 translatorVersion = 0x140; -translation_format inputFormats[] = { - { GIF_TYPE, B_TRANSLATOR_BITMAP, 0.8, 0.8, "image/gif", "GIF image" }, - { B_TRANSLATOR_BITMAP, B_TRANSLATOR_BITMAP, 0.3, 0.3, "image/x-be-bitmap", "Be Bitmap Format (GIFTranslator)" }, +translation_format inputFormats[] = { + { GIF_TYPE, B_TRANSLATOR_BITMAP, 0.8, 0.8, "image/gif", "GIF image" }, + { B_TRANSLATOR_BITMAP, B_TRANSLATOR_BITMAP, 0.3, 0.3, "image/x-be-bitmap", "Be Bitmap Format (GIFTranslator)" }, { 0 } }; -translation_format outputFormats[] = { - { GIF_TYPE, B_TRANSLATOR_BITMAP, 0.8, 0.8, "image/gif", "GIF image" }, - { B_TRANSLATOR_BITMAP, B_TRANSLATOR_BITMAP, 0.3, 0.3, "image/x-be-bitmap", "Be Bitmap Format (GIFTranslator)" }, +translation_format outputFormats[] = { + { GIF_TYPE, B_TRANSLATOR_BITMAP, 0.8, 0.8, "image/gif", "GIF image" }, + { B_TRANSLATOR_BITMAP, B_TRANSLATOR_BITMAP, 0.3, 0.3, "image/x-be-bitmap", "Be Bitmap Format (GIFTranslator)" }, { 0 } }; @@ -77,7 +77,7 @@ DetermineType(BPositionIO *source, bool *is_gif) *is_gif = true; if (source->Read(header, 6) != 6) return false; header[6] = 0x00; - + if (strcmp((char *)header, "GIF87a") != 0 && strcmp((char *)header, "GIF89a") != 0) { *is_gif = false; int32 magic = (header[0] << 24) + (header[1] << 16) + (header[2] << 8) + header[3]; @@ -88,7 +88,7 @@ DetermineType(BPositionIO *source, bool *is_gif) cs = (color_space)B_BENDIAN_TO_HOST_INT32(cs); if (cs != B_RGB32 && cs != B_RGBA32 && cs != B_RGB32_BIG && cs != B_RGBA32_BIG) return false; } - + source->Seek(0, SEEK_SET); return true; } @@ -99,7 +99,7 @@ status_t GetBitmap(BPositionIO *in, BBitmap **out) { TranslatorBitmap header; - + status_t err = in->Read(&header, sizeof(header)); if (err != sizeof(header)) return B_IO_ERROR; @@ -112,7 +112,7 @@ GetBitmap(BPositionIO *in, BBitmap **out) header.rowBytes = B_BENDIAN_TO_HOST_INT32(header.rowBytes); header.colors = (color_space)B_BENDIAN_TO_HOST_INT32(header.colors); header.dataSize = B_BENDIAN_TO_HOST_INT32(header.dataSize); - + BBitmap *bitmap = new BBitmap(header.bounds, header.colors); *out = bitmap; if (bitmap == NULL) return B_NO_MEMORY; @@ -124,26 +124,26 @@ GetBitmap(BPositionIO *in, BBitmap **out) err = in->Read(bits, header.dataSize); if (err == (status_t)header.dataSize) return B_OK; else return B_IO_ERROR; -} +} /* Required Identify function - may need to read entire header, not sure */ status_t -Identify(BPositionIO *inSource, const translation_format *inFormat, +Identify(BPositionIO *inSource, const translation_format *inFormat, BMessage *ioExtension, translator_info *outInfo, uint32 outType) { const char *debug_text = getenv("GIF_TRANSLATOR_DEBUG"); if ((debug_text != NULL) && (atoi(debug_text) != 0)) debug = true; - + if (outType == 0) outType = B_TRANSLATOR_BITMAP; if (outType != GIF_TYPE && outType != B_TRANSLATOR_BITMAP) return B_NO_TRANSLATOR; - + bool is_gif; if (!DetermineType(inSource, &is_gif)) return B_NO_TRANSLATOR; if (!is_gif && inFormat != NULL && inFormat->type != B_TRANSLATOR_BITMAP) return B_NO_TRANSLATOR; - + outInfo->group = B_TRANSLATOR_BITMAP; if (is_gif) { outInfo->type = GIF_TYPE; @@ -166,7 +166,7 @@ Identify(BPositionIO *inSource, const translation_format *inFormat, /* Main required function - assumes that an incoming GIF must be translated to a BBitmap, and vice versa - this could be improved */ status_t -Translate(BPositionIO *inSource, const translator_info *inInfo, +Translate(BPositionIO *inSource, const translator_info *inInfo, BMessage *ioExtension, uint32 outType, BPositionIO *outDestination) { @@ -177,11 +177,11 @@ Translate(BPositionIO *inSource, const translator_info *inInfo, if (outType != GIF_TYPE && outType != B_TRANSLATOR_BITMAP) { return B_NO_TRANSLATOR; } - + bool is_gif; if (!DetermineType(inSource, &is_gif)) return B_NO_TRANSLATOR; if (!is_gif && inInfo->type != B_TRANSLATOR_BITMAP) return B_NO_TRANSLATOR; - + status_t err = B_OK; bigtime_t now = system_time(); // Going from BBitmap to GIF @@ -206,7 +206,7 @@ Translate(BPositionIO *inSource, const translator_info *inInfo, } delete gl; } - + if (debug) { now = system_time() - now; printf("Translate() - Translation took %Ld microseconds\n", now); diff --git a/src/add-ons/translators/gif/GIFView.cpp b/src/add-ons/translators/gif/GIFView.cpp index a7c0d07404..4426819995 100644 --- a/src/add-ons/translators/gif/GIFView.cpp +++ b/src/add-ons/translators/gif/GIFView.cpp @@ -68,7 +68,7 @@ GIFView::GIFView(BRect rect, const char *name) // menu fields (Palette & Colors) fWebSafeMI = new BMenuItem("Websafe", new BMessage(GV_WEB_SAFE), 0, 0); - fBeOSSystemMI = new BMenuItem("BeOS System", new BMessage(GV_BEOS_SYSTEM), 0, 0); + fBeOSSystemMI = new BMenuItem("BeOS system", new BMessage(GV_BEOS_SYSTEM), 0, 0); fGreyScaleMI = new BMenuItem("Greyscale", new BMessage(GV_GREYSCALE), 0, 0); fOptimalMI = new BMenuItem("Optimal", new BMessage(GV_OPTIMAL), 0, 0); fPaletteM = new BPopUpMenu("PalettePopUpMenu", true, true, B_ITEMS_IN_COLUMN); @@ -92,19 +92,19 @@ GIFView::GIFView(BRect rect, const char *name) r.top = r.bottom + 14; r.bottom = r.top + 24; - fPaletteMF = new BMenuField(r, "PaletteMenuField", "Palette", + fPaletteMF = new BMenuField(r, "PaletteMenuField", "Palette: ", fPaletteM, B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_NAVIGABLE); AddChild(fPaletteMF); r.top = r.bottom + 5; r.bottom = r.top + 24; - fColorCountMF = new BMenuField(r, "ColorCountMenuField", "Colors", + fColorCountMF = new BMenuField(r, "ColorCountMenuField", "Colors: ", fColorCountM, B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_NAVIGABLE); AddChild(fColorCountMF); // align menu fields - float maxLabelWidth = ceilf(max_c(be_plain_font->StringWidth("Colors"), - be_plain_font->StringWidth("Palette"))); + float maxLabelWidth = ceilf(max_c(be_plain_font->StringWidth("Colors: "), + be_plain_font->StringWidth("Palette: "))); fPaletteMF->SetDivider(maxLabelWidth + 7); fColorCountMF->SetDivider(maxLabelWidth + 7); diff --git a/src/add-ons/translators/hpgs/ConfigView.cpp b/src/add-ons/translators/hpgs/ConfigView.cpp index c1b0f16df9..dac7773b7e 100644 --- a/src/add-ons/translators/hpgs/ConfigView.cpp +++ b/src/add-ons/translators/hpgs/ConfigView.cpp @@ -25,7 +25,7 @@ ConfigView::ConfigView(const BRect &frame, uint32 resize, uint32 flags) float height = fontHeight.descent + fontHeight.ascent + fontHeight.leading; BRect rect(10, 10, 200, 10 + height); - BStringView *stringView = new BStringView(rect, "title", "HPGS Images"); + BStringView *stringView = new BStringView(rect, "title", "HPGS images"); stringView->SetFont(be_bold_font); stringView->ResizeToPreferred(); AddChild(stringView); diff --git a/src/add-ons/translators/hpgs/HPGSTranslator.cpp b/src/add-ons/translators/hpgs/HPGSTranslator.cpp index e0ed51512e..f1cce10746 100644 --- a/src/add-ons/translators/hpgs/HPGSTranslator.cpp +++ b/src/add-ons/translators/hpgs/HPGSTranslator.cpp @@ -80,7 +80,7 @@ const uint32 kNumDefaultSettings = sizeof(sDefaultSettings) / sizeof(TranSetting HPGSTranslator::HPGSTranslator() - : BaseTranslator("HPGS Images", "HPGS Image Translator", + : BaseTranslator("HPGS images", "HPGS image translator", HPGS_TRANSLATOR_VERSION, sInputFormats, kNumInputFormats, sOutputFormats, kNumOutputFormats, diff --git a/src/add-ons/translators/hvif/HVIFTranslator.cpp b/src/add-ons/translators/hvif/HVIFTranslator.cpp index 8e936ff5e9..cbb582c1f0 100644 --- a/src/add-ons/translators/hvif/HVIFTranslator.cpp +++ b/src/add-ons/translators/hvif/HVIFTranslator.cpp @@ -60,7 +60,7 @@ make_nth_translator(int32 n, image_id image, uint32 flags, ...) HVIFTranslator::HVIFTranslator() - : BaseTranslator("HVIF Icons", "Native Haiku vector icon translator", + : BaseTranslator("HVIF icons", "Native Haiku vector icon translator", HVIF_TRANSLATOR_VERSION, sInputFormats, sizeof(sInputFormats) / sizeof(sInputFormats[0]), sOutputFormats, sizeof(sOutputFormats) / sizeof(sOutputFormats[0]), diff --git a/src/add-ons/translators/hvif/HVIFView.cpp b/src/add-ons/translators/hvif/HVIFView.cpp index ee0fb5596f..dd503416b6 100644 --- a/src/add-ons/translators/hvif/HVIFView.cpp +++ b/src/add-ons/translators/hvif/HVIFView.cpp @@ -30,7 +30,7 @@ HVIFView::HVIFView(const BRect &frame, const char *name, uint32 resizeMode, BRect rect(10, 10, 200, 10 + height); BStringView *stringView = new BStringView(rect, "title", - "Native Haiku Icon Format Translator"); + "Native Haiku icon format translator"); stringView->SetFont(be_bold_font); stringView->ResizeToPreferred(); AddChild(stringView); @@ -57,7 +57,7 @@ HVIFView::HVIFView(const BRect &frame, const char *name, uint32 resizeMode, rect.OffsetBy(0, height + 5); int32 renderSize = fSettings->SetGetInt32(HVIF_SETTING_RENDER_SIZE); - BString label = "Render Size: "; + BString label = "Render size: "; label << renderSize; fRenderSize = new BSlider(rect, "renderSize", label.String(), NULL, 1, 32); @@ -92,7 +92,7 @@ HVIFView::MessageReceived(BMessage *message) fSettings->SetGetInt32(HVIF_SETTING_RENDER_SIZE, &value); fSettings->SaveSettings(); - BString newLabel = "Render Size: "; + BString newLabel = "Render size: "; newLabel << value; fRenderSize->SetLabel(newLabel.String()); return; diff --git a/src/add-ons/translators/ico/ConfigView.cpp b/src/add-ons/translators/ico/ConfigView.cpp index ae95d3c5a5..e23c528448 100644 --- a/src/add-ons/translators/ico/ConfigView.cpp +++ b/src/add-ons/translators/ico/ConfigView.cpp @@ -24,7 +24,7 @@ ConfigView::ConfigView(const BRect &frame, uint32 resize, uint32 flags) float height = fontHeight.descent + fontHeight.ascent + fontHeight.leading; BRect rect(10, 10, 200, 10 + height); - BStringView *stringView = new BStringView(rect, "title", "Windows Icon Images"); + BStringView *stringView = new BStringView(rect, "title", "Windows icon images"); stringView->SetFont(be_bold_font); stringView->ResizeToPreferred(); AddChild(stringView); diff --git a/src/add-ons/translators/ico/ICOTranslator.cpp b/src/add-ons/translators/ico/ICOTranslator.cpp index 8bb4104d45..67a73f84a7 100644 --- a/src/add-ons/translators/ico/ICOTranslator.cpp +++ b/src/add-ons/translators/ico/ICOTranslator.cpp @@ -72,7 +72,7 @@ const uint32 kNumDefaultSettings = sizeof(sDefaultSettings) / sizeof(TranSetting ICOTranslator::ICOTranslator() - : BaseTranslator("Windows Icon Images", "Windows Icon Translator", + : BaseTranslator("Windows icon images", "Windows icon translator", ICO_TRANSLATOR_VERSION, sInputFormats, kNumInputFormats, sOutputFormats, kNumOutputFormats, diff --git a/src/add-ons/translators/jpeg/JPEGTranslator.cpp b/src/add-ons/translators/jpeg/JPEGTranslator.cpp index 360d18959c..e2f40b2eb2 100644 --- a/src/add-ons/translators/jpeg/JPEGTranslator.cpp +++ b/src/add-ons/translators/jpeg/JPEGTranslator.cpp @@ -50,14 +50,14 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define B_TRANSLATOR_BITMAP_DESCRIPTION "Be Bitmap Format (JPEGTranslator)" // Translation Kit required globals -char translatorName[] = "JPEG Images"; +char translatorName[] = "JPEG images"; char translatorInfo[] = "©2002-2003, Marcin Konicki\n" "©2005-2007, Haiku\n" "\n" "Based on IJG library © 1991-1998, Thomas G. Lane\n" " http://www.ijg.org/files/\n" - "with \"Lossless\" encoding support patch by Ken Murchison\n" + "with \"lossless\" encoding support patch by Ken Murchison\n" " http://www.oceana.com/ftp/ljpeg/\n" "\n" "With some colorspace conversion routines by Magnus Hellman\n" diff --git a/src/add-ons/translators/jpeg/JPEGTranslator.h b/src/add-ons/translators/jpeg/JPEGTranslator.h index e57bafd032..6222b95197 100644 --- a/src/add-ons/translators/jpeg/JPEGTranslator.h +++ b/src/add-ons/translators/jpeg/JPEGTranslator.h @@ -71,8 +71,8 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define VIEW_LABEL_PROGRESSIVE "Use progressive compression" #define VIEW_LABEL_OPTIMIZECOLORS "Prevent colors 'washing out'" #define VIEW_LABEL_SMALLERFILE "Make file smaller (sligthtly worse quality)" -#define VIEW_LABEL_GRAY1ASRGB24 "Write Black&White images as RGB24" -#define VIEW_LABEL_ALWAYSRGB32 "Read Greyscale images as RGB32" +#define VIEW_LABEL_GRAY1ASRGB24 "Write black-and-white images as RGB24" +#define VIEW_LABEL_ALWAYSRGB32 "Read greyscale images as RGB32" #define VIEW_LABEL_PHOTOSHOPCMYK "Use CMYK code with 0 for 100% ink coverage" #define VIEW_LABEL_SHOWREADERRORBOX "Show warning messages" diff --git a/src/add-ons/translators/jpeg2000/JPEG2000Translator.cpp b/src/add-ons/translators/jpeg2000/JPEG2000Translator.cpp index c5afda899d..4f58290927 100644 --- a/src/add-ons/translators/jpeg2000/JPEG2000Translator.cpp +++ b/src/add-ons/translators/jpeg2000/JPEG2000Translator.cpp @@ -48,7 +48,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define B_TRANSLATOR_BITMAP_DESCRIPTION "Be Bitmap Format (JPEG2000Translator)" // Translation Kit required globals -char translatorName[] = "JPEG2000 Images"; +char translatorName[] = "JPEG2000 images"; char translatorInfo[] = "©2002-2003, Shard\n" "©2005-2006, Haiku\n" "\n" diff --git a/src/add-ons/translators/jpeg2000/JPEG2000Translator.h b/src/add-ons/translators/jpeg2000/JPEG2000Translator.h index 5e0b205ff9..96e3a961f3 100644 --- a/src/add-ons/translators/jpeg2000/JPEG2000Translator.h +++ b/src/add-ons/translators/jpeg2000/JPEG2000Translator.h @@ -62,9 +62,9 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // View labels #define VIEW_LABEL_QUALITY "Output quality" -#define VIEW_LABEL_GRAY1ASRGB24 "Write Black&White images as RGB24" +#define VIEW_LABEL_GRAY1ASRGB24 "Write black-and-white images as RGB24" #define VIEW_LABEL_JPC "Output only codestream (.jpc)" -#define VIEW_LABEL_GRAYASRGB32 "Read Greyscale images as RGB32" +#define VIEW_LABEL_GRAYASRGB32 "Read greyscale images as RGB32" //! Settings storage structure diff --git a/src/add-ons/translators/pcx/ConfigView.cpp b/src/add-ons/translators/pcx/ConfigView.cpp index bfee818bb8..6e8c4053ed 100644 --- a/src/add-ons/translators/pcx/ConfigView.cpp +++ b/src/add-ons/translators/pcx/ConfigView.cpp @@ -25,7 +25,7 @@ ConfigView::ConfigView(const BRect &frame, uint32 resize, uint32 flags) float height = fontHeight.descent + fontHeight.ascent + fontHeight.leading; BRect rect(10, 10, 200, 10 + height); - BStringView *stringView = new BStringView(rect, "title", "PCX Images"); + BStringView *stringView = new BStringView(rect, "title", "PCX images"); stringView->SetFont(be_bold_font); stringView->ResizeToPreferred(); AddChild(stringView); diff --git a/src/add-ons/translators/pcx/PCXTranslator.cpp b/src/add-ons/translators/pcx/PCXTranslator.cpp index 4d2637a097..d05b3e659d 100644 --- a/src/add-ons/translators/pcx/PCXTranslator.cpp +++ b/src/add-ons/translators/pcx/PCXTranslator.cpp @@ -69,7 +69,7 @@ const uint32 kNumDefaultSettings = sizeof(sDefaultSettings) / sizeof(TranSetting PCXTranslator::PCXTranslator() - : BaseTranslator("PCX Images", "PCX Translator", + : BaseTranslator("PCX images", "PCX translator", PCX_TRANSLATOR_VERSION, sInputFormats, kNumInputFormats, sOutputFormats, kNumOutputFormats, diff --git a/src/add-ons/translators/png/PNGTranslator.cpp b/src/add-ons/translators/png/PNGTranslator.cpp index 84971878a8..b0fc3ad507 100644 --- a/src/add-ons/translators/png/PNGTranslator.cpp +++ b/src/add-ons/translators/png/PNGTranslator.cpp @@ -8,7 +8,8 @@ // PNG images. // // -// Copyright (c) 2003 OpenBeOS Project +// Copyright (c) 2003, OpenBeOS Project +// Copyright (c) 2009, Haiku, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), @@ -178,7 +179,7 @@ pngcb_flush_data(png_structp ppng) // Returns: // --------------------------------------------------------------- PNGTranslator::PNGTranslator() - : BaseTranslator("PNG Images", "PNG image translator", + : BaseTranslator("PNG images", "PNG image translator", PNG_TRANSLATOR_VERSION, gInputFormats, sizeof(gInputFormats) / sizeof(translation_format), gOutputFormats, sizeof(gOutputFormats) / sizeof(translation_format), diff --git a/src/add-ons/translators/png/PNGView.cpp b/src/add-ons/translators/png/PNGView.cpp index 77d1b8fe42..3e775cad09 100644 --- a/src/add-ons/translators/png/PNGView.cpp +++ b/src/add-ons/translators/png/PNGView.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2006, Haiku, Inc. + * Copyright 2003-2009, Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT license. * * Authors: @@ -34,7 +34,7 @@ PNGView::PNGView(const BRect &frame, const char *name, uint32 resizeMode, float height = fontHeight.descent + fontHeight.ascent + fontHeight.leading; BRect rect(10, 10, 200, 10 + height); - BStringView *stringView = new BStringView(rect, "title", "PNG Image Translator"); + BStringView *stringView = new BStringView(rect, "title", "PNG image translator"); stringView->SetFont(be_bold_font); stringView->ResizeToPreferred(); AddChild(stringView); @@ -78,7 +78,7 @@ PNGView::PNGView(const BRect &frame, const char *name, uint32 resizeMode, rect.OffsetBy(0, stringView->Frame().Height() + 20.0f); BMenuField* menuField = new BMenuField(rect, "PNG Interlace Menu", - "Interlacing Type:", fInterlaceMenu); + "Interlacing type:", fInterlaceMenu); menuField->SetDivider(menuField->StringWidth(menuField->Label()) + 7.0f); menuField->ResizeToPreferred(); AddChild(menuField); diff --git a/src/add-ons/translators/ppm/PPMTranslator.cpp b/src/add-ons/translators/ppm/PPMTranslator.cpp index 135f7302a4..8401eb25bc 100644 --- a/src/add-ons/translators/ppm/PPMTranslator.cpp +++ b/src/add-ons/translators/ppm/PPMTranslator.cpp @@ -47,7 +47,7 @@ #define PPM_TRANSLATOR_VERSION 0x100 /* These three data items are exported by every translator. */ -char translatorName[] = "PPM Images"; +char translatorName[] = "PPM images"; char translatorInfo[] = "PPM image translator v1.0.0, " __DATE__; int32 translatorVersion = PPM_TRANSLATOR_VERSION; // Revision: lowest 4 bits @@ -214,13 +214,13 @@ public: PrefsLoader g_prefs_loader("PPMTranslator_Settings"); /* Some prototypes for functions we use. */ -status_t read_ppm_header(BDataIO * io, int * width, int * rowbytes, int * height, +status_t read_ppm_header(BDataIO * io, int * width, int * rowbytes, int * height, int * max, bool * ascii, color_space * space, bool * is_ppm, char ** comment); -status_t read_bits_header(BDataIO * io, int skipped, int * width, int * rowbytes, +status_t read_bits_header(BDataIO * io, int skipped, int * width, int * rowbytes, int * height, int * max, bool * ascii, color_space * space); status_t write_comment(const char * str, BDataIO * io); -status_t copy_data(BDataIO * in, BDataIO * out, int rowbytes, int out_rowbytes, - int height, int max, bool in_ascii, bool out_ascii, color_space in_space, +status_t copy_data(BDataIO * in, BDataIO * out, int rowbytes, int out_rowbytes, + int height, int max, bool in_ascii, bool out_ascii, color_space in_space, color_space out_space); /* Return B_NO_TRANSLATOR if not handling this data. */ @@ -340,9 +340,9 @@ Translate( /* required */ } else { /* When outputting to B_TRANSLATOR_BITMAP, follow user's wishes. */ #if defined(_PR3_COMPATIBLE_) /* R4 headers? */ - if (!ioExtension || ioExtension->FindInt32(B_TRANSLATOR_EXT_BITMAP_COLOR_SPACE, (int32*)&out_space) || + if (!ioExtension || ioExtension->FindInt32(B_TRANSLATOR_EXT_BITMAP_COLOR_SPACE, (int32*)&out_space) || #else - if (!ioExtension || ioExtension->FindInt32("bits/space", (int32*)&out_space) || + if (!ioExtension || ioExtension->FindInt32("bits/space", (int32*)&out_space) || #endif (out_space == B_NO_COLOR_SPACE)) { if (g_settings.out_space == B_NO_COLOR_SPACE) { @@ -445,7 +445,7 @@ public: mMenu->AddItem(new BMenuItem("RGB 5:5:5 16 bits", CSMessage(B_RGB15))); mMenu->AddItem(new BMenuItem("RGBA 5:5:5:1 16 bits", CSMessage(B_RGBA15))); mMenu->AddItem(new BMenuItem("RGB 5:6:5 16 bits", CSMessage(B_RGB16))); - mMenu->AddItem(new BMenuItem("System Palette 8 bits", CSMessage(B_CMAP8))); + mMenu->AddItem(new BMenuItem("System palette 8 bits", CSMessage(B_CMAP8))); mMenu->AddSeparatorItem(); mMenu->AddItem(new BMenuItem("Grayscale 8 bits", CSMessage(B_GRAY8))); mMenu->AddItem(new BMenuItem("Bitmap 1 bit", CSMessage(B_GRAY1))); @@ -458,7 +458,7 @@ public: mMenu->AddItem(new BMenuItem("RGB 5:5:5 16 bits big-endian", CSMessage(B_RGB15_BIG))); mMenu->AddItem(new BMenuItem("RGBA 5:5:5:1 16 bits big-endian", CSMessage(B_RGBA15_BIG))); mMenu->AddItem(new BMenuItem("RGB 5:6:5 16 bits big-endian", CSMessage(B_RGB16))); - mField = new BMenuField(BRect(10,110,190,130), "Color Space Field", "Input Color Space", mMenu); + mField = new BMenuField(BRect(10,110,190,130), "Color Space Field", "Input color space", mMenu); mField->SetDivider(mField->StringWidth(mField->Label()) + 7); mField->SetViewColor(ViewColor()); AddChild(mField); @@ -490,16 +490,16 @@ virtual void Draw( float xbold, ybold; xbold = fh.descent + 1; ybold = fh.ascent + fh.descent * 2 + fh.leading; - - char title[] = "PPM Image Translator"; + + char title[] = "PPM image translator"; DrawString(title, BPoint(xbold, ybold)); - + SetFont(be_plain_font); font_height plainh; GetFontHeight(&plainh); float yplain; yplain = plainh.ascent + plainh.descent * 2 + plainh.leading; - + char detail[100]; int ver = static_cast(translatorVersion); sprintf(detail, "Version %d.%d.%d %s", ver >> 8, ((ver >> 4) & 0xf), @@ -598,7 +598,7 @@ private: /* as a local when translation starts. */ /* Store your settings wherever you feel like it. */ -status_t +status_t MakeConfig( /* optional */ BMessage * ioExtension, /* can be NULL */ BView * * outView, @@ -644,7 +644,7 @@ read_ppm_header( BDataIO * inSource, int * width, int * rowbytes, - int * height, + int * height, int * max, bool * ascii, color_space * space, @@ -760,7 +760,7 @@ read_bits_header( int skipped, int * width, int * rowbytes, - int * height, + int * height, int * max, bool * ascii, color_space * space) @@ -928,7 +928,7 @@ write_ascii_line( } -static unsigned char * +static unsigned char * make_scale_data( int max) { @@ -954,13 +954,13 @@ scale_data( status_t copy_data( - BDataIO * in, - BDataIO * out, - int rowbytes, + BDataIO * in, + BDataIO * out, + int rowbytes, int out_rowbytes, - int height, + int height, int max, - bool in_ascii, + bool in_ascii, bool out_ascii, color_space in_space, color_space out_space) diff --git a/src/add-ons/translators/raw/ConfigView.cpp b/src/add-ons/translators/raw/ConfigView.cpp index 56bae2bc76..aee402dfb4 100644 --- a/src/add-ons/translators/raw/ConfigView.cpp +++ b/src/add-ons/translators/raw/ConfigView.cpp @@ -24,7 +24,7 @@ ConfigView::ConfigView(const BRect &frame, uint32 resize, uint32 flags) float height = fontHeight.descent + fontHeight.ascent + fontHeight.leading; BRect rect(10, 10, 200, 10 + height); - BStringView *stringView = new BStringView(rect, "title", "RAW Images"); + BStringView *stringView = new BStringView(rect, "title", "RAW images"); stringView->SetFont(be_bold_font); stringView->ResizeToPreferred(); AddChild(stringView); diff --git a/src/add-ons/translators/raw/RAWTranslator.cpp b/src/add-ons/translators/raw/RAWTranslator.cpp index 86373d3624..205945bea8 100644 --- a/src/add-ons/translators/raw/RAWTranslator.cpp +++ b/src/add-ons/translators/raw/RAWTranslator.cpp @@ -92,7 +92,7 @@ const uint32 kNumDefaultSettings = sizeof(sDefaultSettings) / sizeof(TranSetting RAWTranslator::RAWTranslator() - : BaseTranslator("RAW Images", "RAW Image Translator", + : BaseTranslator("RAW images", "RAW image translator", RAW_TRANSLATOR_VERSION, sInputFormats, kNumInputFormats, sOutputFormats, kNumOutputFormats, diff --git a/src/add-ons/translators/rtf/ConfigView.cpp b/src/add-ons/translators/rtf/ConfigView.cpp index 63df515f2f..205c05a929 100644 --- a/src/add-ons/translators/rtf/ConfigView.cpp +++ b/src/add-ons/translators/rtf/ConfigView.cpp @@ -22,7 +22,7 @@ ConfigView::ConfigView(const BRect &frame, uint32 resize, uint32 flags) float height = fontHeight.descent + fontHeight.ascent + fontHeight.leading; BRect rect(10, 10, 200, 10 + height); - BStringView *stringView = new BStringView(rect, "title", "Rich Text Format (RTF) Files"); + BStringView *stringView = new BStringView(rect, "title", "Rich Text Format (RTF) files"); stringView->SetFont(be_bold_font); stringView->ResizeToPreferred(); AddChild(stringView); diff --git a/src/add-ons/translators/rtf/RTFTranslator.cpp b/src/add-ons/translators/rtf/RTFTranslator.cpp index 8b25e621ed..93e11b9600 100644 --- a/src/add-ons/translators/rtf/RTFTranslator.cpp +++ b/src/add-ons/translators/rtf/RTFTranslator.cpp @@ -54,7 +54,7 @@ translation_format sOutputFormats[] = { RTFTranslator::RTFTranslator() { char info[256]; - sprintf(info, "Rich Text Format Translator v%d.%d.%d %s", + sprintf(info, "Rich Text Format translator v%d.%d.%d %s", int(B_TRANSLATION_MAJOR_VERSION(RTF_TRANSLATOR_VERSION)), int(B_TRANSLATION_MINOR_VERSION(RTF_TRANSLATOR_VERSION)), int(B_TRANSLATION_REVISION_VERSION(RTF_TRANSLATOR_VERSION)), @@ -73,7 +73,7 @@ RTFTranslator::~RTFTranslator() const char * RTFTranslator::TranslatorName() const { - return "RTF Text Files"; + return "RTF text files"; } diff --git a/src/add-ons/translators/sgi/SGITranslator.cpp b/src/add-ons/translators/sgi/SGITranslator.cpp index 40d8aaa4b0..a50e2739f0 100644 --- a/src/add-ons/translators/sgi/SGITranslator.cpp +++ b/src/add-ons/translators/sgi/SGITranslator.cpp @@ -10,7 +10,7 @@ // SGI images. // // -// Copyright (c) 2003-2006 Haiku Project +// Copyright (c) 2003-2009 Haiku, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), @@ -146,7 +146,7 @@ make_nth_translator(int32 n, image_id you, uint32 flags, ...) // Returns: // --------------------------------------------------------------- SGITranslator::SGITranslator() - : BaseTranslator("SGI Images", "SGI image translator", + : BaseTranslator("SGI images", "SGI image translator", SGI_TRANSLATOR_VERSION, gInputFormats, sizeof(gInputFormats) / sizeof(translation_format), gOutputFormats, sizeof(gOutputFormats) / sizeof(translation_format), diff --git a/src/add-ons/translators/sgi/SGIView.cpp b/src/add-ons/translators/sgi/SGIView.cpp index 75da8dfd20..efde859f3e 100644 --- a/src/add-ons/translators/sgi/SGIView.cpp +++ b/src/add-ons/translators/sgi/SGIView.cpp @@ -14,18 +14,18 @@ // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // -// The above copyright notice and this permission notice shall be included +// The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// 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. /*****************************************************************************/ @@ -99,7 +99,7 @@ SGIView::SGIView(const BRect &frame, const char *name, BRect menuFrame = Bounds(); menuFrame.bottom = menuFrame.top + menu->Bounds().Height(); fCompressionMF = new BMenuField(menuFrame, "compression", - "Use Compression:", menu, true/*, + "Use compression:", menu, true/*, B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP*/); if (fCompressionMF->MenuBar()) fCompressionMF->MenuBar()->ResizeToPreferred(); @@ -111,12 +111,12 @@ SGIView::SGIView(const BRect &frame, const char *name, float xbold, ybold; xbold = fh.descent + 1; ybold = fh.ascent + fh.descent * 2 + fh.leading; - + font_height plainh; be_plain_font->GetHeight(&plainh); float yplain; yplain = plainh.ascent + plainh.descent * 2 + plainh.leading; - + // position the menu field below all the text we draw in Draw() BPoint textOffset(0.0, yplain * 2 + ybold); fCompressionMF->MoveTo(textOffset); @@ -270,8 +270,8 @@ SGIView::Draw(BRect area) float xbold, ybold; xbold = fh.descent + 1; ybold = fh.ascent + fh.descent * 2 + fh.leading; - - const char* text = "SGI Image Translator"; + + const char* text = "SGI image translator"; DrawString(text, BPoint(xbold, ybold)); SetFont(be_plain_font); @@ -279,7 +279,7 @@ SGIView::Draw(BRect area) GetFontHeight(&plainh); float yplain; yplain = plainh.ascent + plainh.descent * 2 + plainh.leading; - + char detail[100]; sprintf(detail, "Version %d.%d.%d %s", static_cast(B_TRANSLATION_MAJOR_VERSION(SGI_TRANSLATOR_VERSION)), @@ -302,7 +302,7 @@ SGIView::Draw(BRect area) text = "based on GIMP SGI plugin v1.5:"; DrawString(text, offset); offset.y += ybold; - + DrawString(kSGICopyright, offset); } diff --git a/src/add-ons/translators/stxt/STXTTranslator.cpp b/src/add-ons/translators/stxt/STXTTranslator.cpp index 299d6ac3b8..48e308a4a3 100644 --- a/src/add-ons/translators/stxt/STXTTranslator.cpp +++ b/src/add-ons/translators/stxt/STXTTranslator.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008, Haiku, Inc. All Rights Reserved. + * Copyright 2002-2009, Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: @@ -1329,7 +1329,7 @@ translate_from_text(BPositionIO* source, const char* encoding, bool forceEncodin STXTTranslator::STXTTranslator() - : BaseTranslator("StyledEdit Files", "StyledEdit files translator", + : BaseTranslator("StyledEdit files", "StyledEdit files translator", STXT_TRANSLATOR_VERSION, gInputFormats, sizeof(gInputFormats) / sizeof(translation_format), gOutputFormats, sizeof(gOutputFormats) / sizeof(translation_format), diff --git a/src/add-ons/translators/stxt/STXTView.cpp b/src/add-ons/translators/stxt/STXTView.cpp index b897d527d9..da4a00d169 100644 --- a/src/add-ons/translators/stxt/STXTView.cpp +++ b/src/add-ons/translators/stxt/STXTView.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2002-2006, Haiku, Inc. + * Copyright 2002-2009, Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT license. * * Authors: @@ -30,7 +30,7 @@ STXTView::STXTView(const BRect &frame, const char *name, uint32 resizeMode, float height = fontHeight.descent + fontHeight.ascent + fontHeight.leading; BRect rect(10, 10, 200, 10 + height); - BStringView *stringView = new BStringView(rect, "title", "StyledEdit Files Translator"); + BStringView *stringView = new BStringView(rect, "title", "StyledEdit files translator"); stringView->SetFont(be_bold_font); stringView->ResizeToPreferred(); AddChild(stringView); diff --git a/src/add-ons/translators/tga/TGATranslator.cpp b/src/add-ons/translators/tga/TGATranslator.cpp index bf0111dcfa..06568d264d 100644 --- a/src/add-ons/translators/tga/TGATranslator.cpp +++ b/src/add-ons/translators/tga/TGATranslator.cpp @@ -7,7 +7,7 @@ // This BTranslator based object is for opening and writing TGA files. // // -// Copyright (c) 2002 Haiku, Inc. +// Copyright (c) 2002-2009, Haiku, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), @@ -131,7 +131,7 @@ make_nth_translator(int32 n, image_id you, uint32 flags, ...) // Returns: // --------------------------------------------------------------- TGATranslator::TGATranslator() - : BaseTranslator("TGA Images", "TGA image translator", + : BaseTranslator("TGA images", "TGA image translator", TGA_TRANSLATOR_VERSION, gInputFormats, sizeof(gInputFormats) / sizeof(translation_format), gOutputFormats, sizeof(gOutputFormats) / sizeof(translation_format), diff --git a/src/add-ons/translators/tga/TGAView.cpp b/src/add-ons/translators/tga/TGAView.cpp index 6316ed894e..66a5a90f36 100644 --- a/src/add-ons/translators/tga/TGAView.cpp +++ b/src/add-ons/translators/tga/TGAView.cpp @@ -55,7 +55,7 @@ TGAView::TGAView(const BRect& frame, const char* name, uint32 resize, fpchkIgnoreAlpha->ResizeToPreferred(); fpchkRLE = new BCheckBox(BRect(10, 67, 180, 84), - "Save with RLE Compression", "Save with RLE Compression", + "Save with RLE compression", "Save with RLE compression", new BMessage(CHANGE_RLE)); val = (fSettings->SetGetBool(TGA_SETTING_RLE)) ? 1 : 0; fpchkRLE->SetValue(val); @@ -114,7 +114,7 @@ TGAView::Draw(BRect area) xbold = fh.descent + 1; ybold = fh.ascent + fh.descent * 2 + fh.leading; - DrawString("TGA Image Translator", BPoint(xbold, ybold)); + DrawString("TGA image translator", BPoint(xbold, ybold)); SetFont(be_plain_font); font_height plainh; @@ -130,6 +130,6 @@ TGAView::Draw(BRect area) __DATE__); DrawString(detail, BPoint(xbold, yplain + ybold)); - DrawString("Written by the Haiku Translation Kit Team", + DrawString("Written by the Haiku Translation Kit team", BPoint(xbold, yplain * 7 + ybold)); } diff --git a/src/add-ons/translators/tiff/TIFFTranslator.cpp b/src/add-ons/translators/tiff/TIFFTranslator.cpp index f3c065dc02..d7207190da 100644 --- a/src/add-ons/translators/tiff/TIFFTranslator.cpp +++ b/src/add-ons/translators/tiff/TIFFTranslator.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2007, Haiku, Inc. All Rights Reserved. + * Copyright 2003-2009, Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: @@ -591,7 +591,7 @@ write_tif_stream(TIFF* tif, BPositionIO* inSource, color_space format, TIFFTranslator::TIFFTranslator() - : BaseTranslator("TIFF Images", "TIFF image translator", + : BaseTranslator("TIFF images", "TIFF image translator", TIFF_TRANSLATOR_VERSION, gInputFormats, sizeof(gInputFormats) / sizeof(translation_format), gOutputFormats, sizeof(gOutputFormats) / sizeof(translation_format), diff --git a/src/add-ons/translators/tiff/TIFFView.cpp b/src/add-ons/translators/tiff/TIFFView.cpp index 0c2c255b82..25c381cf6a 100644 --- a/src/add-ons/translators/tiff/TIFFView.cpp +++ b/src/add-ons/translators/tiff/TIFFView.cpp @@ -13,18 +13,18 @@ // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // -// The above copyright notice and this permission notice shall be included +// The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// 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. /*****************************************************************************/ @@ -99,7 +99,7 @@ TIFFView::TIFFView(const BRect &frame, const char *name, // add_menu_item(menu, COMPRESSION_JP2000, "JPEG2000", currentCompression); fCompressionMF = new BMenuField(BRect(20, 50, 215, 70), "compression", - "Use Compression:", menu, true); + "Use compression:", menu, true); fCompressionMF->ResizeToPreferred(); fCompressionMF->SetDivider( fCompressionMF->StringWidth(fCompressionMF->Label()) + 7); @@ -200,16 +200,16 @@ TIFFView::Draw(BRect area) float xbold, ybold; xbold = fh.descent + 1; ybold = fh.ascent + fh.descent * 2 + fh.leading; - - char title[] = "TIFF Image Translator"; + + char title[] = "TIFF image translator"; DrawString(title, BPoint(xbold, ybold)); - + SetFont(be_plain_font); font_height plainh; GetFontHeight(&plainh); float yplain; yplain = plainh.ascent + plainh.descent * 2 + plainh.leading; - + char detail[100]; sprintf(detail, "Version %d.%d.%d %s", static_cast(B_TRANSLATION_MAJOR_VERSION(TIFF_TRANSLATOR_VERSION)), @@ -217,11 +217,11 @@ TIFFView::Draw(BRect area) static_cast(B_TRANSLATION_REVISION_VERSION(TIFF_TRANSLATOR_VERSION)), __DATE__); DrawString(detail, BPoint(xbold, yplain + ybold)); - + int32 lineno = 6; - DrawString("TIFF Library:", BPoint(xbold, yplain * lineno + ybold)); + DrawString("TIFF library:", BPoint(xbold, yplain * lineno + ybold)); lineno += 2; - + char libtiff[] = TIFFLIB_VERSION_STR; char *tok = strtok(libtiff, "\n"); while (tok) { diff --git a/src/add-ons/translators/wonderbrush/WonderBrushTranslator.cpp b/src/add-ons/translators/wonderbrush/WonderBrushTranslator.cpp index 5170796862..fdb93720a5 100644 --- a/src/add-ons/translators/wonderbrush/WonderBrushTranslator.cpp +++ b/src/add-ons/translators/wonderbrush/WonderBrushTranslator.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2006, Haiku. All rights reserved. + * Copyright 2006-2009, Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: @@ -81,7 +81,7 @@ make_nth_translator(int32 n, image_id you, uint32 flags, ...) WonderBrushTranslator::WonderBrushTranslator() - : BaseTranslator("WonderBrush Images", "WonderBrush image translator", + : BaseTranslator("WonderBrush images", "WonderBrush image translator", WBI_TRANSLATOR_VERSION, gInputFormats, sizeof(gInputFormats) / sizeof(translation_format), gOutputFormats, sizeof(gOutputFormats) / sizeof(translation_format), diff --git a/src/add-ons/translators/wonderbrush/WonderBrushView.cpp b/src/add-ons/translators/wonderbrush/WonderBrushView.cpp index 097dc6efe7..bf8a1088f7 100644 --- a/src/add-ons/translators/wonderbrush/WonderBrushView.cpp +++ b/src/add-ons/translators/wonderbrush/WonderBrushView.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2006, Haiku. All rights reserved. + * Copyright 2006-2009, Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: @@ -52,12 +52,12 @@ WonderBrushView::WonderBrushView(const BRect &frame, const char *name, float xbold, ybold; xbold = fh.descent + 1; ybold = fh.ascent + fh.descent * 2 + fh.leading; - + font_height plainh; be_plain_font->GetHeight(&plainh); float yplain; yplain = plainh.ascent + plainh.descent * 2 + plainh.leading; - + ResizeToPreferred(); } @@ -128,8 +128,8 @@ WonderBrushView::Draw(BRect area) float ybold = fh.ascent + fh.descent * 2 + fh.leading; BPoint offset(xbold, ybold); - - const char* text = "WonderBrush Image Translator"; + + const char* text = "WonderBrush image translator"; DrawString(text, offset); SetFont(be_plain_font); @@ -138,7 +138,7 @@ WonderBrushView::Draw(BRect area) float yplain = plainh.ascent + plainh.descent * 2 + plainh.leading; offset.y += yplain; - + char detail[100]; sprintf(detail, "Version %d.%d.%d %s", static_cast(B_TRANSLATION_MAJOR_VERSION(WBI_TRANSLATOR_VERSION)),