mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
add in core viewer codepage selection from list
Author: Ilia Maslakov <il.smind@gmail.com>
This commit is contained in:
parent
7658246c35
commit
6771a00b4c
@ -3652,12 +3652,13 @@ static void view_cmk_moveto_bottom (void *w, int n) {
|
|||||||
static void
|
static void
|
||||||
view_select_encoding (WView *view)
|
view_select_encoding (WView *view)
|
||||||
{
|
{
|
||||||
char *enc;
|
char *enc = NULL;
|
||||||
GIConv conv;
|
GIConv conv;
|
||||||
struct cache_line *line;
|
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) {
|
if (enc != NULL) {
|
||||||
conv = str_crt_conv_from (enc);
|
conv = str_crt_conv_from (enc);
|
||||||
if (conv != (iconv_t)(-1)) {
|
if (conv != (iconv_t)(-1)) {
|
||||||
@ -3667,7 +3668,9 @@ view_select_encoding (WView *view)
|
|||||||
line = view_offset_to_line (view, view->dpy_start);
|
line = view_offset_to_line (view, view->dpy_start);
|
||||||
view_set_first_showed (view, line);
|
view_set_first_showed (view, line);
|
||||||
}
|
}
|
||||||
|
g_free(enc);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user