diff options
Diffstat (limited to 'apps/menus')
-rw-r--r-- | apps/menus/display_menu.c | 20 | ||||
-rw-r--r-- | apps/menus/main_menu.c | 18 | ||||
-rw-r--r-- | apps/menus/settings_menu.c | 6 |
3 files changed, 29 insertions, 15 deletions
diff --git a/apps/menus/display_menu.c b/apps/menus/display_menu.c index 3e1443d02e..948dcede00 100644 --- a/apps/menus/display_menu.c +++ b/apps/menus/display_menu.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #endif | 43 | #endif |
44 | #include "viewport.h" | 44 | #include "viewport.h" |
45 | #include "statusbar.h" /* statusbar_vals enum*/ | 45 | #include "statusbar.h" /* statusbar_vals enum*/ |
46 | #include "rbunicode.h" | ||
46 | 47 | ||
47 | #ifdef HAVE_BACKLIGHT | 48 | #ifdef HAVE_BACKLIGHT |
48 | static int filterfirstkeypress_callback(int action,const struct menu_item_ex *this_item) | 49 | static int filterfirstkeypress_callback(int action,const struct menu_item_ex *this_item) |
@@ -524,8 +525,25 @@ MAKE_MENU(touchscreen_menu, ID2P(LANG_TOUCHSCREEN_SETTINGS), NULL, Icon_NOICON, | |||
524 | &touchscreen_menu_calibrate, &touchscreen_menu_reset_calibration); | 525 | &touchscreen_menu_calibrate, &touchscreen_menu_reset_calibration); |
525 | #endif | 526 | #endif |
526 | 527 | ||
528 | static int codepage_callback(int action, const struct menu_item_ex *this_item) | ||
529 | { | ||
530 | static int old_codepage; | ||
531 | int new_codepage = global_settings.default_codepage; | ||
532 | (void)this_item; | ||
533 | switch (action) | ||
534 | { | ||
535 | case ACTION_ENTER_MENUITEM: | ||
536 | old_codepage = new_codepage; | ||
537 | break; | ||
538 | case ACTION_EXIT_MENUITEM: | ||
539 | if (new_codepage != old_codepage) | ||
540 | set_codepage(new_codepage); | ||
541 | break; | ||
542 | } | ||
543 | return action; | ||
544 | } | ||
527 | 545 | ||
528 | MENUITEM_SETTING(codepage_setting, &global_settings.default_codepage, NULL); | 546 | MENUITEM_SETTING(codepage_setting, &global_settings.default_codepage, codepage_callback); |
529 | 547 | ||
530 | 548 | ||
531 | MAKE_MENU(display_menu, ID2P(LANG_DISPLAY), | 549 | MAKE_MENU(display_menu, ID2P(LANG_DISPLAY), |
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c index 6a1295996c..8764101f73 100644 --- a/apps/menus/main_menu.c +++ b/apps/menus/main_menu.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include "time.h" | 48 | #include "time.h" |
49 | #include "wps.h" | 49 | #include "wps.h" |
50 | #include "skin_buffer.h" | 50 | #include "skin_buffer.h" |
51 | #include "disk.h" | ||
51 | 52 | ||
52 | static const struct browse_folder_info config = {ROCKBOX_DIR, SHOW_CFG}; | 53 | static const struct browse_folder_info config = {ROCKBOX_DIR, SHOW_CFG}; |
53 | 54 | ||
@@ -160,14 +161,14 @@ static const char* info_getname(int selected_item, void *data, | |||
160 | #endif | 161 | #endif |
161 | if (info->new_data) | 162 | if (info->new_data) |
162 | { | 163 | { |
163 | fat_size(IF_MV(0,) &info->size, &info->free); | 164 | volume_size(IF_MV(0,) &info->size, &info->free); |
164 | #ifdef HAVE_MULTIVOLUME | 165 | #ifdef HAVE_MULTIVOLUME |
165 | #ifndef APPLICATION | 166 | #ifndef APPLICATION |
166 | if (fat_ismounted(1)) | 167 | volume_size(1, &info->size2, &info->free2); |
167 | fat_size(1, &info->size2, &info->free2); | 168 | #else |
168 | else | 169 | info->size2 = 0; |
169 | #endif | 170 | #endif |
170 | info->size2 = 0; | 171 | |
171 | #endif | 172 | #endif |
172 | info->new_data = false; | 173 | info->new_data = false; |
173 | } | 174 | } |
@@ -347,12 +348,7 @@ static int info_action_callback(int action, struct gui_synclist *lists) | |||
347 | info->new_data = true; | 348 | info->new_data = true; |
348 | splash(0, ID2P(LANG_SCANNING_DISK)); | 349 | splash(0, ID2P(LANG_SCANNING_DISK)); |
349 | for (i = 0; i < NUM_VOLUMES; i++) | 350 | for (i = 0; i < NUM_VOLUMES; i++) |
350 | { | 351 | volume_recalc_free(IF_MV(i)); |
351 | #ifdef HAVE_HOTSWAP | ||
352 | if (fat_ismounted(i)) | ||
353 | #endif | ||
354 | fat_recalc_free(IF_MV(i)); | ||
355 | } | ||
356 | #else | 352 | #else |
357 | (void) lists; | 353 | (void) lists; |
358 | #endif | 354 | #endif |
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index 95423a20fa..0d2a7febf1 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c | |||
@@ -209,12 +209,12 @@ static int dircache_callback(int action,const struct menu_item_ex *this_item) | |||
209 | switch (action) | 209 | switch (action) |
210 | { | 210 | { |
211 | case ACTION_EXIT_MENUITEM: /* on exit */ | 211 | case ACTION_EXIT_MENUITEM: /* on exit */ |
212 | if (global_settings.dircache && !dircache_is_enabled()) | 212 | if (global_settings.dircache) |
213 | { | 213 | { |
214 | if (dircache_build(0) < 0) | 214 | if (dircache_enable() < 0) |
215 | splash(HZ*2, ID2P(LANG_PLEASE_REBOOT)); | 215 | splash(HZ*2, ID2P(LANG_PLEASE_REBOOT)); |
216 | } | 216 | } |
217 | else if (!global_settings.dircache && dircache_is_enabled()) | 217 | else |
218 | { | 218 | { |
219 | dircache_disable(); | 219 | dircache_disable(); |
220 | } | 220 | } |