From 84a5d9f6257b4643570be043ceffe19f9862fb9c Mon Sep 17 00:00:00 2001 From: Murai Takashi Date: Fri, 26 Jul 2019 06:38:33 +0900 Subject: [PATCH] Keymap: localize system keymap list Change-Id: Ifd8e7c2b4a8d1f48ce31686b3b653d0304b4c635 Reviewed-on: https://review.haiku-os.org/c/1649 Reviewed-by: waddlesplash --- src/preferences/keymap/KeymapWindow.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/preferences/keymap/KeymapWindow.cpp b/src/preferences/keymap/KeymapWindow.cpp index c78dea386e..c03d75609b 100644 --- a/src/preferences/keymap/KeymapWindow.cpp +++ b/src/preferences/keymap/KeymapWindow.cpp @@ -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(view->ItemAt(i)); - if (current != NULL && fCurrentMapName == current->Text()) { + KeymapListItem* current = + static_cast(view->ItemAt(i)); + if (current != NULL && fCurrentMapName == current->EntryRef().name) { view->Select(i); view->ScrollToSelection(); return true;