Commit d8b7a2d48a383bf8b5e3d5b679cc25af78038623
1 parent
9c1ba45b
Exists in
master
and in
1 other branch
Moving charset translation to main library.
Showing
3 changed files
with
20 additions
and
3 deletions
Show diff stats
src/dialogs/load.c
... | ... | @@ -290,7 +290,7 @@ static void icon_press(GtkEntry *entry, G_GNUC_UNUSED GtkEntryIconPosition icon_ |
290 | 290 | if(*error) |
291 | 291 | return; |
292 | 292 | |
293 | - gboolean next = lib3270_paste( | |
293 | + gboolean next = lib3270_paste_text( | |
294 | 294 | v3270_get_session(dialog->terminal), |
295 | 295 | (unsigned char *) converted |
296 | 296 | ) ? TRUE : FALSE; | ... | ... |
src/selection/text.c
... | ... | @@ -208,7 +208,7 @@ LIB3270_EXPORT void v3270_input_text(GtkWidget *widget, const gchar *text, const |
208 | 208 | } |
209 | 209 | |
210 | 210 | // Do paste. |
211 | - gboolean next = lib3270_paste( | |
211 | + gboolean next = lib3270_paste_text( | |
212 | 212 | v3270_get_session(widget), |
213 | 213 | (unsigned char *) buffer |
214 | 214 | ) ? TRUE : FALSE; | ... | ... |
src/terminal/charset.c
... | ... | @@ -31,7 +31,7 @@ |
31 | 31 | #include <v3270.h> |
32 | 32 | #include <lib3270/charset.h> |
33 | 33 | #include <lib3270/log.h> |
34 | - #include <lib3270/X11keysym.h> | |
34 | +// #include <lib3270/X11keysym.h> | |
35 | 35 | #include <v3270/dialogs.h> |
36 | 36 | |
37 | 37 | #define ERROR_DOMAIN g_quark_from_static_string(PACKAGE_NAME) |
... | ... | @@ -56,6 +56,22 @@ |
56 | 56 | |
57 | 57 | static unsigned short getChar(const gchar *id, GError **error) { |
58 | 58 | |
59 | + if(*error) { | |
60 | + return 0; | |
61 | + } | |
62 | + | |
63 | + unsigned short chr = lib3270_translate_char(id); | |
64 | + | |
65 | + if(!chr) { | |
66 | + *error = g_error_new(ERROR_DOMAIN,EINVAL,"%s",_( "Can't parse character value" )); | |
67 | + } | |
68 | + | |
69 | + return chr; | |
70 | + } | |
71 | + | |
72 | + /* | |
73 | + static unsigned short getChar(const gchar *id, GError **error) { | |
74 | + | |
59 | 75 | static struct |
60 | 76 | { |
61 | 77 | const char * name; |
... | ... | @@ -303,6 +319,7 @@ |
303 | 319 | |
304 | 320 | return (unsigned short) *id; |
305 | 321 | } |
322 | + */ | |
306 | 323 | |
307 | 324 | static lib3270_remap_scope getRemapScope(const gchar *str, GError **error) { |
308 | 325 | ... | ... |