Commit bf682d51 authored by rswindell's avatar rswindell
Browse files

Added "List Active User Records" menu option, utilized to display only

non-deleted and active user records.
Renamed the old "User List" menu option: "List All User Records"
The online help probably needs fixing now: TODO
parent c9e818a3
......@@ -2061,18 +2061,21 @@ int main(int argc, char** argv) {
bail(0);
}
strcpy(mopt[0],"New User");
strcpy(mopt[1],"Find User");
strcpy(mopt[2],"User List");
mopt[3][0]=0;
i=0;
strcpy(mopt[i++],"New User");
strcpy(mopt[i++],"Find User");
strcpy(mopt[i++],"List All User Records");
strcpy(mopt[i++],"List Active User Records");
mopt[i][0]=0;
uifc.helpbuf= "`User Editor\n"
"`-----------\n\n"
"`New User : `Add a new user. This will created a default user using\n"
" some default entries that you can then edit.\n"
"`Find User : `Find a user using full or partial search name\n"
"`User List : `Display the complete User List. Users can be edited from\n"
" this list by highlighting a user and pressing Enter";
"`List All User Records: `Display all user records (including deleted/inactive)\n"
"`List Active User Records: `Display active user records only\n"
" Users can be edited from lists by highlighting a user and pressing ~Enter~";
while(1) {
j=uifc.list(WIN_L2R|WIN_ESC|WIN_ACT|WIN_DYN|WIN_ORG|WIN_EXTKEYS,0,5,0,&main_dflt,&main_bar
......@@ -2110,7 +2113,7 @@ int main(int argc, char** argv) {
finduser(&cfg,&user);
}
if(j==2) {
/* User List */
/* List All Users */
done=0;
while(!done) {
last=lastuser(&cfg);
......@@ -2131,6 +2134,28 @@ int main(int argc, char** argv) {
}
}
}
if(j==3) {
/* List Active Users */
done=0;
while(!done) {
last=lastuser(&cfg);
for(i=1,j=0; i<=last; i++) {
user.number = i;
GETUSERDAT(&cfg, &user);
sprintf(opt[j++], "%-4u %-25.25s %-25.25s", i, user.name, user.alias);
}
opt[j][0] = 0;
i=0;
switch(uifc.list(WIN_ORG|WIN_MID|WIN_ACT,0,0,0,&i,0,"Num Real Name Alias ",opt)) {
case -1:
done = 1;
break;
default:
edit_user(&cfg, atoi(opt[i]));
break;
}
}
}
}
free_opts(opt);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment