treeview.c (251843) | treeview.c (255852) |
---|---|
1/* | 1/* |
2 * $Id: treeview.c,v 1.22 2013/05/23 23:35:46 tom Exp $ | 2 * $Id: treeview.c,v 1.24 2013/09/02 17:13:33 tom Exp $ |
3 * 4 * treeview.c -- implements the treeview dialog 5 * 6 * Copyright 2012,2013 Thomas E. Dickey 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU Lesser General Public License, version 2.1 10 * as published by the Free Software Foundation. --- 563 unchanged lines hidden (view full) --- 574 int flag) 575{ 576 int result; 577 int i, j; 578 DIALOG_LISTITEM *listitems; 579 int *depths; 580 bool show_status = FALSE; 581 int current = 0; | 3 * 4 * treeview.c -- implements the treeview dialog 5 * 6 * Copyright 2012,2013 Thomas E. Dickey 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU Lesser General Public License, version 2.1 10 * as published by the Free Software Foundation. --- 563 unchanged lines hidden (view full) --- 574 int flag) 575{ 576 int result; 577 int i, j; 578 DIALOG_LISTITEM *listitems; 579 int *depths; 580 bool show_status = FALSE; 581 int current = 0; |
582 char *help_result; |
|
582 583 listitems = dlg_calloc(DIALOG_LISTITEM, (size_t) item_no + 1); 584 assert_ptr(listitems, "dialog_treeview"); 585 586 depths = dlg_calloc(int, (size_t) item_no + 1); 587 assert_ptr(depths, "dialog_treeview"); 588 589 for (i = j = 0; i < item_no; ++i) { --- 22 unchanged lines hidden (view full) --- 612 ¤t); 613 614 switch (result) { 615 case DLG_EXIT_OK: /* FALLTHRU */ 616 case DLG_EXIT_EXTRA: 617 show_status = TRUE; 618 break; 619 case DLG_EXIT_HELP: | 583 584 listitems = dlg_calloc(DIALOG_LISTITEM, (size_t) item_no + 1); 585 assert_ptr(listitems, "dialog_treeview"); 586 587 depths = dlg_calloc(int, (size_t) item_no + 1); 588 assert_ptr(depths, "dialog_treeview"); 589 590 for (i = j = 0; i < item_no; ++i) { --- 22 unchanged lines hidden (view full) --- 613 ¤t); 614 615 switch (result) { 616 case DLG_EXIT_OK: /* FALLTHRU */ 617 case DLG_EXIT_EXTRA: 618 show_status = TRUE; 619 break; 620 case DLG_EXIT_HELP: |
620 dlg_add_result("HELP "); 621 show_status = dialog_vars.help_status; 622 if (USE_ITEM_HELP(listitems[current].help)) { 623 if (show_status) { 624 if (dialog_vars.separate_output) { 625 dlg_add_string(listitems[current].help); 626 dlg_add_separator(); 627 } else { 628 dlg_add_quoted(listitems[current].help); 629 } | 621 dlg_add_help_listitem(&result, &help_result, &listitems[current]); 622 if ((show_status = dialog_vars.help_status)) { 623 if (dialog_vars.separate_output) { 624 dlg_add_string(help_result); 625 dlg_add_separator(); |
630 } else { | 626 } else { |
631 dlg_add_string(listitems[current].help); | 627 dlg_add_quoted(help_result); |
632 } | 628 } |
633 result = DLG_EXIT_ITEM_HELP; | |
634 } else { | 629 } else { |
635 if (show_status) { 636 if (dialog_vars.separate_output) { 637 dlg_add_string(listitems[current].name); 638 dlg_add_separator(); 639 } else { 640 dlg_add_quoted(listitems[current].name); 641 } 642 } else { 643 dlg_add_string(listitems[current].name); 644 } | 630 dlg_add_string(help_result); |
645 } 646 break; 647 } 648 649 if (show_status) { 650 for (i = 0; i < item_no; i++) { 651 if (listitems[i].state) { 652 if (dialog_vars.separate_output) { --- 20 unchanged lines hidden --- | 631 } 632 break; 633 } 634 635 if (show_status) { 636 for (i = 0; i < item_no; i++) { 637 if (listitems[i].state) { 638 if (dialog_vars.separate_output) { --- 20 unchanged lines hidden --- |