comparison finch/libgnt/gntentry.c @ 28604:a18f421696dc

Fix showing umlauts etc. on non-utf8 locales.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 20 Nov 2009 21:45:44 +0000
parents f36c4a76a7ac
children 69decc147e5b
comparison
equal deleted inserted replaced
28603:8356e2f2486a 28604:a18f421696dc
21 */ 21 */
22 22
23 #include <ctype.h> 23 #include <ctype.h>
24 #include <string.h> 24 #include <string.h>
25 25
26 #include "gntinternal.h"
26 #include "gntbox.h" 27 #include "gntbox.h"
27 #include "gntentry.h" 28 #include "gntentry.h"
28 #include "gntmarshal.h" 29 #include "gntmarshal.h"
29 #include "gntstyle.h" 30 #include "gntstyle.h"
30 #include "gnttree.h" 31 #include "gnttree.h"
282 { 283 {
283 mvwhline(widget->window, 0, 0, gnt_ascii_only() ? '*' : ACS_BULLET, 284 mvwhline(widget->window, 0, 0, gnt_ascii_only() ? '*' : ACS_BULLET,
284 g_utf8_pointer_to_offset(entry->scroll, entry->end)); 285 g_utf8_pointer_to_offset(entry->scroll, entry->end));
285 } 286 }
286 else 287 else
287 mvwprintw(widget->window, 0, 0, "%s", entry->scroll); 288 mvwprintw(widget->window, 0, 0, "%s", C_(entry->scroll));
288 289
289 stop = gnt_util_onscreen_width(entry->scroll, entry->end); 290 stop = gnt_util_onscreen_width(entry->scroll, entry->end);
290 if (stop < widget->priv.width) 291 if (stop < widget->priv.width)
291 mvwhline(widget->window, 0, stop, ENTRY_CHAR, widget->priv.width - stop); 292 mvwhline(widget->window, 0, stop, ENTRY_CHAR, widget->priv.width - stop);
292 293