Commit 487a4b4e authored by Claes Sjofors's avatar Claes Sjofors

Wb and xtt bugfix for non ISO8859-1 chars

parent e4059625
...@@ -1491,6 +1491,11 @@ void WttGtk::valchanged_cmd_input( GtkWidget *w, gpointer data) ...@@ -1491,6 +1491,11 @@ void WttGtk::valchanged_cmd_input( GtkWidget *w, gpointer data)
text = g_convert( textutf8, -1, "ISO8859-1", "UTF-8", NULL, NULL, NULL); text = g_convert( textutf8, -1, "ISO8859-1", "UTF-8", NULL, NULL, NULL);
g_free( textutf8); g_free( textutf8);
if ( !text) {
wtt->wnav->wow->DisplayError( "Input error", "Invalid character");
return;
}
if ( wtt->input_open) { if ( wtt->input_open) {
switch( wtt->input_mode) { switch( wtt->input_mode) {
case wtt_eInputMode_Attribute: case wtt_eInputMode_Attribute:
......
...@@ -631,6 +631,16 @@ void XttGtk::valchanged_cmd_input( GtkWidget *w, gpointer data) ...@@ -631,6 +631,16 @@ void XttGtk::valchanged_cmd_input( GtkWidget *w, gpointer data)
text = g_convert( textutf8, -1, "ISO8859-1", "UTF-8", NULL, NULL, NULL); text = g_convert( textutf8, -1, "ISO8859-1", "UTF-8", NULL, NULL, NULL);
g_free( textutf8); g_free( textutf8);
if ( !text) {
g_object_set( w, "visible", FALSE, NULL);
xtt->set_prompt( "");
xtt->input_open = 0;
xtt->command_open = 0;
xtt->xnav->set_inputfocus();
xtt->message( 'E', "Input error, invalid character");
return;
}
if ( xtt->input_open) { if ( xtt->input_open) {
sts = xtt->xnav->set_attr_value( text); sts = xtt->xnav->set_attr_value( text);
g_object_set( w, "visible", FALSE, NULL); g_object_set( w, "visible", FALSE, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment