From fca2a28f7dae3eaa34cec1e5c1ec31c884ff1c99 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Fri, 8 Nov 2019 15:42:31 -0300 Subject: [PATCH] Fixing charset issue. --- src/pw3270/hostdialog.c | 1 + src/pw3270/main.c | 4 ++-- src/pw3270/tools.c | 5 ----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/pw3270/hostdialog.c b/src/pw3270/hostdialog.c index 2723967..c97e1d1 100644 --- a/src/pw3270/hostdialog.c +++ b/src/pw3270/hostdialog.c @@ -49,6 +49,7 @@ set_string_to_config("terminal","oversize",pw3270_get_oversize(gtk_widget_get_toplevel(widget))); set_integer_to_config("terminal","model_number",lib3270_get_model_number(hSession)); set_string_to_config("terminal","model_name","%s",lib3270_get_model_name(hSession)); + set_string_to_config("terminal","host_charset",lib3270_get_host_charset(hSession)); } diff --git a/src/pw3270/main.c b/src/pw3270/main.c index 8766081..d454a38 100644 --- a/src/pw3270/main.c +++ b/src/pw3270/main.c @@ -61,7 +61,7 @@ static const gchar * systype = NULL; static const gchar * toggleset = NULL; static const gchar * togglereset = NULL; - static const gchar * charset = NULL; + static const gchar * charset = "bracket"; static const gchar * remap = NULL; static const gchar * model = NULL; static const gchar * oversize = NULL; @@ -347,7 +347,7 @@ int main(int argc, char *argv[]) { "systype", 't', 0, G_OPTION_ARG_STRING, &systype, N_( "Host system type" ), "S390" }, { "toggleset", 'S', 0, G_OPTION_ARG_STRING, &toggleset, N_( "Set toggles ON" ), NULL }, { "togglereset", 'R', 0, G_OPTION_ARG_STRING, &togglereset, N_( "Set toggles OFF" ), NULL }, - { "charset", 'C', 0, G_OPTION_ARG_STRING, &charset, N_( "Set host charset" ), NULL }, + { "charset", 'C', 0, G_OPTION_ARG_STRING, &charset, N_( "Set host charset" ), "bracket" }, { "remap", 'm', 0, G_OPTION_ARG_FILENAME, &remap, N_( "Remap charset from xml file" ), NULL }, { "model", 'M', 0, G_OPTION_ARG_STRING, &model, N_( "The model of 3270 display to be emulated" ), NULL }, { "oversize", 'O', 0, G_OPTION_ARG_STRING, &oversize, N_( "Makes the screen larger than the default for the chosen model number." ), NULL }, diff --git a/src/pw3270/tools.c b/src/pw3270/tools.c index 500c4f3..a281bbe 100644 --- a/src/pw3270/tools.c +++ b/src/pw3270/tools.c @@ -314,11 +314,6 @@ LIB3270_EXPORT void pw3270_set_host_charset(GtkWidget *widget, const gchar *name g_signal_connect(dialog,"response",G_CALLBACK(gtk_widget_destroy),NULL); gtk_widget_show_all(dialog); - /* - gtk_dialog_run(GTK_DIALOG (dialog)); - gtk_widget_destroy(dialog); - */ - } LIB3270_EXPORT void pw3270_set_action_state(GtkAction *action, gboolean on) -- libgit2 0.21.2