comparison finch/libgnt/gntutils.c @ 18872:85b155a574a3

libgnt.localize Start working towards non-utf8 locale support.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 11 Aug 2007 04:18:14 +0000
parents cf7297803a73
children 7066896f6628
comparison
equal deleted inserted replaced
18871:2e41a68009ba 18872:85b155a574a3
407 tb->button = button; 407 tb->button = button;
408 g_signal_connect(G_OBJECT(wid), "key_pressed", G_CALLBACK(key_pressed), tb); 408 g_signal_connect(G_OBJECT(wid), "key_pressed", G_CALLBACK(key_pressed), tb);
409 g_signal_connect_swapped(G_OBJECT(button), "destroy", G_CALLBACK(free_trigger_button), tb); 409 g_signal_connect_swapped(G_OBJECT(button), "destroy", G_CALLBACK(free_trigger_button), tb);
410 } 410 }
411 411
412 const char *gnt_util_localize_string(const char *string)
413 {
414 static char *loc = NULL;
415
416 g_free(loc);
417
418 loc = string ? g_locale_from_utf8(string, -1, NULL, NULL, NULL) : NULL;
419
420 return loc ? loc : string;
421 }
422