Some more code style corrections of Keymap.

This commit is contained in:
Humdinger
2014-01-03 19:44:12 +01:00
parent 7727da7d3d
commit f6c5dbf81c
6 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -99,7 +99,7 @@ KeyboardLayout::DefaultKeySize()
int32 int32
KeyboardLayout::IndexForModifier(int32 modifier) KeyboardLayout::IndexForModifier(int32 modifier)
{ {
switch(modifier) { switch (modifier) {
case B_CAPS_LOCK: case B_CAPS_LOCK:
return 58; return 58;
case B_NUM_LOCK: case B_NUM_LOCK:
+2 -2
View File
@@ -28,7 +28,7 @@ static const uint32 kModifierKeys = B_SHIFT_KEY | B_CAPS_LOCK | B_CONTROL_KEY
static void static void
print_key(char *chars, int32 offset, bool last = false) print_key(char* chars, int32 offset, bool last = false)
{ {
int size = chars[offset++]; int size = chars[offset++];
@@ -46,7 +46,7 @@ print_key(char *chars, int32 offset, bool last = false)
default: default:
{ {
// 2-, 3-, or 4-byte UTF-8 character // 2-, 3-, or 4-byte UTF-8 character
char *str = new char[size + 1]; char* str = new char[size + 1];
strncpy(str, &chars[offset], size); strncpy(str, &chars[offset], size);
str[size] = 0; str[size] = 0;
fputs(str, stdout); fputs(str, stdout);
+2 -2
View File
@@ -466,8 +466,8 @@ KeymapWindow::_CreateMenu()
for (int32 i = 0; i < numFamilies; i++) { for (int32 i = 0; i < numFamilies; i++) {
if (get_font_family(i, &family, &flags) == B_OK) { if (get_font_family(i, &family, &flags) == B_OK) {
BMenuItem* item = BMenuItem* item
new BMenuItem(family, new BMessage(kMsgMenuFontChanged)); = new BMenuItem(family, new BMessage(kMsgMenuFontChanged));
fFontMenu->AddItem(item); fFontMenu->AddItem(item);
if (!strcmp(family, currentFamily)) if (!strcmp(family, currentFamily))
+1 -1
View File
@@ -63,7 +63,7 @@ protected:
status_t _GetCurrentKeymap(entry_ref& ref); status_t _GetCurrentKeymap(entry_ref& ref);
BString _GetActiveKeymapName(); BString _GetActiveKeymapName();
bool _SelectCurrentMap(BListView *list); bool _SelectCurrentMap(BListView* list);
void _SelectCurrentMap(); void _SelectCurrentMap();
status_t _GetSettings(BFile& file, int mode) const; status_t _GetSettings(BFile& file, int mode) const;
@@ -729,7 +729,7 @@ ModifierKeysWindow::_DuplicateKeys()
uint32 left = 0; uint32 left = 0;
uint32 right = 0; uint32 right = 0;
switch(key) { switch (key) {
case MENU_ITEM_SHIFT: case MENU_ITEM_SHIFT:
left = fCurrentMap->left_shift_key; left = fCurrentMap->left_shift_key;
right = fCurrentMap->right_shift_key; right = fCurrentMap->right_shift_key;