summaryrefslogtreecommitdiff
path: root/apps/gui/option_select.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/option_select.c')
-rw-r--r--apps/gui/option_select.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c
index ff257a4925..9f1f0a64e3 100644
--- a/apps/gui/option_select.c
+++ b/apps/gui/option_select.c
@@ -60,7 +60,7 @@ static const char *option_get_timestring(char *buf, int buf_len,
60/* these two vars are needed so arbitrary values can be added to the 60/* these two vars are needed so arbitrary values can be added to the
61 TABLE_SETTING settings if the F_ALLOW_ARBITRARY_VALS flag is set */ 61 TABLE_SETTING settings if the F_ALLOW_ARBITRARY_VALS flag is set */
62static int table_setting_oldval = 0, table_setting_array_position = 0; 62static int table_setting_oldval = 0, table_setting_array_position = 0;
63const char *option_get_valuestring(const struct settings_list *setting, 63const char *option_get_valuestring(const struct settings_list *setting,
64 char *buffer, int buf_len, 64 char *buffer, int buf_len,
65 intptr_t temp_var) 65 intptr_t temp_var)
66{ 66{
@@ -202,7 +202,7 @@ void option_talk_value(const struct settings_list *setting, int value, bool enqu
202 } 202 }
203 } 203 }
204} 204}
205 205
206static int option_talk(int selected_item, void * data) 206static int option_talk(int selected_item, void * data)
207{ 207{
208 struct settings_list *setting = (struct settings_list *)data; 208 struct settings_list *setting = (struct settings_list *)data;
@@ -320,7 +320,7 @@ static int selection_to_val(const struct settings_list *setting, int selection)
320 else if ((setting->flags & F_TABLE_SETTING) == F_TABLE_SETTING) 320 else if ((setting->flags & F_TABLE_SETTING) == F_TABLE_SETTING)
321 { 321 {
322 const struct table_setting *info = setting->table_setting; 322 const struct table_setting *info = setting->table_setting;
323 if (setting->flags&F_ALLOW_ARBITRARY_VALS && 323 if (setting->flags&F_ALLOW_ARBITRARY_VALS &&
324 table_setting_array_position != -1 && 324 table_setting_array_position != -1 &&
325 (selection >= table_setting_array_position)) 325 (selection >= table_setting_array_position))
326 { 326 {
@@ -361,7 +361,7 @@ static int selection_to_val(const struct settings_list *setting, int selection)
361 return max- (selection * step); 361 return max- (selection * step);
362} 362}
363 363
364static const char * value_setting_get_name_cb(int selected_item, 364static const char * value_setting_get_name_cb(int selected_item,
365 void * data, 365 void * data,
366 char *buffer, 366 char *buffer,
367 size_t buffer_len) 367 size_t buffer_len)
@@ -492,16 +492,16 @@ bool option_screen(const struct settings_list *setting,
492 title = (char*)setting->cfg_vals; 492 title = (char*)setting->cfg_vals;
493 else 493 else
494 title = P2STR(option_title); 494 title = P2STR(option_title);
495 495
496 gui_synclist_set_title(&lists, title, Icon_Questionmark); 496 gui_synclist_set_title(&lists, title, Icon_Questionmark);
497 gui_synclist_set_icon_callback(&lists, NULL); 497 gui_synclist_set_icon_callback(&lists, NULL);
498 if(global_settings.talk_menu) 498 if(global_settings.talk_menu)
499 gui_synclist_set_voice_callback(&lists, option_talk); 499 gui_synclist_set_voice_callback(&lists, option_talk);
500 500
501 val_to_selection(setting, oldvalue, &nb_items, &selected, &function); 501 val_to_selection(setting, oldvalue, &nb_items, &selected, &function);
502 gui_synclist_set_nb_items(&lists, nb_items); 502 gui_synclist_set_nb_items(&lists, nb_items);
503 gui_synclist_select_item(&lists, selected); 503 gui_synclist_select_item(&lists, selected);
504 504
505 gui_synclist_limit_scroll(&lists, true); 505 gui_synclist_limit_scroll(&lists, true);
506 gui_synclist_draw(&lists); 506 gui_synclist_draw(&lists);
507 /* talk the item */ 507 /* talk the item */
@@ -551,7 +551,7 @@ bool option_screen(const struct settings_list *setting,
551 { 551 {
552 if (var_type == F_T_INT || var_type == F_T_UINT) 552 if (var_type == F_T_INT || var_type == F_T_UINT)
553 *(int*)setting->setting = *variable; 553 *(int*)setting->setting = *variable;
554 else 554 else
555 *(bool*)setting->setting = (*variable==1); 555 *(bool*)setting->setting = (*variable==1);
556 } 556 }
557 settings_save(); 557 settings_save();