diff options
author | okan <okan> | 2011-06-27 12:46:54 +0000 |
---|---|---|
committer | okan <okan> | 2011-06-27 12:46:54 +0000 |
commit | 3db2d84fa8b36f43a72be28fe2c6700e70849552 (patch) | |
tree | 8dd4cf362cd62261664ae538f7df3b4bd3824058 /menu.c | |
parent | bcf90f5f3494e3406a1b66ed0b6f8232d55e1a16 (diff) | |
download | cwm-3db2d84fa8b36f43a72be28fe2c6700e70849552.tar.gz cwm-3db2d84fa8b36f43a72be28fe2c6700e70849552.tar.xz cwm-3db2d84fa8b36f43a72be28fe2c6700e70849552.zip |
UTF8-ify, from Alexander Polakov, but without setlocale(), after
feedback from stsp@ - thanks! 'go for it' oga@
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/menu.c b/menu.c index 04870fe..c8d63ac 100644 --- a/menu.c +++ b/menu.c @@ -31,8 +31,8 @@ #include "calmwm.h" -#define PROMPT_SCHAR '»' -#define PROMPT_ECHAR '«' +#define PROMPT_SCHAR "\xc2\xbb" +#define PROMPT_ECHAR "\xc2\xab" enum ctltype { CTL_NONE = -1, @@ -118,9 +118,9 @@ menu_filter(struct screen_ctx *sc, struct menu_q *menuq, char *prompt, mc.list = 1; } else { evmask = MenuMask | KeyMask; /* only accept keys if prompt */ - snprintf(mc.promptstr, sizeof(mc.promptstr), "%s%c", prompt, + snprintf(mc.promptstr, sizeof(mc.promptstr), "%s%s", prompt, PROMPT_SCHAR); - snprintf(mc.dispstr, sizeof(mc.dispstr), "%s%s%c", mc.promptstr, + snprintf(mc.dispstr, sizeof(mc.dispstr), "%s%s%s", mc.promptstr, mc.searchstr, PROMPT_ECHAR); mc.width = font_width(sc, mc.dispstr, strlen(mc.dispstr)); mc.hasprompt = 1; @@ -312,7 +312,7 @@ menu_draw(struct screen_ctx *sc, struct menu_ctx *mc, struct menu_q *menuq, mc->width = 0; dy = 0; if (mc->hasprompt) { - snprintf(mc->dispstr, sizeof(mc->dispstr), "%s%s%c", + snprintf(mc->dispstr, sizeof(mc->dispstr), "%s%s%s", mc->promptstr, mc->searchstr, PROMPT_ECHAR); mc->width = font_width(sc, mc->dispstr, strlen(mc->dispstr)); dy = font_height(sc); |