Prefix highligted selection by ">", so screen reader software find the
interface less confusing.
This commit is contained in:
parent
969996230f
commit
1041c240cd
16 changed files with 62 additions and 27 deletions
|
@ -236,10 +236,12 @@ void interface_adv(disk_t *disk_car, const int verbose,const int dump_ind, const
|
|||
if(element==current_element)
|
||||
{
|
||||
wattrset(stdscr, A_REVERSE);
|
||||
waddstr(stdscr, ">");
|
||||
aff_part(stdscr,AFF_PART_ORDER|AFF_PART_STATUS,disk_car,element->part);
|
||||
wattroff(stdscr, A_REVERSE);
|
||||
} else
|
||||
{
|
||||
waddstr(stdscr, " ");
|
||||
aff_part(stdscr,AFF_PART_ORDER|AFF_PART_STATUS,disk_car,element->part);
|
||||
}
|
||||
}
|
||||
|
|
11
src/askloc.c
11
src/askloc.c
|
@ -268,10 +268,17 @@ char *ask_location(const char*msg, const char *src_dir, const char *dst_org)
|
|||
wmove(window,8-1+i-offset,0);
|
||||
wclrtoeol(window); /* before addstr for BSD compatibility */
|
||||
if(file_walker==current_file)
|
||||
{
|
||||
wattrset(window, A_REVERSE);
|
||||
dir_aff_entry(window,file_info);
|
||||
if(file_walker==current_file)
|
||||
waddstr(window, ">");
|
||||
dir_aff_entry(window,file_info);
|
||||
wattroff(window, A_REVERSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
wprintw(window, " ");
|
||||
dir_aff_entry(window,file_info);
|
||||
}
|
||||
}
|
||||
if(offset+INTER_DIR<=i)
|
||||
break;
|
||||
|
|
|
@ -176,11 +176,11 @@ static void change_part_type_ncurses2(const disk_t *disk_car, partition_t *parti
|
|||
if(i==current_element_num)
|
||||
{
|
||||
wattrset(stdscr, A_REVERSE);
|
||||
wprintw(stdscr,"%s", part_name[i].name);
|
||||
wprintw(stdscr,">%s", part_name[i].name);
|
||||
wattroff(stdscr, A_REVERSE);
|
||||
} else
|
||||
{
|
||||
wprintw(stdscr,"%s", part_name[i].name);
|
||||
wprintw(stdscr," %s", part_name[i].name);
|
||||
}
|
||||
}
|
||||
if(i-offset<INTER_CHGTYPE)
|
||||
|
@ -289,11 +289,11 @@ static void gpt_change_part_type(const disk_t *disk_car, partition_t *partition)
|
|||
if(i==current_element_num)
|
||||
{
|
||||
wattrset(stdscr, A_REVERSE);
|
||||
wprintw(stdscr,"%s", gpt_sys_types[i].name);
|
||||
wprintw(stdscr,">%s", gpt_sys_types[i].name);
|
||||
wattroff(stdscr, A_REVERSE);
|
||||
} else
|
||||
{
|
||||
wprintw(stdscr,"%s", gpt_sys_types[i].name);
|
||||
wprintw(stdscr," %s", gpt_sys_types[i].name);
|
||||
}
|
||||
}
|
||||
if(i-offset<INTER_CHGTYPE)
|
||||
|
|
|
@ -86,7 +86,12 @@ static long int dir_aff_ncurses(disk_t *disk, const partition_t *partition, dir_
|
|||
wmove(window, 6+i-offset, 0);
|
||||
wclrtoeol(window); /* before addstr for BSD compatibility */
|
||||
if(current_file==pos)
|
||||
{
|
||||
wattrset(window, A_REVERSE);
|
||||
waddstr(window, ">");
|
||||
}
|
||||
else
|
||||
waddstr(window, " ");
|
||||
if((current_file->status&FILE_STATUS_DELETED)!=0 && has_colors())
|
||||
wbkgdset(window,' ' | COLOR_PAIR(1));
|
||||
if(current_file->stat.st_mtime!=0)
|
||||
|
@ -356,6 +361,7 @@ static int dir_partition_aux(disk_t *disk, const partition_t *partition, dir_dat
|
|||
dir_aff_log(dir_data, dir_list);
|
||||
if(*current_cmd!=NULL)
|
||||
{
|
||||
/* TODO: handle copy_files */
|
||||
dir_data->current_directory[current_directory_namelength]='\0';
|
||||
delete_list_file(dir_list);
|
||||
return -1; /* Quit */
|
||||
|
|
|
@ -209,7 +209,12 @@ static int ask_root_directory(disk_t *disk_car, const partition_t *partition, co
|
|||
wmove(window,8+i-offset,0);
|
||||
wclrtoeol(window); /* before addstr for BSD compatibility */
|
||||
if(current_file==pos)
|
||||
{
|
||||
wattrset(window, A_REVERSE);
|
||||
waddstr(window, ">");
|
||||
}
|
||||
else
|
||||
waddstr(window, " ");
|
||||
if(current_file->stat.st_mtime!=0)
|
||||
{
|
||||
tm_p = localtime(¤t_file->stat.st_mtime);
|
||||
|
|
|
@ -176,6 +176,7 @@ static int interface_part_bad_ncurses(disk_t *disk_car, list_part_t *list_part)
|
|||
{
|
||||
char buffer_part_size[100];
|
||||
wattrset(stdscr, A_REVERSE);
|
||||
waddstr(stdscr, ">");
|
||||
aff_part(stdscr, AFF_PART_BASE, disk_car, parts->part);
|
||||
wattroff(stdscr, A_REVERSE);
|
||||
wmove(stdscr,23,0);
|
||||
|
@ -187,6 +188,7 @@ static int interface_part_bad_ncurses(disk_t *disk_car, list_part_t *list_part)
|
|||
wprintw(stdscr,"%s",size_to_unit(parts->part->part_size,buffer_part_size));
|
||||
} else
|
||||
{
|
||||
waddstr(stdscr, " ");
|
||||
aff_part(stdscr, AFF_PART_BASE, disk_car, parts->part);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,11 +132,13 @@ static list_part_t *ask_structure_ncurses(disk_t *disk_car,list_part_t *list_par
|
|||
wmove(stdscr,6+i-offset,0);
|
||||
wclrtoeol(stdscr); /* before addstr for BSD compatibility */
|
||||
if(parts==pos)
|
||||
{
|
||||
wattrset(stdscr, A_REVERSE);
|
||||
}
|
||||
if(structure_status==0 && parts->part->status!=STATUS_DELETED && has_colors())
|
||||
wbkgdset(stdscr,' ' | COLOR_PAIR(2));
|
||||
if(parts==pos)
|
||||
waddstr(stdscr, ">");
|
||||
else
|
||||
waddstr(stdscr, " ");
|
||||
aff_part(stdscr, AFF_PART_STATUS, disk_car, parts->part);
|
||||
if(structure_status==0 && parts->part->status!=STATUS_DELETED && has_colors())
|
||||
wbkgdset(stdscr,' ' | COLOR_PAIR(0));
|
||||
|
|
20
src/intrfn.c
20
src/intrfn.c
|
@ -205,29 +205,30 @@ static int wmenuUpdate(WINDOW *window, const int yinfo, int y, int x, const stru
|
|||
if(lenName >= itemLength)
|
||||
{
|
||||
if( menuType & MENU_BUTTON )
|
||||
snprintf(buff, sizeof(buff),"[%s]",mi);
|
||||
snprintf(buff, sizeof(buff)," [%s]",mi);
|
||||
else
|
||||
snprintf(buff, sizeof(buff),"%s",mi);
|
||||
snprintf(buff, sizeof(buff)," %s",mi);
|
||||
}
|
||||
else
|
||||
{
|
||||
if( menuType & MENU_BUTTON )
|
||||
{
|
||||
if(menuType & MENU_VERT)
|
||||
snprintf( buff, sizeof(buff),"[%*s%-*s]", (itemLength - lenNameMax) / 2, "",
|
||||
snprintf( buff, sizeof(buff)," [%*s%-*s]", (itemLength - lenNameMax) / 2, "",
|
||||
(itemLength - lenNameMax + 1) / 2 + lenNameMax, mi );
|
||||
else
|
||||
snprintf( buff, sizeof(buff),"[%*s%-*s]", (itemLength - lenName) / 2, "",
|
||||
snprintf( buff, sizeof(buff)," [%*s%-*s]", (itemLength - lenName) / 2, "",
|
||||
(itemLength - lenName + 1) / 2 + lenName, mi );
|
||||
}
|
||||
else
|
||||
snprintf( buff, sizeof(buff),"%*s%-*s", (itemLength - lenName) / 2, "",
|
||||
snprintf( buff, sizeof(buff)," %*s%-*s", (itemLength - lenName) / 2, "",
|
||||
(itemLength - lenName + 1) / 2 + lenName, mi );
|
||||
}
|
||||
/* If current item is selected, highlight it */
|
||||
if( current == i )
|
||||
{
|
||||
wattrset(window, A_REVERSE);
|
||||
buff[0]='>';
|
||||
}
|
||||
|
||||
/* Print item */
|
||||
|
@ -800,10 +801,13 @@ int screen_buffer_display_ext(WINDOW *window, const char *options_org, const str
|
|||
wmove(window,INTER_ANALYSE_Y+i-first_line_to_display,INTER_ANALYSE_X);
|
||||
wclrtoeol(window);
|
||||
if(i==current_line)
|
||||
{
|
||||
wattrset(window, A_REVERSE);
|
||||
wprintw(window, "%-*s", COLS, intr_buffer_screen[i]);
|
||||
if(i==current_line)
|
||||
wprintw(window, ">%-*s", COLS, intr_buffer_screen[i]);
|
||||
wattroff(window, A_REVERSE);
|
||||
}
|
||||
else
|
||||
wprintw(window, " %-*s", COLS, intr_buffer_screen[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1062,7 +1066,7 @@ int start_ncurses(const char *prog_name, const char *real_prog_name)
|
|||
wprintw(stdscr,"Please enlarge the terminal.");
|
||||
wmove(stdscr,LINES-2,0);
|
||||
wattrset(stdscr, A_REVERSE);
|
||||
wprintw(stdscr,"[ Quit ]");
|
||||
waddstr(stdscr,"[ Quit ]");
|
||||
wattroff(stdscr, A_REVERSE);
|
||||
wrefresh(stdscr);
|
||||
switch(wgetch(stdscr))
|
||||
|
|
|
@ -79,7 +79,7 @@ int intrf_no_disk_ncurses(const char *prog_name)
|
|||
#endif
|
||||
wmove(stdscr,22,0);
|
||||
wattrset(stdscr, A_REVERSE);
|
||||
wprintw(stdscr,"[ Quit ]");
|
||||
waddstr(stdscr,"[ Quit ]");
|
||||
wattroff(stdscr, A_REVERSE);
|
||||
wrefresh(stdscr);
|
||||
while(wgetch(stdscr)==ERR);
|
||||
|
|
|
@ -1207,7 +1207,12 @@ static void ntfs_undelete_menu_ncurses(disk_t *disk_car, const partition_t *part
|
|||
wmove(window, 6-1+i-offset, 0);
|
||||
wclrtoeol(window); /* before addstr for BSD compatibility */
|
||||
if(file_walker==current_file)
|
||||
{
|
||||
wattrset(window, A_REVERSE);
|
||||
waddstr(window, ">");
|
||||
}
|
||||
else
|
||||
waddstr(window, " ");
|
||||
if((file_info->status&FILE_STATUS_MARKED)!=0 && has_colors())
|
||||
wbkgdset(window,' ' | COLOR_PAIR(2));
|
||||
if(file_info->stat.st_mtime!=0)
|
||||
|
|
|
@ -54,7 +54,7 @@ void write_part_mac_warning_ncurses(void)
|
|||
wprintw(window,"using values displayed by TestDisk");
|
||||
wmove(window,22,0);
|
||||
wattrset(window, A_REVERSE);
|
||||
wprintw(window,"[ Abort ]");
|
||||
waddstr(window,"[ Abort ]");
|
||||
wattroff(window, A_REVERSE);
|
||||
wrefresh(window);
|
||||
while(wgetch(window)==ERR);
|
||||
|
|
|
@ -105,11 +105,11 @@ static void photorec_disk_selection_ncurses(int verbose, const char *recup_dir,
|
|||
continue;
|
||||
wmove(stdscr,8+i-offset,0);
|
||||
if(element_disk!=current_disk)
|
||||
wprintw(stdscr,"%s\n",element_disk->disk->description_short(element_disk->disk));
|
||||
wprintw(stdscr," %s\n",element_disk->disk->description_short(element_disk->disk));
|
||||
else
|
||||
{
|
||||
wattrset(stdscr, A_REVERSE);
|
||||
wprintw(stdscr,"%s\n",element_disk->disk->description_short(element_disk->disk));
|
||||
wprintw(stdscr,">%s\n",element_disk->disk->description_short(element_disk->disk));
|
||||
wattroff(stdscr, A_REVERSE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -518,7 +518,7 @@ static void recovery_finished(disk_t *disk, const partition_t *partition, const
|
|||
wmove(stdscr,22,0);
|
||||
wclrtoeol(stdscr);
|
||||
wattrset(stdscr, A_REVERSE);
|
||||
wprintw(stdscr,"[ Quit ]");
|
||||
waddstr(stdscr,"[ Quit ]");
|
||||
wattroff(stdscr, A_REVERSE);
|
||||
wrefresh(stdscr);
|
||||
log_flush();
|
||||
|
@ -1193,7 +1193,7 @@ static void interface_file_select_ncurses(file_enable_t *files_enable)
|
|||
if(i==current_element_num)
|
||||
{
|
||||
wattrset(stdscr, A_REVERSE);
|
||||
wprintw(stdscr,"[%c] %-4s %s", (files_enable[i].enable==0?' ':'X'),
|
||||
wprintw(stdscr,">[%c] %-4s %s", (files_enable[i].enable==0?' ':'X'),
|
||||
(files_enable[i].file_hint->extension!=NULL?
|
||||
files_enable[i].file_hint->extension:""),
|
||||
files_enable[i].file_hint->description);
|
||||
|
@ -1201,7 +1201,7 @@ static void interface_file_select_ncurses(file_enable_t *files_enable)
|
|||
}
|
||||
else
|
||||
{
|
||||
wprintw(stdscr,"[%c] %-4s %s", (files_enable[i].enable==0?' ':'X'),
|
||||
wprintw(stdscr," [%c] %-4s %s", (files_enable[i].enable==0?' ':'X'),
|
||||
(files_enable[i].file_hint->extension!=NULL?
|
||||
files_enable[i].file_hint->extension:""),
|
||||
files_enable[i].file_hint->description);
|
||||
|
|
|
@ -316,10 +316,12 @@ void menu_photorec(disk_t *disk_car, const int verbose, const char *recup_dir, f
|
|||
if(element==current_element)
|
||||
{
|
||||
wattrset(stdscr, A_REVERSE);
|
||||
waddstr(stdscr, ">");
|
||||
aff_part(stdscr,AFF_PART_ORDER|AFF_PART_STATUS,disk_car,element->part);
|
||||
wattroff(stdscr, A_REVERSE);
|
||||
} else
|
||||
{
|
||||
waddstr(stdscr, " ");
|
||||
aff_part(stdscr,AFF_PART_ORDER|AFF_PART_STATUS,disk_car,element->part);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,11 +101,11 @@ static int testdisk_disk_selection_ncurses(int verbose,int dump_ind, const list_
|
|||
continue;
|
||||
wmove(stdscr,8+i-offset,0);
|
||||
if(element_disk!=current_disk)
|
||||
wprintw(stdscr,"%s\n",element_disk->disk->description_short(element_disk->disk));
|
||||
wprintw(stdscr," %s\n",element_disk->disk->description_short(element_disk->disk));
|
||||
else
|
||||
{
|
||||
wattrset(stdscr, A_REVERSE);
|
||||
wprintw(stdscr,"%s\n",element_disk->disk->description_short(element_disk->disk));
|
||||
wprintw(stdscr,">%s\n",element_disk->disk->description_short(element_disk->disk));
|
||||
wattroff(stdscr, A_REVERSE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,11 +105,11 @@ static struct td_list_head *interface_load_ncurses(disk_t *disk_car, backup_disk
|
|||
if(backup_walker==backup_current)
|
||||
{
|
||||
wattrset(stdscr, A_REVERSE);
|
||||
wprintw(stdscr,"%s %s",backup->description,ctime(&backup->my_time));
|
||||
wprintw(stdscr,">%s %s",backup->description,ctime(&backup->my_time));
|
||||
wattroff(stdscr, A_REVERSE);
|
||||
} else
|
||||
{
|
||||
wprintw(stdscr,"%s %s",backup->description,ctime(&backup->my_time));
|
||||
wprintw(stdscr," %s %s",backup->description,ctime(&backup->my_time));
|
||||
}
|
||||
}
|
||||
if(i<=INTER_LOAD && backup==NULL)
|
||||
|
|
Loading…
Reference in a new issue