Add confirmation to reseting pointers
This commit is contained in:
parent
f49e076cc0
commit
ef986d4e7a
@ -227,3 +227,5 @@ File exists!\r\n
|
|||||||
\e[1;30m[\e[1;37m%3d\e[1;30m] [%s\e[1;30m] \e[1;37m%s\e[0m\r\n
|
\e[1;30m[\e[1;37m%3d\e[1;30m] [%s\e[1;30m] \e[1;37m%s\e[0m\r\n
|
||||||
\e[1;32mSUB\e[0m
|
\e[1;32mSUB\e[0m
|
||||||
\e[1;31mUNSUB\e[0m
|
\e[1;31mUNSUB\e[0m
|
||||||
|
\r\n\e[1;37mAre you sure you want to reset all messages in %s to unread? \e[0m
|
||||||
|
\r\n\e[1;37mAre you sure you want to reset \e[1;31mall messages \e[1;37min all bases to unread? \e[0m
|
||||||
|
9
menus.c
9
menus.c
@ -78,6 +78,7 @@ int menu_system(char *menufile) {
|
|||||||
int doquit = 0;
|
int doquit = 0;
|
||||||
char c;
|
char c;
|
||||||
int clearscreen = 0;
|
int clearscreen = 0;
|
||||||
|
char confirm;
|
||||||
|
|
||||||
if (menufile[0] == '/') {
|
if (menufile[0] == '/') {
|
||||||
snprintf(buffer, PATH_MAX, "%s.mnu", menufile);
|
snprintf(buffer, PATH_MAX, "%s.mnu", menufile);
|
||||||
@ -481,10 +482,18 @@ int menu_system(char *menufile) {
|
|||||||
msg_conf_sub_bases();
|
msg_conf_sub_bases();
|
||||||
break;
|
break;
|
||||||
case MENU_RESETPOINTERS:
|
case MENU_RESETPOINTERS:
|
||||||
|
s_printf(get_string(229), conf.mail_conferences[gUser->cur_mail_conf]->mail_areas[gUser->cur_mail_area]->name);
|
||||||
|
confirm = s_getc();
|
||||||
|
if (confirm == 'y' || confirm == 'Y') {
|
||||||
msgbase_reset_pointers(gUser->cur_mail_conf, gUser->cur_mail_area);
|
msgbase_reset_pointers(gUser->cur_mail_conf, gUser->cur_mail_area);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case MENU_RESETALLPOINTERS:
|
case MENU_RESETALLPOINTERS:
|
||||||
|
s_printf(get_string(230));
|
||||||
|
confirm = s_getc();
|
||||||
|
if (confirm == 'y' || confirm == 'Y') {
|
||||||
msgbase_reset_all_pointers();
|
msgbase_reset_all_pointers();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user