Add support for displaying the the current path or the full path (or neither) in the file browser. Check General Settings -> File View -> Show Path for the options.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10578 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1792170633
commit
eb1dd38960
7 changed files with 78 additions and 10 deletions
|
@ -9618,3 +9618,45 @@
|
||||||
*: "Wide"
|
*: "Wide"
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_SHOW_PATH
|
||||||
|
desc: in settings_menu
|
||||||
|
user:
|
||||||
|
<source>
|
||||||
|
*: "Show Path"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: "Show Path"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: "Show Path"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_SHOW_PATH_CURRENT
|
||||||
|
desc: in show path menu
|
||||||
|
user:
|
||||||
|
<source>
|
||||||
|
*: "Current Directory Only"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: "Current Directory Only"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: "Current Directory Only"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_SHOW_PATH_FULL
|
||||||
|
desc: in show path menu
|
||||||
|
user:
|
||||||
|
<source>
|
||||||
|
*: "Full Path"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: "Full Path"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: "Full Path"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
|
|
@ -613,6 +613,8 @@ static const struct bit_entry hd_bits[] =
|
||||||
{5|SIGNED, S_O(eq_hw_band4_gain), 12, "eq hardware band 4 gain", NULL },
|
{5|SIGNED, S_O(eq_hw_band4_gain), 12, "eq hardware band 4 gain", NULL },
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
{2, S_O(show_path_in_browser), 0, "show path in browser", "off,current directory,full path" },
|
||||||
|
|
||||||
/* If values are just added to the end, no need to bump the version. */
|
/* If values are just added to the end, no need to bump the version. */
|
||||||
/* new stuff to be added at the end */
|
/* new stuff to be added at the end */
|
||||||
|
|
||||||
|
|
|
@ -564,6 +564,8 @@ struct user_settings
|
||||||
int eq_hw_band4_cutoff;
|
int eq_hw_band4_cutoff;
|
||||||
int eq_hw_band4_gain;
|
int eq_hw_band4_gain;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
int show_path_in_browser; /* 0=off, 1=current directory, 2=full path */
|
||||||
};
|
};
|
||||||
|
|
||||||
enum optiontype { INT, BOOL };
|
enum optiontype { INT, BOOL };
|
||||||
|
@ -660,4 +662,7 @@ enum { RECURSE_OFF, RECURSE_ON, RECURSE_ASK };
|
||||||
/* replaygain types */
|
/* replaygain types */
|
||||||
enum { REPLAYGAIN_TRACK = 0, REPLAYGAIN_ALBUM, REPLAYGAIN_SHUFFLE };
|
enum { REPLAYGAIN_TRACK = 0, REPLAYGAIN_ALBUM, REPLAYGAIN_SHUFFLE };
|
||||||
|
|
||||||
|
/* show path types */
|
||||||
|
enum { SHOW_PATH_OFF = 0, SHOW_PATH_CURRENT, SHOW_PATH_FULL };
|
||||||
|
|
||||||
#endif /* __SETTINGS_H__ */
|
#endif /* __SETTINGS_H__ */
|
||||||
|
|
|
@ -98,6 +98,19 @@ static bool show_icons(void)
|
||||||
return set_bool( (char *)str(LANG_SHOW_ICONS), &global_settings.show_icons );
|
return set_bool( (char *)str(LANG_SHOW_ICONS), &global_settings.show_icons );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool show_path(void)
|
||||||
|
{
|
||||||
|
static const struct opt_items names[3] = {
|
||||||
|
{ STR(LANG_OFF) },
|
||||||
|
{ STR(LANG_SHOW_PATH_CURRENT) },
|
||||||
|
{ STR(LANG_SHOW_PATH_FULL) },
|
||||||
|
};
|
||||||
|
|
||||||
|
return set_option(str(LANG_SHOW_PATH),
|
||||||
|
&global_settings.show_path_in_browser,
|
||||||
|
INT, names, 3, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Menu to set the option to scroll paginated
|
* Menu to set the option to scroll paginated
|
||||||
*/
|
*/
|
||||||
|
@ -1737,6 +1750,7 @@ static bool fileview_settings_menu(void)
|
||||||
{ ID2P(LANG_FILTER), dir_filter },
|
{ ID2P(LANG_FILTER), dir_filter },
|
||||||
{ ID2P(LANG_FOLLOW), browse_current },
|
{ ID2P(LANG_FOLLOW), browse_current },
|
||||||
{ ID2P(LANG_SHOW_ICONS), show_icons },
|
{ ID2P(LANG_SHOW_ICONS), show_icons },
|
||||||
|
{ ID2P(LANG_SHOW_PATH), show_path },
|
||||||
{ ID2P(LANG_TAGCACHE), tagcache_settings_menu},
|
{ ID2P(LANG_TAGCACHE), tagcache_settings_menu},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -347,6 +347,11 @@ static int update_dir(void)
|
||||||
gui_syncsplash(HZ, true, str(LANG_SHOWDIR_BUFFER_FULL));
|
gui_syncsplash(HZ, true, str(LANG_SHOWDIR_BUFFER_FULL));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (global_settings.show_path_in_browser == SHOW_PATH_FULL) {
|
||||||
|
gui_synclist_set_title(&tree_lists, tc.currdir);
|
||||||
|
} else if (global_settings.show_path_in_browser == SHOW_PATH_CURRENT) {
|
||||||
|
gui_synclist_set_title(&tree_lists, strrchr(tc.currdir, '/'));
|
||||||
|
}
|
||||||
gui_synclist_set_nb_items(&tree_lists, tc.filesindir);
|
gui_synclist_set_nb_items(&tree_lists, tc.filesindir);
|
||||||
gui_synclist_set_icon_callback(&tree_lists,
|
gui_synclist_set_icon_callback(&tree_lists,
|
||||||
global_settings.show_icons?&tree_get_fileicon:NULL);
|
global_settings.show_icons?&tree_get_fileicon:NULL);
|
||||||
|
|
|
@ -286,14 +286,14 @@ void wmcodec_set_equalizer_band(int band, int freq, int bw, int gain)
|
||||||
eq |= 12 - gain;
|
eq |= 12 - gain;
|
||||||
|
|
||||||
if (band == 0) {
|
if (band == 0) {
|
||||||
wm8758_write(EQ0, eq | 0x100); /* Always apply EQ to the DAC path */
|
wm8758_write(EQ1, eq | 0x100); /* Always apply EQ to the DAC path */
|
||||||
} else if (band == 1) {
|
} else if (band == 1) {
|
||||||
wm8758_write(EQ1, eq);
|
|
||||||
} else if (band == 2) {
|
|
||||||
wm8758_write(EQ2, eq);
|
wm8758_write(EQ2, eq);
|
||||||
} else if (band == 3) {
|
} else if (band == 2) {
|
||||||
wm8758_write(EQ3, eq);
|
wm8758_write(EQ3, eq);
|
||||||
} else if (band == 4) {
|
} else if (band == 3) {
|
||||||
wm8758_write(EQ4, eq);
|
wm8758_write(EQ4, eq);
|
||||||
|
} else if (band == 4) {
|
||||||
|
wm8758_write(EQ5, eq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,11 +62,11 @@ extern void wmcodec_set_equalizer_band(int band, int freq, int bw, int gain);
|
||||||
#define PLLK2 0x26
|
#define PLLK2 0x26
|
||||||
#define PLLK3 0x27
|
#define PLLK3 0x27
|
||||||
|
|
||||||
#define EQ0 0x12
|
#define EQ1 0x12
|
||||||
#define EQ1 0x13
|
#define EQ2 0x13
|
||||||
#define EQ2 0x14
|
#define EQ3 0x14
|
||||||
#define EQ3 0x15
|
#define EQ4 0x15
|
||||||
#define EQ4 0x16
|
#define EQ5 0x16
|
||||||
|
|
||||||
/* Register settings for the supported samplerates: */
|
/* Register settings for the supported samplerates: */
|
||||||
#define WM8758_8000HZ 0x4d
|
#define WM8758_8000HZ 0x4d
|
||||||
|
|
Loading…
Reference in a new issue