diff options
Diffstat (limited to 'apps/settings.c')
-rw-r--r-- | apps/settings.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/apps/settings.c b/apps/settings.c index 412fc4bfed..f70e29696b 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include "config.h" | 24 | #include "config.h" |
25 | #include "kernel.h" | 25 | #include "kernel.h" |
26 | #include "thread.h" | 26 | #include "thread.h" |
27 | #include "button.h" | 27 | #include "action.h" |
28 | #include "settings.h" | 28 | #include "settings.h" |
29 | #include "disk.h" | 29 | #include "disk.h" |
30 | #include "panic.h" | 30 | #include "panic.h" |
@@ -612,6 +612,7 @@ static const struct bit_entry hd_bits[] = | |||
612 | {2, S_O(eq_hw_band4_cutoff), 1, "eq hardware band 4 cutoff", "5.3kHz,6.9kHz,9kHz,11.7kHz" }, | 612 | {2, S_O(eq_hw_band4_cutoff), 1, "eq hardware band 4 cutoff", "5.3kHz,6.9kHz,9kHz,11.7kHz" }, |
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 | {1, S_O(hold_lr_for_scroll_in_list), true, "hold_lr_for_scroll_in_list", off_on }, | ||
615 | 616 | ||
616 | {2, S_O(show_path_in_browser), 0, "show path in browser", "off,current directory,full path" }, | 617 | {2, S_O(show_path_in_browser), 0, "show path in browser", "off,current directory,full path" }, |
617 | 618 | ||
@@ -1799,7 +1800,7 @@ void settings_reset(void) { | |||
1799 | #ifdef HAVE_LCD_BITMAP | 1800 | #ifdef HAVE_LCD_BITMAP |
1800 | global_settings.kbd_file[0] = '\0'; | 1801 | global_settings.kbd_file[0] = '\0'; |
1801 | #endif | 1802 | #endif |
1802 | 1803 | global_settings.hold_lr_for_scroll_in_list = true; | |
1803 | } | 1804 | } |
1804 | 1805 | ||
1805 | bool set_bool(const char* string, bool* variable ) | 1806 | bool set_bool(const char* string, bool* variable ) |
@@ -1891,7 +1892,7 @@ bool do_set_setting(const unsigned char* string, void *variable, | |||
1891 | struct value_setting_data *cb_data, | 1892 | struct value_setting_data *cb_data, |
1892 | void (*function)(int)) | 1893 | void (*function)(int)) |
1893 | { | 1894 | { |
1894 | int button; | 1895 | int action; |
1895 | bool done = false; | 1896 | bool done = false; |
1896 | struct gui_synclist lists; | 1897 | struct gui_synclist lists; |
1897 | int oldvalue; | 1898 | int oldvalue; |
@@ -1918,11 +1919,11 @@ bool do_set_setting(const unsigned char* string, void *variable, | |||
1918 | while (!done) | 1919 | while (!done) |
1919 | { | 1920 | { |
1920 | 1921 | ||
1921 | button = button_get(true); | 1922 | action = get_action(CONTEXT_LIST,TIMEOUT_BLOCK); |
1922 | if (button == BUTTON_NONE) | 1923 | if (action == ACTION_NONE) |
1923 | continue; | 1924 | continue; |
1924 | 1925 | ||
1925 | if (gui_synclist_do_button(&lists,button)) | 1926 | if (gui_synclist_do_button(&lists,action)) |
1926 | { | 1927 | { |
1927 | if (global_settings.talk_menu) | 1928 | if (global_settings.talk_menu) |
1928 | { | 1929 | { |
@@ -1946,7 +1947,7 @@ bool do_set_setting(const unsigned char* string, void *variable, | |||
1946 | *(bool*)variable = gui_synclist_get_sel_pos(&lists) ? true : false; | 1947 | *(bool*)variable = gui_synclist_get_sel_pos(&lists) ? true : false; |
1947 | else *(int*)variable = gui_synclist_get_sel_pos(&lists); | 1948 | else *(int*)variable = gui_synclist_get_sel_pos(&lists); |
1948 | } | 1949 | } |
1949 | else if (button == SETTINGS_CANCEL) | 1950 | else if (action == ACTION_STD_CANCEL) |
1950 | { | 1951 | { |
1951 | gui_syncsplash(HZ/2,true,str(LANG_MENU_SETTING_CANCEL)); | 1952 | gui_syncsplash(HZ/2,true,str(LANG_MENU_SETTING_CANCEL)); |
1952 | if (cb_data->type == INT) | 1953 | if (cb_data->type == INT) |
@@ -1954,11 +1955,11 @@ bool do_set_setting(const unsigned char* string, void *variable, | |||
1954 | else *(bool*)variable = (bool)oldvalue; | 1955 | else *(bool*)variable = (bool)oldvalue; |
1955 | done = true; | 1956 | done = true; |
1956 | } | 1957 | } |
1957 | else if (button == SETTINGS_OK) | 1958 | else if (action == ACTION_STD_OK) |
1958 | { | 1959 | { |
1959 | done = true; | 1960 | done = true; |
1960 | } | 1961 | } |
1961 | else if(default_event_handler(button) == SYS_USB_CONNECTED) | 1962 | else if(default_event_handler(action) == SYS_USB_CONNECTED) |
1962 | return true; | 1963 | return true; |
1963 | gui_syncstatusbar_draw(&statusbars, false); | 1964 | gui_syncstatusbar_draw(&statusbars, false); |
1964 | if ( function ) | 1965 | if ( function ) |