mbsetup fixes for nodes edit and lots of filegroups
This commit is contained in:
parent
dbd6db000b
commit
eed70a8bff
@ -4322,7 +4322,9 @@ v0.33.19 26-Oct-2001
|
|||||||
contains the % character.
|
contains the % character.
|
||||||
In several menus after leaving a edit record records were
|
In several menus after leaving a edit record records were
|
||||||
displayed from start again, now shows last screen.
|
displayed from start again, now shows last screen.
|
||||||
|
When editing a node's connected file/mail groups it can now
|
||||||
|
handle more then 40 groups without messing up the screen.
|
||||||
|
|
||||||
mbsebbs:
|
mbsebbs:
|
||||||
Added menu 317, change FS editor shortcut keys to (Emacs/
|
Added menu 317, change FS editor shortcut keys to (Emacs/
|
||||||
Wordstar) style. This has no effect on the editor for now.
|
Wordstar) style. This has no effect on the editor for now.
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* File ..................: grlist.c
|
* $Id$
|
||||||
* Purpose ...............: Group Listing utils
|
* Purpose ...............: Group Listing utils
|
||||||
* Last modification date : 27-Nov-2000
|
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2000
|
* Copyright (C) 1997-2002
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -121,7 +120,7 @@ int compgroup(gr_list **fdp1, gr_list **fdp2)
|
|||||||
|
|
||||||
int E_Group(gr_list **fdp, char *title)
|
int E_Group(gr_list **fdp, char *title)
|
||||||
{
|
{
|
||||||
int n = 0, i, j, x, y, rc = FALSE;
|
int o = 0, n = 0, i, j, x, y, rc = FALSE;
|
||||||
gr_list *tmp;
|
gr_list *tmp;
|
||||||
|
|
||||||
clr_index();
|
clr_index();
|
||||||
@ -139,37 +138,56 @@ int E_Group(gr_list **fdp, char *title)
|
|||||||
j = 0;
|
j = 0;
|
||||||
|
|
||||||
for (tmp = *fdp; tmp; tmp = tmp->next) {
|
for (tmp = *fdp; tmp; tmp = tmp->next) {
|
||||||
j++;
|
j++;
|
||||||
|
if ((j >= (o + 1)) && (j < (o + 41))) {
|
||||||
if (tmp->tagged)
|
if (tmp->tagged)
|
||||||
mvprintw(y, x, (char *)"%2d. + %s", j, tmp->group);
|
mvprintw(y, x, (char *)"%2d. + %s", j, tmp->group);
|
||||||
else
|
else
|
||||||
mvprintw(y, x, (char *)"%2d. %s", j, tmp->group);
|
mvprintw(y, x, (char *)"%2d. %s", j, tmp->group);
|
||||||
y++;
|
y++;
|
||||||
if (y == 18) {
|
if (y == 17) {
|
||||||
y = 7;
|
y = 7;
|
||||||
x += 20;
|
x += 20;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
i = select_tag(n);
|
i = select_tag(n);
|
||||||
|
|
||||||
if (i == 0) {
|
switch (i) {
|
||||||
clr_index();
|
case 0: clr_index();
|
||||||
return rc;
|
return rc;
|
||||||
}
|
break;
|
||||||
|
case -2: if ((o - 40) >= 0) {
|
||||||
if ((i >= 1) && (i <= n)) {
|
clr_index();
|
||||||
j = 0;
|
set_color(WHITE, BLACK);
|
||||||
rc = TRUE;
|
mvprintw(5, 5, (char *)"%s", title);
|
||||||
for (tmp = *fdp; tmp; tmp = tmp->next) {
|
set_color(CYAN, BLACK);
|
||||||
j++;
|
o -= 40;
|
||||||
if (j == i) {
|
|
||||||
if (tmp->tagged)
|
|
||||||
tmp->tagged = FALSE;
|
|
||||||
else
|
|
||||||
tmp->tagged = TRUE;
|
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
|
case -1: if ((o + 40) < n) {
|
||||||
|
clr_index();
|
||||||
|
set_color(WHITE, BLACK);
|
||||||
|
mvprintw(5, 5, (char *)"%s", title);
|
||||||
|
set_color(CYAN, BLACK);
|
||||||
|
o += 40;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default: if ((i >= 1) && (i <= n)) {
|
||||||
|
j = 0;
|
||||||
|
rc = TRUE;
|
||||||
|
for (tmp = *fdp; tmp; tmp = tmp->next) {
|
||||||
|
j++;
|
||||||
|
if (j == i) {
|
||||||
|
if (tmp->tagged)
|
||||||
|
tmp->tagged = FALSE;
|
||||||
|
else
|
||||||
|
tmp->tagged = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -455,7 +455,7 @@ char *select_pick(int max, int items)
|
|||||||
if (max == 0)
|
if (max == 0)
|
||||||
sprintf(help, "Select ^\"-\"^ for previous level");
|
sprintf(help, "Select ^\"-\"^ for previous level");
|
||||||
else
|
else
|
||||||
if (max > 20)
|
if (max > items)
|
||||||
sprintf(help, "Record (1..%d), ^\"-\"^ prev. level, ^\"P\" or \"N\"^ to page", max);
|
sprintf(help, "Record (1..%d), ^\"-\"^ prev. level, ^\"P\" or \"N\"^ to page", max);
|
||||||
else
|
else
|
||||||
sprintf(help, "Select record (1..%d), ^\"-\"^ for previous level", max);
|
sprintf(help, "Select record (1..%d), ^\"-\"^ for previous level", max);
|
||||||
@ -515,21 +515,35 @@ int select_menu_sub(int max, char *hlp)
|
|||||||
char help[80];
|
char help[80];
|
||||||
int pick;
|
int pick;
|
||||||
|
|
||||||
sprintf(help, "%s (1..%d) or ^\"-\"^ for previous level.", hlp, max);
|
if (max == 0)
|
||||||
|
sprintf(help, "Select ^\"-\"^ for previous level");
|
||||||
|
else
|
||||||
|
if (max > 40)
|
||||||
|
sprintf(help, "%s (1..%d), ^\"-\"^ prev. level, ^\"P\" or \"N\"^ to page", hlp, max);
|
||||||
|
else
|
||||||
|
sprintf(help, "%s (1..%d), ^\"-\"^ for previous level", hlp, max);
|
||||||
showhelp(help);
|
showhelp(help);
|
||||||
|
|
||||||
/* Loop forever until it's right.
|
/*
|
||||||
|
* Loop forever until it's right.
|
||||||
*/
|
*/
|
||||||
for (;;) {
|
for (;;) {
|
||||||
mvprintw(LINES - 3, 6, "Enter your choice >");
|
mvprintw(LINES - 3, 6, "Enter your choice >");
|
||||||
menu = (char *)"-";
|
menu = (char *)"-";
|
||||||
menu = edit_field(LINES - 3, 26, 3, '9', menu);
|
menu = edit_field(LINES - 3, 26, 3, '!', menu);
|
||||||
locate(LINES -3, 6);
|
locate(LINES -3, 6);
|
||||||
clrtoeol();
|
clrtoeol();
|
||||||
|
|
||||||
if (strncmp(menu, "-", 1) == 0)
|
if (strncmp(menu, "-", 1) == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (max > 40) {
|
||||||
|
if (strncmp(menu, "N", 1) == 0)
|
||||||
|
return -1;
|
||||||
|
if (strncmp(menu, "P", 1) == 0)
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
pick = atoi(menu);
|
pick = atoi(menu);
|
||||||
if ((pick >= 1) && (pick <= max))
|
if ((pick >= 1) && (pick <= max))
|
||||||
return pick;
|
return pick;
|
||||||
|
Reference in New Issue
Block a user