1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-23 04:22:48 +02:00

Modified the key shortcuts for the generic file/dir selector class.

This commit is contained in:
Ayla 2011-09-18 03:23:47 +02:00
parent 38cfd321f6
commit 826d622285

View File

@ -65,9 +65,10 @@ int Selector::exec(int startSelection) {
if (link->getSelectorBrowser()) { if (link->getSelectorBrowser()) {
gmenu2x->drawButton(&bg, "start", gmenu2x->tr["Exit"], gmenu2x->drawButton(&bg, "start", gmenu2x->tr["Exit"],
gmenu2x->drawButton(&bg, "b", gmenu2x->tr["Select a file"], gmenu2x->drawButton(&bg, "b", gmenu2x->tr["Select a file"],
gmenu2x->drawButton(&bg, "x", gmenu2x->tr["Up one folder"], 5))); gmenu2x->drawButton(&bg, "a", gmenu2x->tr["Up one folder"],
gmenu2x->drawButton(&bg, "left", "", 5)-10)));
} else { } else {
gmenu2x->drawButton(&bg, "x", gmenu2x->tr["Exit"], gmenu2x->drawButton(&bg, "start", gmenu2x->tr["Exit"],
gmenu2x->drawButton(&bg, "b", gmenu2x->tr["Select a file"], 5)); gmenu2x->drawButton(&bg, "b", gmenu2x->tr["Select a file"], 5));
} }
@ -142,7 +143,8 @@ int Selector::exec(int startSelection) {
else selected += SELECTOR_ELEMENTS-1; else selected += SELECTOR_ELEMENTS-1;
selTick = SDL_GetTicks(); selTick = SDL_GetTicks();
break; break;
case CLEAR: case CANCEL:
case LEFT:
if (link->getSelectorBrowser()) { if (link->getSelectorBrowser()) {
string::size_type p = dir.rfind("/", dir.size()-2); string::size_type p = dir.rfind("/", dir.size()-2);
if (p==string::npos || dir.compare(0, 1, "/") != 0 || dir.length() < 2) { if (p==string::npos || dir.compare(0, 1, "/") != 0 || dir.length() < 2) {
@ -155,9 +157,6 @@ int Selector::exec(int startSelection) {
firstElement = 0; firstElement = 0;
prepare(&fl,&screens,&titles); prepare(&fl,&screens,&titles);
} }
} else {
close = true;
result = false;
} }
break; break;
case ACCEPT: case ACCEPT: