|
@@ -318,7 +318,7 @@ static void draw_instruction_row ( int editing ) {
|
318
|
318
|
}
|
319
|
319
|
}
|
320
|
320
|
|
321
|
|
-static void main_loop ( struct config_context *context ) {
|
|
321
|
+static int main_loop ( struct config_context *context ) {
|
322
|
322
|
struct setting_widget widget;
|
323
|
323
|
unsigned int current = 0;
|
324
|
324
|
unsigned int next;
|
|
@@ -379,7 +379,7 @@ static void main_loop ( struct config_context *context ) {
|
379
|
379
|
alert ( " Could not save options: %s ",
|
380
|
380
|
strerror ( rc ) );
|
381
|
381
|
}
|
382
|
|
- return;
|
|
382
|
+ return rc;
|
383
|
383
|
default:
|
384
|
384
|
edit_setting ( &widget, key );
|
385
|
385
|
break;
|
|
@@ -394,7 +394,9 @@ static void main_loop ( struct config_context *context ) {
|
394
|
394
|
|
395
|
395
|
}
|
396
|
396
|
|
397
|
|
-void settings_ui ( struct config_context *context ) {
|
|
397
|
+int settings_ui ( struct config_context *context ) {
|
|
398
|
+ int rc;
|
|
399
|
+
|
398
|
400
|
initscr();
|
399
|
401
|
start_color();
|
400
|
402
|
init_pair ( CPAIR_NORMAL, COLOR_WHITE, COLOR_BLUE );
|
|
@@ -404,7 +406,9 @@ void settings_ui ( struct config_context *context ) {
|
404
|
406
|
color_set ( CPAIR_NORMAL, NULL );
|
405
|
407
|
erase();
|
406
|
408
|
|
407
|
|
- main_loop ( context );
|
|
409
|
+ rc = main_loop ( context );
|
408
|
410
|
|
409
|
411
|
endwin();
|
|
412
|
+
|
|
413
|
+ return rc;
|
410
|
414
|
}
|