aboutsummaryrefslogtreecommitdiffstats
path: root/build_tools
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-09 08:44:50 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-09 08:44:50 +0000
commit46abbe97e48ca74be0b83e143f9ec91de3012cd2 (patch)
tree0f59c51a8ce2fb3064c944bf80bd43f2289b0662 /build_tools
parent5617675f5a1a190ca14fdc3591015266c2547ece (diff)
Make menuselect be able to show what the modules are
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@25929 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'build_tools')
-rw-r--r--build_tools/menuselect.c1
-rw-r--r--build_tools/menuselect.h2
-rw-r--r--build_tools/menuselect_curses.c9
3 files changed, 11 insertions, 1 deletions
diff --git a/build_tools/menuselect.c b/build_tools/menuselect.c
index 16570d867..b3400ffb8 100644
--- a/build_tools/menuselect.c
+++ b/build_tools/menuselect.c
@@ -206,6 +206,7 @@ static int parse_makeopts_xml(const char *makeopts_xml)
return -1;
mem->name = mxmlElementGetAttr(cur2, "name");
+ mem->displayname = mxmlElementGetAttr(cur2, "displayname");
if (!cat->positive_output)
mem->enabled = 1;
diff --git a/build_tools/menuselect.h b/build_tools/menuselect.h
index 4db045da1..5fc34d049 100644
--- a/build_tools/menuselect.h
+++ b/build_tools/menuselect.h
@@ -37,6 +37,8 @@ struct conflict;
struct member {
/*! What will be sent to the makeopts file */
const char *name;
+ /*! Display name if known */
+ const char *displayname;
/*! Default setting */
const char *defaultenabled;
/*! This module is currently selected */
diff --git a/build_tools/menuselect_curses.c b/build_tools/menuselect_curses.c
index 84e85861f..13fc86eb5 100644
--- a/build_tools/menuselect_curses.c
+++ b/build_tools/menuselect_curses.c
@@ -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;