Re #307 Fixed GCC warning about a possible crash when calling help menu when no keyboard shortcut is defined

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@4699 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 7b555242b91228ecefcb7608115272d515f0fa49
Former-commit-id: b50e9d0d75457d763c7a639c7c06feccd0f34573
This commit is contained in:
pouillot 2012-04-14 09:54:25 +00:00
parent 671eec41f7
commit 2df69cbda5

View file

@ -92,44 +92,44 @@ GfuiHelpScreen(void *targetScreen, void *returnScreen)
tGfuiScreen *pscrTgt = (tGfuiScreen*)targetScreen; tGfuiScreen *pscrTgt = (tGfuiScreen*)targetScreen;
tGfuiKey *curKey = pscrTgt->userKeys; tGfuiKey *curKey = pscrTgt->userKeys;
do { while (curKey)
{
curKey = curKey->next;
// Decide if this key goes on the left of right column. // Decide if this key goes on the left of right column.
bool bLeft; bool bLeft;
if (curKey) { switch(curKey->key) {
curKey = curKey->next; case GFUIK_BACKSPACE:
switch(curKey->key) { case GFUIK_F1:
case GFUIK_BACKSPACE: case GFUIK_F2:
case GFUIK_F1: case GFUIK_F3:
case GFUIK_F2: case GFUIK_F4:
case GFUIK_F3: case GFUIK_F5:
case GFUIK_F4: case GFUIK_F6:
case GFUIK_F5: case GFUIK_F7:
case GFUIK_F6: case GFUIK_F8:
case GFUIK_F7: case GFUIK_F9:
case GFUIK_F8: case GFUIK_F10:
case GFUIK_F9: case GFUIK_F11:
case GFUIK_F10: case GFUIK_F12:
case GFUIK_F11: case GFUIK_LEFT:
case GFUIK_F12: case GFUIK_UP:
case GFUIK_LEFT: case GFUIK_RIGHT:
case GFUIK_UP: case GFUIK_DOWN:
case GFUIK_RIGHT: case GFUIK_PAGEUP:
case GFUIK_DOWN: case GFUIK_PAGEDOWN:
case GFUIK_PAGEUP: case GFUIK_HOME:
case GFUIK_PAGEDOWN: case GFUIK_END:
case GFUIK_HOME: case GFUIK_INSERT:
case GFUIK_END: case GFUIK_DELETE:
case GFUIK_INSERT: case GFUIK_CLEAR:
case GFUIK_DELETE: case GFUIK_PAUSE:
case GFUIK_CLEAR: bLeft = true;
case GFUIK_PAUSE: break;
bLeft = true;
break;
default: default:
bLeft = curKey->modifier != GFUIM_NONE; bLeft = curKey->modifier != GFUIM_NONE;
break; break;
}
} }
// Determine control coordinates, whether left or right column. // Determine control coordinates, whether left or right column.
@ -157,7 +157,7 @@ GfuiHelpScreen(void *targetScreen, void *returnScreen)
if (curKey == pscrTgt->userKeys) if (curKey == pscrTgt->userKeys)
curKey = (tGfuiKey*)NULL; curKey = (tGfuiKey*)NULL;
} while (curKey); }
// Create Back button. // Create Back button.