summaryrefslogtreecommitdiff
path: root/apps/plugins/rb_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/rb_info.c')
-rw-r--r--apps/plugins/rb_info.c35
1 files changed, 21 insertions, 14 deletions
diff --git a/apps/plugins/rb_info.c b/apps/plugins/rb_info.c
index f123a623d2..a89cc658cc 100644
--- a/apps/plugins/rb_info.c
+++ b/apps/plugins/rb_info.c
@@ -335,6 +335,17 @@ static int list_voice_cb(int list_index, void* data)
335 rb->talk_spell(name, true); 335 rb->talk_spell(name, true);
336 } 336 }
337 } 337 }
338 else if (data == MENU_ID(M_TESTPUT))
339 {
340 char buf[64];
341 const char* name = printcell_get_column_text(printcell_get_column_selected(),
342 buf, sizeof(buf));
343 long id = P2ID((const unsigned char *)name);
344 if(id>=0)
345 rb->talk_id(id, true);
346 else
347 rb->talk_spell(name, true);
348 }
338 else 349 else
339 { 350 {
340 char buf[64]; 351 char buf[64];
@@ -354,12 +365,12 @@ int menu_action_cb(int *action, int selected_item, bool* exit, struct gui_syncli
354 { 365 {
355 if (*action == ACTION_STD_OK) 366 if (*action == ACTION_STD_OK)
356 { 367 {
357 printcell_increment_column(lists, 1, true); 368 printcell_increment_column(1, true);
358 *action = ACTION_NONE; 369 *action = ACTION_NONE;
359 } 370 }
360 else if (*action == ACTION_STD_CANCEL) 371 else if (*action == ACTION_STD_CANCEL)
361 { 372 {
362 if (printcell_increment_column(lists, -1, true) != testput_cols - 1) 373 if (printcell_increment_column(-1, true) != testput_cols - 1)
363 { 374 {
364 *action = ACTION_NONE; 375 *action = ACTION_NONE;
365 } 376 }
@@ -368,7 +379,8 @@ int menu_action_cb(int *action, int selected_item, bool* exit, struct gui_syncli
368 { 379 {
369 char buf[PRINTCELL_MAXLINELEN]; 380 char buf[PRINTCELL_MAXLINELEN];
370 char* bufp = buf; 381 char* bufp = buf;
371 bufp = printcell_get_selected_column_text(lists, bufp, PRINTCELL_MAXLINELEN); 382 int selcol = printcell_get_column_selected();
383 bufp = printcell_get_column_text(selcol, bufp, PRINTCELL_MAXLINELEN);
372 rb->splashf(HZ * 2, "Item: %s", bufp); 384 rb->splashf(HZ * 2, "Item: %s", bufp);
373 } 385 }
374 } 386 }
@@ -429,18 +441,12 @@ int menu_action_cb(int *action, int selected_item, bool* exit, struct gui_syncli
429 if (cur->menuid == MENU_ID(M_TESTPUT)) 441 if (cur->menuid == MENU_ID(M_TESTPUT))
430 { 442 {
431 synclist_set(cur->menuid, 0, cur->items, 1); 443 synclist_set(cur->menuid, 0, cur->items, 1);
432#if LCD_DEPTH > 1 444 printcell_enable(true);
433 /* If line sep is set to automatic then outline cells */
434 bool showlinesep = (rb->global_settings->list_separator_height < 0);
435#else
436 bool showlinesep = (rb->global_settings->cursor_style == 0);
437#endif
438 printcell_enable(lists, true, showlinesep);
439 //lists->callback_draw_item = test_listdraw_fn; 445 //lists->callback_draw_item = test_listdraw_fn;
440 } 446 }
441 else 447 else
442 { 448 {
443 printcell_enable(lists, false, false); 449 printcell_enable(false);
444 synclist_set(cur->menuid, 1, cur->items, 1); 450 synclist_set(cur->menuid, 1, cur->items, 1);
445 } 451 }
446 rb->gui_synclist_draw(lists); 452 rb->gui_synclist_draw(lists);
@@ -473,7 +479,7 @@ int menu_action_cb(int *action, int selected_item, bool* exit, struct gui_syncli
473 if (lists->data == MENU_ID(M_TESTPUT)) 479 if (lists->data == MENU_ID(M_TESTPUT))
474 { 480 {
475 //lists->callback_draw_item = NULL; 481 //lists->callback_draw_item = NULL;
476 printcell_enable(lists, false, false); 482 printcell_enable(false);
477 } 483 }
478 if (lists->data != MENU_ID(M_ROOT)) 484 if (lists->data != MENU_ID(M_ROOT))
479 { 485 {
@@ -505,7 +511,8 @@ static void synclist_set(char* menu_id, int selected_item, int items, int sel_si
505 menu_id, false, sel_size, NULL); 511 menu_id, false, sel_size, NULL);
506 if (menu_id == MENU_ID(M_TESTPUT)) 512 if (menu_id == MENU_ID(M_TESTPUT))
507 { 513 {
508 testput_cols = printcell_set_columns(&lists, TESTPUT_HEADER, Icon_Rockbox); 514 testput_cols = printcell_set_columns(&lists, NULL,
515 TESTPUT_HEADER, Icon_Rockbox);
509 } 516 }
510 else 517 else
511 { 518 {
@@ -562,6 +569,6 @@ enum plugin_status plugin_start(const void* parameter)
562 selected_item = rb->gui_synclist_get_sel_pos(&lists); 569 selected_item = rb->gui_synclist_get_sel_pos(&lists);
563 } 570 }
564 } 571 }
565 572 printcell_enable(false);
566 return ret; 573 return ret;
567} 574}