diff options
author | Dan Everton <dan@iocaine.org> | 2006-08-15 09:38:13 +0000 |
---|---|---|
committer | Dan Everton <dan@iocaine.org> | 2006-08-15 09:38:13 +0000 |
commit | eb1dd38960214cb5581b9d39ef4fe73e2a050090 (patch) | |
tree | 225cdbae19e67685ba898f0559fa25a7177f91bd | |
parent | 1792170633842d274d623dcdd7265f2e55ff2fc9 (diff) | |
download | rockbox-eb1dd38960214cb5581b9d39ef4fe73e2a050090.tar.gz rockbox-eb1dd38960214cb5581b9d39ef4fe73e2a050090.zip |
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
-rw-r--r-- | apps/lang/english.lang | 42 | ||||
-rw-r--r-- | apps/settings.c | 2 | ||||
-rw-r--r-- | apps/settings.h | 5 | ||||
-rw-r--r-- | apps/settings_menu.c | 14 | ||||
-rw-r--r-- | apps/tree.c | 5 | ||||
-rw-r--r-- | firmware/drivers/wm8758.c | 10 | ||||
-rw-r--r-- | firmware/export/wm8758.h | 10 |
7 files changed, 78 insertions, 10 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index b11b996570..984aa1be95 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang | |||
@@ -9618,3 +9618,45 @@ | |||
9618 | *: "Wide" | 9618 | *: "Wide" |
9619 | </voice> | 9619 | </voice> |
9620 | </phrase> | 9620 | </phrase> |
9621 | <phrase> | ||
9622 | id: LANG_SHOW_PATH | ||
9623 | desc: in settings_menu | ||
9624 | user: | ||
9625 | <source> | ||
9626 | *: "Show Path" | ||
9627 | </source> | ||
9628 | <dest> | ||
9629 | *: "Show Path" | ||
9630 | </dest> | ||
9631 | <voice> | ||
9632 | *: "Show Path" | ||
9633 | </voice> | ||
9634 | </phrase> | ||
9635 | <phrase> | ||
9636 | id: LANG_SHOW_PATH_CURRENT | ||
9637 | desc: in show path menu | ||
9638 | user: | ||
9639 | <source> | ||
9640 | *: "Current Directory Only" | ||
9641 | </source> | ||
9642 | <dest> | ||
9643 | *: "Current Directory Only" | ||
9644 | </dest> | ||
9645 | <voice> | ||
9646 | *: "Current Directory Only" | ||
9647 | </voice> | ||
9648 | </phrase> | ||
9649 | <phrase> | ||
9650 | id: LANG_SHOW_PATH_FULL | ||
9651 | desc: in show path menu | ||
9652 | user: | ||
9653 | <source> | ||
9654 | *: "Full Path" | ||
9655 | </source> | ||
9656 | <dest> | ||
9657 | *: "Full Path" | ||
9658 | </dest> | ||
9659 | <voice> | ||
9660 | *: "Full Path" | ||
9661 | </voice> | ||
9662 | </phrase> | ||
diff --git a/apps/settings.c b/apps/settings.c index 1f8f15be1e..412fc4bfed 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -613,6 +613,8 @@ static const struct bit_entry hd_bits[] = | |||
613 | {5|SIGNED, S_O(eq_hw_band4_gain), 12, "eq hardware band 4 gain", NULL }, | 613 | {5|SIGNED, S_O(eq_hw_band4_gain), 12, "eq hardware band 4 gain", NULL }, |
614 | #endif | 614 | #endif |
615 | 615 | ||
616 | {2, S_O(show_path_in_browser), 0, "show path in browser", "off,current directory,full path" }, | ||
617 | |||
616 | /* If values are just added to the end, no need to bump the version. */ | 618 | /* If values are just added to the end, no need to bump the version. */ |
617 | /* new stuff to be added at the end */ | 619 | /* new stuff to be added at the end */ |
618 | 620 | ||
diff --git a/apps/settings.h b/apps/settings.h index 2d2c125721..439a43809a 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -564,6 +564,8 @@ struct user_settings | |||
564 | int eq_hw_band4_cutoff; | 564 | int eq_hw_band4_cutoff; |
565 | int eq_hw_band4_gain; | 565 | int eq_hw_band4_gain; |
566 | #endif | 566 | #endif |
567 | |||
568 | int show_path_in_browser; /* 0=off, 1=current directory, 2=full path */ | ||
567 | }; | 569 | }; |
568 | 570 | ||
569 | enum optiontype { INT, BOOL }; | 571 | enum optiontype { INT, BOOL }; |
@@ -660,4 +662,7 @@ enum { RECURSE_OFF, RECURSE_ON, RECURSE_ASK }; | |||
660 | /* replaygain types */ | 662 | /* replaygain types */ |
661 | enum { REPLAYGAIN_TRACK = 0, REPLAYGAIN_ALBUM, REPLAYGAIN_SHUFFLE }; | 663 | enum { REPLAYGAIN_TRACK = 0, REPLAYGAIN_ALBUM, REPLAYGAIN_SHUFFLE }; |
662 | 664 | ||
665 | /* show path types */ | ||
666 | enum { SHOW_PATH_OFF = 0, SHOW_PATH_CURRENT, SHOW_PATH_FULL }; | ||
667 | |||
663 | #endif /* __SETTINGS_H__ */ | 668 | #endif /* __SETTINGS_H__ */ |
diff --git a/apps/settings_menu.c b/apps/settings_menu.c index 6a11e723b1..48e8c1dda5 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c | |||
@@ -98,6 +98,19 @@ static bool show_icons(void) | |||
98 | return set_bool( (char *)str(LANG_SHOW_ICONS), &global_settings.show_icons ); | 98 | return set_bool( (char *)str(LANG_SHOW_ICONS), &global_settings.show_icons ); |
99 | } | 99 | } |
100 | 100 | ||
101 | static bool show_path(void) | ||
102 | { | ||
103 | static const struct opt_items names[3] = { | ||
104 | { STR(LANG_OFF) }, | ||
105 | { STR(LANG_SHOW_PATH_CURRENT) }, | ||
106 | { STR(LANG_SHOW_PATH_FULL) }, | ||
107 | }; | ||
108 | |||
109 | return set_option(str(LANG_SHOW_PATH), | ||
110 | &global_settings.show_path_in_browser, | ||
111 | INT, names, 3, NULL); | ||
112 | } | ||
113 | |||
101 | /** | 114 | /** |
102 | * Menu to set the option to scroll paginated | 115 | * Menu to set the option to scroll paginated |
103 | */ | 116 | */ |
@@ -1737,6 +1750,7 @@ static bool fileview_settings_menu(void) | |||
1737 | { ID2P(LANG_FILTER), dir_filter }, | 1750 | { ID2P(LANG_FILTER), dir_filter }, |
1738 | { ID2P(LANG_FOLLOW), browse_current }, | 1751 | { ID2P(LANG_FOLLOW), browse_current }, |
1739 | { ID2P(LANG_SHOW_ICONS), show_icons }, | 1752 | { ID2P(LANG_SHOW_ICONS), show_icons }, |
1753 | { ID2P(LANG_SHOW_PATH), show_path }, | ||
1740 | { ID2P(LANG_TAGCACHE), tagcache_settings_menu}, | 1754 | { ID2P(LANG_TAGCACHE), tagcache_settings_menu}, |
1741 | }; | 1755 | }; |
1742 | 1756 | ||
diff --git a/apps/tree.c b/apps/tree.c index 484ed672cd..72e62caf2b 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -347,6 +347,11 @@ static int update_dir(void) | |||
347 | gui_syncsplash(HZ, true, str(LANG_SHOWDIR_BUFFER_FULL)); | 347 | gui_syncsplash(HZ, true, str(LANG_SHOWDIR_BUFFER_FULL)); |
348 | } | 348 | } |
349 | } | 349 | } |
350 | if (global_settings.show_path_in_browser == SHOW_PATH_FULL) { | ||
351 | gui_synclist_set_title(&tree_lists, tc.currdir); | ||
352 | } else if (global_settings.show_path_in_browser == SHOW_PATH_CURRENT) { | ||
353 | gui_synclist_set_title(&tree_lists, strrchr(tc.currdir, '/')); | ||
354 | } | ||
350 | gui_synclist_set_nb_items(&tree_lists, tc.filesindir); | 355 | gui_synclist_set_nb_items(&tree_lists, tc.filesindir); |
351 | gui_synclist_set_icon_callback(&tree_lists, | 356 | gui_synclist_set_icon_callback(&tree_lists, |
352 | global_settings.show_icons?&tree_get_fileicon:NULL); | 357 | global_settings.show_icons?&tree_get_fileicon:NULL); |
diff --git a/firmware/drivers/wm8758.c b/firmware/drivers/wm8758.c index 9d2a300e70..33960af9b4 100644 --- a/firmware/drivers/wm8758.c +++ b/firmware/drivers/wm8758.c | |||
@@ -286,14 +286,14 @@ void wmcodec_set_equalizer_band(int band, int freq, int bw, int gain) | |||
286 | eq |= 12 - gain; | 286 | eq |= 12 - gain; |
287 | 287 | ||
288 | if (band == 0) { | 288 | if (band == 0) { |
289 | wm8758_write(EQ0, eq | 0x100); /* Always apply EQ to the DAC path */ | 289 | wm8758_write(EQ1, eq | 0x100); /* Always apply EQ to the DAC path */ |
290 | } else if (band == 1) { | 290 | } else if (band == 1) { |
291 | wm8758_write(EQ1, eq); | ||
292 | } else if (band == 2) { | ||
293 | wm8758_write(EQ2, eq); | 291 | wm8758_write(EQ2, eq); |
294 | } else if (band == 3) { | 292 | } else if (band == 2) { |
295 | wm8758_write(EQ3, eq); | 293 | wm8758_write(EQ3, eq); |
296 | } else if (band == 4) { | 294 | } else if (band == 3) { |
297 | wm8758_write(EQ4, eq); | 295 | wm8758_write(EQ4, eq); |
296 | } else if (band == 4) { | ||
297 | wm8758_write(EQ5, eq); | ||
298 | } | 298 | } |
299 | } | 299 | } |
diff --git a/firmware/export/wm8758.h b/firmware/export/wm8758.h index 5630a93b1b..e0b66b614f 100644 --- a/firmware/export/wm8758.h +++ b/firmware/export/wm8758.h | |||
@@ -62,11 +62,11 @@ extern void wmcodec_set_equalizer_band(int band, int freq, int bw, int gain); | |||
62 | #define PLLK2 0x26 | 62 | #define PLLK2 0x26 |
63 | #define PLLK3 0x27 | 63 | #define PLLK3 0x27 |
64 | 64 | ||
65 | #define EQ0 0x12 | 65 | #define EQ1 0x12 |
66 | #define EQ1 0x13 | 66 | #define EQ2 0x13 |
67 | #define EQ2 0x14 | 67 | #define EQ3 0x14 |
68 | #define EQ3 0x15 | 68 | #define EQ4 0x15 |
69 | #define EQ4 0x16 | 69 | #define EQ5 0x16 |
70 | 70 | ||
71 | /* Register settings for the supported samplerates: */ | 71 | /* Register settings for the supported samplerates: */ |
72 | #define WM8758_8000HZ 0x4d | 72 | #define WM8758_8000HZ 0x4d |