diff --git a/src/option.c b/src/option.c index 2898266f9..a533d5bdf 100644 --- a/src/option.c +++ b/src/option.c @@ -35,6 +35,7 @@ #include "setup.h" /* For save_setup() */ #include "main.h" #include "profile.h" /* For sync_profiles */ +#include "strutil.h" #include "panel.h" /* Needed for the externs */ #include "file.h" /* safe_delete */ @@ -124,12 +125,12 @@ init_configure (void) title2 = _(" Pause after run... "); title3 = _(" Other options "); - first_width = strlen (title1) + 1; - second_width = strlen (title3) + 1; + first_width = str_term_width1 (title1) + 1; + second_width = str_term_width1 (title3) + 1; for (i = 0; check_options[i].text; i++) { check_options[i].text = _(check_options[i].text); - l1 = strlen (check_options[i].text) + 7; + l1 = str_term_width1 (check_options[i].text) + 7; if (i >= OTHER_OPTIONS) { if (l1 > first_width) first_width = l1; @@ -142,23 +143,23 @@ init_configure (void) i = PAUSE_OPTIONS; while (i--) { pause_options[i] = _(pause_options[i]); - l1 = strlen (pause_options[i]) + 7; + l1 = str_term_width1 (pause_options[i]) + 7; if (l1 > first_width) first_width = l1; } - l1 = strlen (title2) + 1; + l1 = str_term_width1 (title2) + 1; if (l1 > first_width) first_width = l1; - l1 = 11 + strlen (ok_button) - + strlen (save_button) - + strlen (cancel_button); + l1 = 11 + str_term_width1 (ok_button) + + str_term_width1 (save_button) + + str_term_width1 (cancel_button); i = (first_width + second_width - l1) / 4; b1 = 5 + i; - b2 = b1 + strlen (ok_button) + i + 6; - b3 = b2 + strlen (save_button) + i + 4; + b2 = b1 + str_term_width1 (ok_button) + i + 6; + b3 = b2 + str_term_width1 (save_button) + i + 4; i18n_config_flag = 1; }