8383#define MENU_STR_SELECT MK_MENU (" Select All" , " ^a" )
8484#define MENU_STR_OFF " OFF"
8585#define MENU_STR_ON " ON"
86+ #define MENU_STR_EXT " SYSTEM"
8687#define MENU_STR_AUDIO " Audio [%s] "
8788#define MENU_STR_EDITOR " Editor [%s] "
8889#define MENU_STR_THEME " Theme [%s] "
@@ -414,7 +415,8 @@ void System::handleMenu(MAEvent &event) {
414415 }
415416 break ;
416417 case MENU_EDITMODE:
417- opt_ide = (opt_ide == IDE_NONE ? IDE_INTERNAL : IDE_NONE);
418+ opt_ide = (opt_ide == IDE_NONE ? IDE_INTERNAL :
419+ opt_ide == IDE_INTERNAL ? IDE_EXTERNAL : IDE_NONE);
418420 break ;
419421 case MENU_THEME:
420422 g_themeId = (g_themeId + 1 ) % NUM_THEMES;
@@ -1072,7 +1074,9 @@ void System::showMenu() {
10721074 items->add (new String (MENU_STR_DEBUG));
10731075 items->add (new String (MENU_STR_OUTPUT));
10741076#elif defined(_ANDROID)
1075- items->add (new String (MENU_STR_FIND));
1077+ if (opt_ide == IDE_INTERNAL) {
1078+ items->add (new String (MENU_STR_FIND));
1079+ }
10761080#endif
10771081 items->add (new String (MENU_STR_HELP));
10781082 for (int i = 0 ; i < completions; i++) {
@@ -1090,7 +1094,9 @@ void System::showMenu() {
10901094 _systemMenu[index++] = MENU_DEBUG;
10911095 _systemMenu[index++] = MENU_OUTPUT;
10921096#elif defined(_ANDROID)
1093- _systemMenu[index++] = MENU_FIND;
1097+ if (opt_ide == IDE_INTERNAL) {
1098+ _systemMenu[index++] = MENU_FIND;
1099+ }
10941100#endif
10951101 _systemMenu[index++] = MENU_HELP;
10961102 } else if (isRunning ()) {
@@ -1107,9 +1113,11 @@ void System::showMenu() {
11071113 items->add (new String (MENU_STR_BACK));
11081114 _systemMenu[index++] = MENU_BACK;
11091115#else
1110- if (!isEditing ()) {
1116+ if (!isEditing () || opt_ide == IDE_EXTERNAL ) {
11111117 items->add (new String (MENU_STR_KEYPAD));
11121118 _systemMenu[index++] = MENU_KEYPAD;
1119+ }
1120+ if (!isEditing ()) {
11131121 bool controlMode = get_focus_edit ()->getControlMode ();
11141122 sprintf (buffer, MENU_STR_CONTROL, (controlMode ? MENU_STR_ON : MENU_STR_OFF));
11151123 items->add (new String (buffer));
@@ -1141,7 +1149,17 @@ void System::showMenu() {
11411149 _systemMenu[index++] = MENU_ZOOM_DN;
11421150#endif
11431151#if !defined(_ANDROID_LIBRARY)
1144- sprintf (buffer, MENU_STR_EDITOR, opt_ide == IDE_NONE ? MENU_STR_OFF : MENU_STR_ON);
1152+ switch (opt_ide) {
1153+ case IDE_NONE:
1154+ sprintf (buffer, MENU_STR_EDITOR, MENU_STR_OFF);
1155+ break ;
1156+ case IDE_INTERNAL:
1157+ sprintf (buffer, MENU_STR_EDITOR, MENU_STR_ON);
1158+ break ;
1159+ case IDE_EXTERNAL:
1160+ sprintf (buffer, MENU_STR_EDITOR, MENU_STR_EXT);
1161+ break ;
1162+ }
11451163 items->add (new String (buffer));
11461164 _systemMenu[index++] = MENU_EDITMODE;
11471165#endif
0 commit comments