add in core viewer codepage selection from list

This commit is contained in:
Ilia Maslakov 2009-04-15 20:23:49 +00:00
parent 38c7e229d5
commit dbce157307

View File

@ -3653,12 +3653,13 @@ static void view_cmk_moveto_bottom (void *w, int n) {
static void
view_select_encoding (WView *view)
{
char *enc;
char *enc = NULL;
GIConv conv;
struct cache_line *line;
enc = input_dialog ("Encoding", "Paste encoding", NULL, "");
do_select_codepage ();
enc = g_strdup( get_codepage_id ( source_codepage ) );
if (enc != NULL) {
conv = str_crt_conv_from (enc);
if (conv != (iconv_t)(-1)) {
@ -3668,7 +3669,9 @@ view_select_encoding (WView *view)
line = view_offset_to_line (view, view->dpy_start);
view_set_first_showed (view, line);
}
g_free(enc);
}
}