Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove point and version for accessibility #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/ebook-speaker.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ void view_screen (misc_t *misc, daisy_t *daisy)
if (l / 2 * 2 == l)
waddstr (misc->screenwin, " ");
for (x = l; x < 56; x += 2)
waddstr (misc->screenwin, " .");
waddstr (misc->screenwin, " ");
Copy link
Member

@sthibaul sthibaul Apr 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we are going to display only spaces, please replace this 2-by-2 loop and the previous if with a single 1-by-1 loop.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we can do that.

if (daisy[i].page_number)
{
mvwprintw (misc->screenwin, daisy[i].y, 63,
Expand Down Expand Up @@ -2926,8 +2926,8 @@ int main (int argc, char *argv[])
noecho ();
misc.player_pid = -2;
sprintf (misc.scan_resolution, "400");
snprintf (misc.copyright, MAX_STR - 1, "%s %s - (C)2021 J. Lemmens",
gettext ("eBook-speaker - Version"), PACKAGE_VERSION);
snprintf (misc.copyright, MAX_STR - 1, "%s ",
gettext ("eBook-speaker "));
wattron (misc.titlewin, A_BOLD);
wprintw (misc.titlewin, "%s - %s", misc.copyright,
gettext ("Please wait..."));
Expand Down
25 changes: 25 additions & 0 deletions src/list_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,33 @@ void ls (misc_t *misc, size_t n, struct dirent **namelist)

int hidden_files (const struct dirent *entry)
{

int r = 0;
char my_pattern1[] = "*.jpg";
char my_pattern2[] = "*.opf";
char my_pattern3[] = "*.pdf";
char my_pattern4[] = "*.db";
char my_pattern5[] = "*.json";

if (*entry->d_name == '.')
return 0;

r = fnmatch (my_pattern1, entry->d_name, FNM_PERIOD | FNM_CASEFOLD);
if (r == 0)
return 0;
r = fnmatch (my_pattern2, entry->d_name, FNM_PERIOD | FNM_CASEFOLD);
if (r == 0)
return 0;
r = fnmatch (my_pattern3, entry->d_name, FNM_PERIOD | FNM_CASEFOLD);
if (r == 0)
return 0;
r = fnmatch (my_pattern4, entry->d_name, FNM_PERIOD | FNM_CASEFOLD);
if (r == 0)
return 0;
r = fnmatch (my_pattern5, entry->d_name, FNM_PERIOD | FNM_CASEFOLD);
if (r == 0)
return 0;

return 1;
} // hidden)files

Expand Down