mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-25 14:06:27 +00:00
Make menuselect be able to show what the modules are
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -128,6 +128,7 @@ void draw_category_menu(WINDOW *menu, struct category *cat, int start, int end,
|
||||
int j = 0;
|
||||
struct member *mem;
|
||||
char buf[64];
|
||||
char *desc = NULL;
|
||||
|
||||
wclear(menu);
|
||||
|
||||
@@ -142,11 +143,17 @@ void draw_category_menu(WINDOW *menu, struct category *cat, int start, int end,
|
||||
snprintf(buf, sizeof(buf), "XXX %d.%s %s", i, i < 10 ? " " : "", mem->name);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), "[%s] %d.%s %s", mem->enabled ? "*" : " ", i, i < 10 ? " " : "", mem->name);
|
||||
if (curopt + 1== i)
|
||||
desc = mem->displayname;
|
||||
waddstr(menu, buf);
|
||||
if (i == end)
|
||||
break;
|
||||
}
|
||||
|
||||
if (desc) {
|
||||
wmove(menu, end - start + 2, max_x / 2 - 16);
|
||||
waddstr(menu, desc);
|
||||
}
|
||||
wmove(menu, curopt - start, max_x / 2 - 9);
|
||||
|
||||
wrefresh(menu);
|
||||
@@ -157,7 +164,7 @@ int run_category_menu(WINDOW *menu, int cat_num)
|
||||
struct category *cat;
|
||||
int i = 0;
|
||||
int start = 0;
|
||||
int end = max_y - TITLE_HEIGHT - 2;
|
||||
int end = max_y - TITLE_HEIGHT - 6;
|
||||
int c;
|
||||
int curopt = 0;
|
||||
int maxopt;
|
||||
|
||||
Reference in New Issue
Block a user