diff options
Diffstat (limited to 'apps/plugins/text_editor.c')
-rw-r--r-- | apps/plugins/text_editor.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/plugins/text_editor.c b/apps/plugins/text_editor.c index d95bdb9b81..523cbad30c 100644 --- a/apps/plugins/text_editor.c +++ b/apps/plugins/text_editor.c | |||
@@ -18,6 +18,7 @@ | |||
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | #include "plugin.h" | 19 | #include "plugin.h" |
20 | #include "action.h" | 20 | #include "action.h" |
21 | #include "oldmenuapi.h" | ||
21 | 22 | ||
22 | #if PLUGIN_BUFFER_SIZE > 0x45000 | 23 | #if PLUGIN_BUFFER_SIZE > 0x45000 |
23 | #define MAX_CHARS 0x40000 /* 128 kiB */ | 24 | #define MAX_CHARS 0x40000 /* 128 kiB */ |
@@ -228,10 +229,10 @@ int do_item_menu(int cur_sel, char* copy_buffer) | |||
228 | { "", NULL }, | 229 | { "", NULL }, |
229 | { "Save", NULL }, | 230 | { "Save", NULL }, |
230 | }; | 231 | }; |
231 | m = rb->menu_init(items, sizeof(items) / sizeof(*items), | 232 | m = menu_init(rb, items, sizeof(items) / sizeof(*items), |
232 | NULL, NULL, NULL, NULL); | 233 | NULL, NULL, NULL, NULL); |
233 | 234 | ||
234 | switch (rb->menu_show(m)) | 235 | switch (menu_show(m)) |
235 | { | 236 | { |
236 | case 0: /* cut */ | 237 | case 0: /* cut */ |
237 | rb->strcpy(copy_buffer,&buffer[do_action(ACTION_GET,0,cur_sel)]); | 238 | rb->strcpy(copy_buffer,&buffer[do_action(ACTION_GET,0,cur_sel)]); |
@@ -279,7 +280,7 @@ int do_item_menu(int cur_sel, char* copy_buffer) | |||
279 | ret = MENU_RET_NO_UPDATE; | 280 | ret = MENU_RET_NO_UPDATE; |
280 | break; | 281 | break; |
281 | } | 282 | } |
282 | rb->menu_exit(m); | 283 | menu_exit(m); |
283 | return ret; | 284 | return ret; |
284 | } | 285 | } |
285 | /* this is the plugin entry point */ | 286 | /* this is the plugin entry point */ |
@@ -409,10 +410,10 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
409 | { "Ignore Changes and Exit", NULL }, | 410 | { "Ignore Changes and Exit", NULL }, |
410 | }; | 411 | }; |
411 | 412 | ||
412 | m = rb->menu_init(items, sizeof(items) / sizeof(*items), | 413 | m = menu_init(rb, items, sizeof(items) / sizeof(*items), |
413 | NULL, NULL, NULL, NULL); | 414 | NULL, NULL, NULL, NULL); |
414 | 415 | ||
415 | result=rb->menu_show(m); | 416 | result=menu_show(m); |
416 | 417 | ||
417 | switch (result) | 418 | switch (result) |
418 | { | 419 | { |
@@ -435,7 +436,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
435 | exit=1; | 436 | exit=1; |
436 | break; | 437 | break; |
437 | } | 438 | } |
438 | rb->menu_exit(m); | 439 | menu_exit(m); |
439 | } | 440 | } |
440 | else exit=1; | 441 | else exit=1; |
441 | break; | 442 | break; |