Allow specifying any button (not just 1-5).

SVN revision: 21184
This commit is contained in:
Kim Woelders 2006-03-11 08:43:15 +00:00
parent 2bc00029e7
commit 36bf938d9a
1 changed files with 7 additions and 21 deletions

View File

@ -27,6 +27,7 @@
#include "e16-ecore_list.h"
#include "emodule.h"
#include "ewins.h"
#include <ctype.h>
typedef struct _actiontype
{
@ -580,27 +581,12 @@ ActionDecode(const char *line)
case EVENT_DOUBLE_DOWN:
case EVENT_MOUSE_ENTER:
case EVENT_MOUSE_LEAVE:
switch (key[0])
{
case '*':
anybut = 1;
break;
case '1':
button = 1;
break;
case '2':
button = 2;
break;
case '3':
button = 3;
break;
case '4':
button = 4;
break;
case '5':
button = 5;
break;
}
if (key[0] == '*')
anybut = 1;
else if (isdigit(key[0]))
button = atoi(key);
if (!anybut && button == 0)
return NULL; /* Invalid */
key[0] = '\0';
break;
}