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;32mSUB\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
|
||||
|
13
menus.c
13
menus.c
@ -78,6 +78,7 @@ int menu_system(char *menufile) {
|
||||
int doquit = 0;
|
||||
char c;
|
||||
int clearscreen = 0;
|
||||
char confirm;
|
||||
|
||||
if (menufile[0] == '/') {
|
||||
snprintf(buffer, PATH_MAX, "%s.mnu", menufile);
|
||||
@ -481,10 +482,18 @@ int menu_system(char *menufile) {
|
||||
msg_conf_sub_bases();
|
||||
break;
|
||||
case MENU_RESETPOINTERS:
|
||||
msgbase_reset_pointers(gUser->cur_mail_conf, gUser->cur_mail_area);
|
||||
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);
|
||||
}
|
||||
break;
|
||||
case MENU_RESETALLPOINTERS:
|
||||
msgbase_reset_all_pointers();
|
||||
s_printf(get_string(230));
|
||||
confirm = s_getc();
|
||||
if (confirm == 'y' || confirm == 'Y') {
|
||||
msgbase_reset_all_pointers();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
Reference in New Issue
Block a user