Keymap: localize system keymap list

Change-Id: Ifd8e7c2b4a8d1f48ce31686b3b653d0304b4c635
Reviewed-on: https://review.haiku-os.org/c/1649
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Murai Takashi
2019-07-27 15:14:56 +00:00
committed by waddlesplash
parent 490df7cbfd
commit 84a5d9f625
+6 -3
View File
@@ -925,7 +925,9 @@ KeymapWindow::_FillSystemMaps()
if (directory.SetTo(path.Path()) == B_OK) {
while (directory.GetNextRef(&ref) == B_OK) {
fSystemListView->AddItem(
new KeymapListItem(ref, B_TRANSLATE_NOCOLLECT(ref.name)));
new KeymapListItem(ref,
B_TRANSLATE_NOCOLLECT_ALL((ref.name),
"KeymapNames", NULL)));
}
}
@@ -1017,8 +1019,9 @@ KeymapWindow::_SelectCurrentMap(BListView* view)
return false;
for (int32 i = 0; i < view->CountItems(); i++) {
BStringItem* current = dynamic_cast<BStringItem *>(view->ItemAt(i));
if (current != NULL && fCurrentMapName == current->Text()) {
KeymapListItem* current =
static_cast<KeymapListItem *>(view->ItemAt(i));
if (current != NULL && fCurrentMapName == current->EntryRef().name) {
view->Select(i);
view->ScrollToSelection();
return true;