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:
@@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
|
#include <ctype.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <Debug.h>
|
#include <Debug.h>
|
||||||
@@ -2089,7 +2090,8 @@ BMenu::ChooseTrigger(const char *title, BList *chars)
|
|||||||
char trigger;
|
char trigger;
|
||||||
// TODO: Oh great, reinterpret_cast all around
|
// TODO: Oh great, reinterpret_cast all around
|
||||||
while ((trigger = title[0]) != '\0') {
|
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));
|
chars->AddItem(reinterpret_cast<void *>((uint32)trigger));
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user