only chooses alpha characters for menu triggers
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20385 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
4d7c45a7f1
commit
80a1eea587
@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include <new>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <Debug.h>
|
||||
@ -2089,7 +2090,8 @@ BMenu::ChooseTrigger(const char *title, BList *chars)
|
||||
char trigger;
|
||||
// TODO: Oh great, reinterpret_cast all around
|
||||
while ((trigger = title[0]) != '\0') {
|
||||
if (!chars->HasItem(reinterpret_cast<void *>((uint32)trigger))) {
|
||||
if (isalpha(trigger)
|
||||
&& !chars->HasItem(reinterpret_cast<void *>((uint32)trigger))) {
|
||||
chars->AddItem(reinterpret_cast<void *>((uint32)trigger));
|
||||
return title;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user