Add another file extension viewing option that mimics the old behaviour and make this default. Also update Dutch lang file and manual for this.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14324 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
62b0d4b685
commit
043c966ebf
5 changed files with 63 additions and 9 deletions
|
@ -11025,3 +11025,17 @@
|
|||
*: "Only unknown types"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_EXT_ONLY_VIEW_ALL
|
||||
desc: in settings_menu
|
||||
user:
|
||||
<source>
|
||||
*: "Only when viewing all types"
|
||||
</source>
|
||||
<dest>
|
||||
*: "Only when viewing all types"
|
||||
</dest>
|
||||
<voice>
|
||||
*: "Only when viewing all types"
|
||||
</voice>
|
||||
</phrase>
|
||||
|
|
|
@ -10950,3 +10950,17 @@
|
|||
*: "Enkel onbekende types"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_EXT_ONLY_VIEW_ALL
|
||||
desc: in settings_menu
|
||||
user:
|
||||
<source>
|
||||
*: "Only when viewing all types"
|
||||
</source>
|
||||
<dest>
|
||||
*: "Enkel bij tonen alle bestanden"
|
||||
</dest>
|
||||
<voice>
|
||||
*: "Enkel bij tonen alle bestanden"
|
||||
</voice>
|
||||
</phrase>
|
||||
|
|
|
@ -653,9 +653,10 @@ const struct settings_list settings[] = {
|
|||
"all,supported,music,playlists", NULL, 4, ID2P(LANG_ALL),
|
||||
ID2P(LANG_FILTER_SUPPORTED), ID2P(LANG_FILTER_MUSIC), ID2P(LANG_PLAYLISTS)),
|
||||
OFFON_SETTING(0,sort_case,LANG_SORT_CASE,false,"sort case",NULL),
|
||||
CHOICE_SETTING(0, show_filename_ext, LANG_SHOW_FILENAME_EXT, 2,
|
||||
"show filename exts", "off,on,unknown", NULL , 3 ,
|
||||
ID2P(LANG_OFF), ID2P(LANG_ON), ID2P(LANG_UNKNOWN_TYPES)),
|
||||
CHOICE_SETTING(0, show_filename_ext, LANG_SHOW_FILENAME_EXT, 3,
|
||||
"show filename exts", "off,on,unknown,view_all", NULL , 4 ,
|
||||
ID2P(LANG_OFF), ID2P(LANG_ON), ID2P(LANG_UNKNOWN_TYPES),
|
||||
ID2P(LANG_EXT_ONLY_VIEW_ALL)),
|
||||
OFFON_SETTING(0,browse_current,LANG_FOLLOW,false,"follow playlist",NULL),
|
||||
OFFON_SETTING(0,playlist_viewer_icons,LANG_SHOW_ICONS,true,
|
||||
"playlist viewer icons",NULL),
|
||||
|
|
34
apps/tree.c
34
apps/tree.c
|
@ -139,6 +139,7 @@ static char * tree_get_filename(int selected_item, void * data, char *buffer)
|
|||
struct tree_context * local_tc=(struct tree_context *)data;
|
||||
char *name;
|
||||
int attr=0;
|
||||
bool stripit = false;
|
||||
#ifdef HAVE_TAGCACHE
|
||||
bool id3db = *(local_tc->dirfilter) == SHOW_ID3DB;
|
||||
|
||||
|
@ -154,11 +155,34 @@ static char * tree_get_filename(int selected_item, void * data, char *buffer)
|
|||
name = e->name;
|
||||
attr = e->attr;
|
||||
}
|
||||
/* if it's not a directory, strip the extension if necessary */
|
||||
if((global_settings.show_filename_ext == 0) ||
|
||||
((global_settings.show_filename_ext == 2) &&
|
||||
(filetype_supported(attr)) &&
|
||||
!(attr & ATTR_DIRECTORY)))
|
||||
|
||||
switch(global_settings.show_filename_ext)
|
||||
{
|
||||
case 0:
|
||||
/* show file extension: off */
|
||||
stripit = true;
|
||||
break;
|
||||
case 1:
|
||||
/* show file extension: on */
|
||||
stripit = false;
|
||||
break;
|
||||
case 2:
|
||||
/* show file extension: only unknown types */
|
||||
stripit = filetype_supported(attr);
|
||||
break;
|
||||
case 3:
|
||||
default:
|
||||
/* show file extension: only when viewing all */
|
||||
stripit = (*(local_tc->dirfilter) != SHOW_ID3DB) &&
|
||||
(*(local_tc->dirfilter) != SHOW_ALL);
|
||||
break;
|
||||
}
|
||||
|
||||
/* global overrule: don't strip if it's a dir */
|
||||
if(attr & ATTR_DIRECTORY)
|
||||
stripit = false;
|
||||
|
||||
if(stripit)
|
||||
{
|
||||
return(strip_extension(name, buffer));
|
||||
}
|
||||
|
|
|
@ -44,7 +44,8 @@ displays files.
|
|||
\begin{description}
|
||||
\item[Off:] The file extensions are never shown.
|
||||
\item[On:] The file extensions are always shown.
|
||||
\item[Only Unknown:] Only the extensions of unknown filetypes are shown.
|
||||
\item[Only unknown types:] Only the extensions of unknown filetypes are shown.
|
||||
\item[Only when viewing all types:] Only show file extensions when \setting{Show Files} is set to \setting{All}.
|
||||
\end{description}
|
||||
|
||||
\item[Follow Playlist:]
|
||||
|
|
Loading…
Reference in a new issue