diff --git a/src/dialogs/load.c b/src/dialogs/load.c index 6a8d56a..adbc130 100644 --- a/src/dialogs/load.c +++ b/src/dialogs/load.c @@ -290,7 +290,7 @@ static void icon_press(GtkEntry *entry, G_GNUC_UNUSED GtkEntryIconPosition icon_ if(*error) return; - gboolean next = lib3270_paste( + gboolean next = lib3270_paste_text( v3270_get_session(dialog->terminal), (unsigned char *) converted ) ? TRUE : FALSE; diff --git a/src/selection/text.c b/src/selection/text.c index 4f10741..164b4ce 100644 --- a/src/selection/text.c +++ b/src/selection/text.c @@ -208,7 +208,7 @@ LIB3270_EXPORT void v3270_input_text(GtkWidget *widget, const gchar *text, const } // Do paste. - gboolean next = lib3270_paste( + gboolean next = lib3270_paste_text( v3270_get_session(widget), (unsigned char *) buffer ) ? TRUE : FALSE; diff --git a/src/terminal/charset.c b/src/terminal/charset.c index 63d980f..3aaa425 100644 --- a/src/terminal/charset.c +++ b/src/terminal/charset.c @@ -31,7 +31,7 @@ #include #include #include - #include +// #include #include #define ERROR_DOMAIN g_quark_from_static_string(PACKAGE_NAME) @@ -56,6 +56,22 @@ static unsigned short getChar(const gchar *id, GError **error) { + if(*error) { + return 0; + } + + unsigned short chr = lib3270_translate_char(id); + + if(!chr) { + *error = g_error_new(ERROR_DOMAIN,EINVAL,"%s",_( "Can't parse character value" )); + } + + return chr; + } + + /* + static unsigned short getChar(const gchar *id, GError **error) { + static struct { const char * name; @@ -303,6 +319,7 @@ return (unsigned short) *id; } + */ static lib3270_remap_scope getRemapScope(const gchar *str, GError **error) { -- libgit2 0.21.2