Commit b4b905a191d3b6642963ef8ad6d8a32fc86f0245
1 parent
8b7ee4e5
Exists in
master
and in
1 other branch
Extendendo tratamento de charset para a classe base para implementação de extens…
…ões, incluindo novos métodos no plugin rexx
Showing
5 changed files
with
14 additions
and
14 deletions
Show diff stats
accessible.c
| ... | ... | @@ -195,7 +195,7 @@ static gunichar v3270_accessible_get_character_at_offset(AtkText *atk_text, gint |
| 195 | 195 | gchar * utfstring = g_convert_with_fallback( text, |
| 196 | 196 | -1, |
| 197 | 197 | "UTF-8", |
| 198 | - lib3270_get_charset(host), | |
| 198 | + lib3270_get_display_charset(host), | |
| 199 | 199 | " ", |
| 200 | 200 | NULL, |
| 201 | 201 | &bytes_written, |
| ... | ... | @@ -390,7 +390,7 @@ static gchar * v3270_accessible_get_text_at_offset(AtkText *atk_text, gint offse |
| 390 | 390 | gchar * utfchar = g_convert_with_fallback( text, |
| 391 | 391 | -1, |
| 392 | 392 | "UTF-8", |
| 393 | - lib3270_get_charset(host), | |
| 393 | + lib3270_get_display_charset(host), | |
| 394 | 394 | " ", |
| 395 | 395 | NULL, |
| 396 | 396 | &bytes_written, |
| ... | ... | @@ -433,7 +433,7 @@ static gchar * v3270_accessible_get_text(AtkText *atk_text, gint start_pos, gint |
| 433 | 433 | gsize bytes_written; |
| 434 | 434 | GError * error = NULL; |
| 435 | 435 | |
| 436 | - utftext = g_convert_with_fallback(text,-1,"UTF-8",lib3270_get_charset(host)," ",NULL,&bytes_written, &error); | |
| 436 | + utftext = g_convert_with_fallback(text,-1,"UTF-8",lib3270_get_display_charset(host)," ",NULL,&bytes_written, &error); | |
| 437 | 437 | |
| 438 | 438 | if(error) |
| 439 | 439 | { | ... | ... |
draw.c
| ... | ... | @@ -275,7 +275,7 @@ void v3270_draw_char(cairo_t *cr, unsigned char chr, unsigned short attr, H3270 |
| 275 | 275 | } |
| 276 | 276 | else if(chr) |
| 277 | 277 | { |
| 278 | - gchar *utf = g_convert((char *) &chr, 1, "UTF-8", lib3270_get_charset(session), NULL, NULL, NULL); | |
| 278 | + gchar *utf = g_convert((char *) &chr, 1, "UTF-8", lib3270_get_display_charset(session), NULL, NULL, NULL); | |
| 279 | 279 | |
| 280 | 280 | if(utf) |
| 281 | 281 | { | ... | ... |
keyboard.c
| ... | ... | @@ -247,7 +247,7 @@ |
| 247 | 247 | |
| 248 | 248 | host = GTK_V3270(widget)->host; |
| 249 | 249 | |
| 250 | - utf = g_convert((char *) str, -1, lib3270_get_charset(host), "UTF-8", NULL, NULL, NULL); | |
| 250 | + utf = g_convert((char *) str, -1, lib3270_get_display_charset(host), "UTF-8", NULL, NULL, NULL); | |
| 251 | 251 | |
| 252 | 252 | if(utf) |
| 253 | 253 | { |
| ... | ... | @@ -259,7 +259,7 @@ |
| 259 | 259 | |
| 260 | 260 | void v3270_key_commit(GtkIMContext *imcontext, gchar *str, v3270 *widget) |
| 261 | 261 | { |
| 262 | - gchar *utf = g_convert((char *) str, -1, lib3270_get_charset(widget->host), "UTF-8", NULL, NULL, NULL); | |
| 262 | + gchar *utf = g_convert((char *) str, -1, lib3270_get_display_charset(widget->host), "UTF-8", NULL, NULL, NULL); | |
| 263 | 263 | |
| 264 | 264 | if(utf) |
| 265 | 265 | { | ... | ... |
selection.c
| ... | ... | @@ -70,7 +70,7 @@ static void clipboard_get(GtkClipboard *clipboard, GtkSelectionData *selection, |
| 70 | 70 | } |
| 71 | 71 | else |
| 72 | 72 | { |
| 73 | - gchar * text = g_convert(widget->selection.text, -1, "UTF-8", lib3270_get_charset(widget->host), NULL, NULL, NULL); | |
| 73 | + gchar * text = g_convert(widget->selection.text, -1, "UTF-8", lib3270_get_display_charset(widget->host), NULL, NULL, NULL); | |
| 74 | 74 | gtk_selection_data_set_text(selection,text,-1); |
| 75 | 75 | g_free(text); |
| 76 | 76 | } |
| ... | ... | @@ -104,7 +104,7 @@ gchar * v3270_get_text(GtkWidget *widget, int offset, int len) |
| 104 | 104 | if(!str) |
| 105 | 105 | return NULL; |
| 106 | 106 | |
| 107 | - text = g_convert(str, -1, "UTF-8", lib3270_get_charset(terminal->host), NULL, NULL, NULL); | |
| 107 | + text = g_convert(str, -1, "UTF-8", lib3270_get_display_charset(terminal->host), NULL, NULL, NULL); | |
| 108 | 108 | |
| 109 | 109 | lib3270_free(str); |
| 110 | 110 | return text; |
| ... | ... | @@ -226,7 +226,7 @@ gchar * v3270_get_selected(GtkWidget *widget, gboolean cut) |
| 226 | 226 | text = update_selected_text(widget,cut); |
| 227 | 227 | |
| 228 | 228 | if(text) |
| 229 | - return g_convert(text, -1, "UTF-8", lib3270_get_charset(GTK_V3270(widget)->host), NULL, NULL, NULL); | |
| 229 | + return g_convert(text, -1, "UTF-8", lib3270_get_display_charset(GTK_V3270(widget)->host), NULL, NULL, NULL); | |
| 230 | 230 | |
| 231 | 231 | return NULL; |
| 232 | 232 | } |
| ... | ... | @@ -242,7 +242,7 @@ gchar * v3270_get_copy(GtkWidget *widget) |
| 242 | 242 | text = update_selected_text(widget,FALSE); |
| 243 | 243 | |
| 244 | 244 | if(text) |
| 245 | - return g_convert(text, -1, "UTF-8", lib3270_get_charset(GTK_V3270(widget)->host), NULL, NULL, NULL); | |
| 245 | + return g_convert(text, -1, "UTF-8", lib3270_get_display_charset(GTK_V3270(widget)->host), NULL, NULL, NULL); | |
| 246 | 246 | |
| 247 | 247 | return NULL; |
| 248 | 248 | } |
| ... | ... | @@ -266,7 +266,7 @@ void v3270_set_copy(GtkWidget *widget, const gchar *text) |
| 266 | 266 | |
| 267 | 267 | /* Received text, replace the selection buffer */ |
| 268 | 268 | terminal->table = 0; |
| 269 | - isotext = g_convert(text, -1, lib3270_get_charset(terminal->host), "UTF-8", NULL, NULL, NULL); | |
| 269 | + isotext = g_convert(text, -1, lib3270_get_display_charset(terminal->host), "UTF-8", NULL, NULL, NULL); | |
| 270 | 270 | |
| 271 | 271 | if(!isotext) |
| 272 | 272 | { |
| ... | ... | @@ -350,7 +350,7 @@ void v3270_paste_string(GtkWidget *widget, const gchar *text, const gchar *encod |
| 350 | 350 | { |
| 351 | 351 | gchar * buffer = NULL; |
| 352 | 352 | H3270 * session = v3270_get_session(widget); |
| 353 | - const gchar * charset = lib3270_get_charset(session); | |
| 353 | + const gchar * charset = lib3270_get_display_charset(session); | |
| 354 | 354 | gboolean next; |
| 355 | 355 | |
| 356 | 356 | if(!text) |
| ... | ... | @@ -504,7 +504,7 @@ gchar * v3270_get_region(GtkWidget *widget, gint start_pos, gint end_pos, gboole |
| 504 | 504 | if(!str) |
| 505 | 505 | return NULL; |
| 506 | 506 | |
| 507 | - utftext = g_convert(str, -1, "UTF-8", lib3270_get_charset(GTK_V3270(widget)->host), NULL, NULL, NULL); | |
| 507 | + utftext = g_convert(str, -1, "UTF-8", lib3270_get_display_charset(GTK_V3270(widget)->host), NULL, NULL, NULL); | |
| 508 | 508 | |
| 509 | 509 | lib3270_free(str); |
| 510 | 510 | ... | ... |
widget.c
| ... | ... | @@ -765,7 +765,7 @@ static void changed(H3270 *session, int offset, int len) |
| 765 | 765 | gchar * utfchar = g_convert_with_fallback( text, |
| 766 | 766 | -1, |
| 767 | 767 | "UTF-8", |
| 768 | - lib3270_get_charset(session), | |
| 768 | + lib3270_get_display_charset(session), | |
| 769 | 769 | " ", |
| 770 | 770 | NULL, |
| 771 | 771 | &bytes_written, | ... | ... |