Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
e2255584
Commit
e2255584
authored
Feb 06, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Conversion of input string from utf8 to ISO8859
parent
8a3fd98b
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
107 additions
and
50 deletions
+107
-50
wb/lib/wb/gtk/wb_foe_gtk.cpp
wb/lib/wb/gtk/wb_foe_gtk.cpp
+7
-5
wb/lib/wb/gtk/wb_watt_gtk.cpp
wb/lib/wb/gtk/wb_watt_gtk.cpp
+20
-9
wb/lib/wb/gtk/wb_wda_gtk.cpp
wb/lib/wb/gtk/wb_wda_gtk.cpp
+19
-7
wb/lib/wb/gtk/wb_wtt_gtk.cpp
wb/lib/wb/gtk/wb_wtt_gtk.cpp
+11
-5
xtt/exe/rt_xtt/gtk/rt_xtt_gtk.cpp
xtt/exe/rt_xtt/gtk/rt_xtt_gtk.cpp
+11
-5
xtt/lib/ge/gtk/ge_attr_gtk.cpp
xtt/lib/ge/gtk/ge_attr_gtk.cpp
+9
-5
xtt/lib/ge/gtk/ge_gtk.cpp
xtt/lib/ge/gtk/ge_gtk.cpp
+10
-5
xtt/lib/xtt/gtk/xtt_xatt_gtk.cpp
xtt/lib/xtt/gtk/xtt_xatt_gtk.cpp
+20
-9
No files found.
wb/lib/wb/gtk/wb_foe_gtk.cpp
View file @
e2255584
/*
* Proview $Id: wb_foe_gtk.cpp,v 1.
5 2007-01-24 12:42:44
claes Exp $
* Proview $Id: wb_foe_gtk.cpp,v 1.
6 2007-02-06 10:06:40
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -528,17 +528,19 @@ void WFoeGtk::activate_edit_togg( GtkWidget *w, gpointer data)
void
WFoeGtk
::
valchanged_textinput
(
GtkWidget
*
w
,
gpointer
data
)
{
WFoeGtk
*
foe
=
(
WFoeGtk
*
)
data
;
char
*
value
;
char
*
value
,
*
valueutf8
;
int
sts
;
if
(
foe
->
widgets
.
textinput
==
0
)
return
;
value
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
foe
->
widgets
.
textinput
),
0
,
-
1
);
if
(
*
value
==
0
)
{
g_free
(
value
);
value
utf8
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
foe
->
widgets
.
textinput
),
0
,
-
1
);
if
(
*
value
utf8
==
0
)
{
g_free
(
value
utf8
);
return
;
}
value
=
g_convert
(
valueutf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
valueutf8
);
strcpy
(
foe
->
searchstring
,
value
);
...
...
wb/lib/wb/gtk/wb_watt_gtk.cpp
View file @
e2255584
/*
* Proview $Id: wb_watt_gtk.cpp,v 1.
3 2007-02-05 09:35:26
claes Exp $
* Proview $Id: wb_watt_gtk.cpp,v 1.
4 2007-02-06 10:06:41
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -251,13 +251,16 @@ void WAttGtk::change_value_close()
if
(
input_open
)
{
if
(
input_multiline
)
{
gchar
*
text
;
gchar
*
text
,
*
textutf8
;
GtkTextIter
start_iter
,
end_iter
;
gtk_text_buffer_get_start_iter
(
cmd_scrolled_buffer
,
&
start_iter
);
gtk_text_buffer_get_end_iter
(
cmd_scrolled_buffer
,
&
end_iter
);
text
=
gtk_text_buffer_get_text
(
cmd_scrolled_buffer
,
&
start_iter
,
&
end_iter
,
text
utf8
=
gtk_text_buffer_get_text
(
cmd_scrolled_buffer
,
&
start_iter
,
&
end_iter
,
FALSE
);
text
=
g_convert
(
textutf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
textutf8
);
// Replace ctrl characters with space
for
(
s
=
(
unsigned
char
*
)
text
;
*
s
;
s
++
)
{
if
(
*
s
<
' '
&&
*
s
!=
10
&&
*
s
!=
13
)
...
...
@@ -279,8 +282,11 @@ void WAttGtk::change_value_close()
wattnav
->
set_inputfocus
();
}
else
{
char
*
text
;
text
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
cmd_input
),
0
,
-
1
);
char
*
text
,
*
textutf8
;
textutf8
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
cmd_input
),
0
,
-
1
);
text
=
g_convert
(
textutf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
textutf8
);
sts
=
wattnav
->
set_attr_value
(
input_node
,
input_name
,
text
);
g_free
(
text
);
...
...
@@ -297,7 +303,7 @@ void WAttGtk::change_value_close()
void
WAttGtk
::
activate_cmd_input
(
GtkWidget
*
w
,
gpointer
data
)
{
char
*
text
;
char
*
text
,
*
textutf8
;
WAttGtk
*
watt
=
(
WAttGtk
*
)
data
;
int
sts
;
...
...
@@ -306,7 +312,9 @@ void WAttGtk::activate_cmd_input( GtkWidget *w, gpointer data)
watt
->
wattnav
->
set_inputfocus
();
text
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
w
),
0
,
-
1
);
textutf8
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
w
),
0
,
-
1
);
text
=
g_convert
(
textutf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
textutf8
);
if
(
watt
->
input_open
)
{
sts
=
((
WAttNav
*
)
watt
->
wattnav
)
->
set_attr_value
(
watt
->
input_node
,
watt
->
input_name
,
text
);
...
...
@@ -322,7 +330,7 @@ void WAttGtk::activate_cmd_input( GtkWidget *w, gpointer data)
void
WAttGtk
::
activate_cmd_scrolled_ok
(
GtkWidget
*
w
,
gpointer
data
)
{
WAttGtk
*
watt
=
(
WAttGtk
*
)
data
;
gchar
*
text
;
gchar
*
text
,
*
textutf8
;
unsigned
char
*
s
;
int
sts
;
...
...
@@ -331,8 +339,11 @@ void WAttGtk::activate_cmd_scrolled_ok( GtkWidget *w, gpointer data)
gtk_text_buffer_get_start_iter
(
watt
->
cmd_scrolled_buffer
,
&
start_iter
);
gtk_text_buffer_get_end_iter
(
watt
->
cmd_scrolled_buffer
,
&
end_iter
);
text
=
gtk_text_buffer_get_text
(
watt
->
cmd_scrolled_buffer
,
&
start_iter
,
&
end_iter
,
text
utf8
=
gtk_text_buffer_get_text
(
watt
->
cmd_scrolled_buffer
,
&
start_iter
,
&
end_iter
,
FALSE
);
text
=
g_convert
(
textutf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
textutf8
);
// Replace ctrl characters with space
for
(
s
=
(
unsigned
char
*
)
text
;
*
s
;
s
++
)
{
if
(
*
s
<
' '
&&
*
s
!=
10
&&
*
s
!=
13
)
...
...
wb/lib/wb/gtk/wb_wda_gtk.cpp
View file @
e2255584
/*
* Proview $Id: wb_wda_gtk.cpp,v 1.
1 2007-01-04 07:29:02
claes Exp $
* Proview $Id: wb_wda_gtk.cpp,v 1.
2 2007-02-06 10:06:41
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -212,11 +212,17 @@ void WdaGtk::class_activate_ok( GtkWidget *w, gpointer data)
WdaGtk
*
wda
=
(
WdaGtk
*
)
data
;
char
*
hiername
;
char
*
classname
;
char
*
utf8
;
int
sts
;
pwr_tClassId
new_classid
;
hiername
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
wda
->
wdaclass_hiervalue
),
0
,
-
1
);
classname
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
wda
->
wdaclass_classvalue
),
0
,
-
1
);
utf8
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
wda
->
wdaclass_hiervalue
),
0
,
-
1
);
hiername
=
g_convert
(
utf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
utf8
);
utf8
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
wda
->
wdaclass_classvalue
),
0
,
-
1
);
classname
=
g_convert
(
utf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
utf8
);
wda
->
attrobjects
=
(
int
)
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
wda
->
wdaclass_attrobjects
));
if
(
strcmp
(
hiername
,
""
)
==
0
)
...
...
@@ -352,8 +358,11 @@ void WdaGtk::change_value_close()
wdanav
->
set_inputfocus
();
}
else
{
char
*
text
;
text
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
cmd_input
),
0
,
-
1
);
char
*
text
,
*
textutf8
;
textutf8
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
cmd_input
),
0
,
-
1
);
text
=
g_convert
(
textutf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
textutf8
);
sts
=
wdanav
->
set_attr_value
(
input_node
,
input_name
,
text
);
g_free
(
text
);
...
...
@@ -370,7 +379,7 @@ void WdaGtk::change_value_close()
void
WdaGtk
::
activate_cmd_input
(
GtkWidget
*
w
,
gpointer
data
)
{
char
*
text
;
char
*
text
,
*
textutf8
;
WdaGtk
*
wda
=
(
WdaGtk
*
)
data
;
int
sts
;
...
...
@@ -379,7 +388,10 @@ void WdaGtk::activate_cmd_input( GtkWidget *w, gpointer data)
wda
->
wdanav
->
set_inputfocus
();
text
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
w
),
0
,
-
1
);
textutf8
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
w
),
0
,
-
1
);
text
=
g_convert
(
textutf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
textutf8
);
if
(
wda
->
input_open
)
{
sts
=
wda
->
wdanav
->
set_attr_value
(
wda
->
input_node
,
wda
->
input_name
,
text
);
...
...
wb/lib/wb/gtk/wb_wtt_gtk.cpp
View file @
e2255584
/*
* Proview $Id: wb_wtt_gtk.cpp,v 1.
8 2007-02-05 09:34:37
claes Exp $
* Proview $Id: wb_wtt_gtk.cpp,v 1.
9 2007-02-06 10:06:41
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1183,9 +1183,12 @@ void WttGtk::valchanged_cmd_input( GtkWidget *w, gpointer data)
{
Wtt
*
wtt
=
(
Wtt
*
)
data
;
int
sts
;
char
*
text
;
char
*
text
,
*
textutf8
;
textutf8
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
w
),
0
,
-
1
);
text
=
g_convert
(
textutf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
textutf8
);
text
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
w
),
0
,
-
1
);
if
(
wtt
->
input_open
)
{
switch
(
wtt
->
input_mode
)
{
case
wtt_eInputMode_Attribute
:
...
...
@@ -1228,10 +1231,13 @@ void WttGtk::valchanged_cmd_input( GtkWidget *w, gpointer data)
void
WttGtk
::
activate_india_ok
(
GtkWidget
*
w
,
gpointer
data
)
{
Wtt
*
wtt
=
(
Wtt
*
)
data
;
char
*
text
;
char
*
text
,
*
textutf8
;
text
=
gtk_editable_get_chars
(
GTK_EDITABLE
(((
WttGtk
*
)
wtt
)
->
india_text
),
text
utf8
=
gtk_editable_get_chars
(
GTK_EDITABLE
(((
WttGtk
*
)
wtt
)
->
india_text
),
0
,
-
1
);
text
=
g_convert
(
textutf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
textutf8
);
g_object_set
(
((
WttGtk
*
)
wtt
)
->
india_widget
,
"visible"
,
FALSE
,
NULL
);
(
wtt
->
india_ok_cb
)(
wtt
,
text
);
...
...
xtt/exe/rt_xtt/gtk/rt_xtt_gtk.cpp
View file @
e2255584
/*
* Proview $Id: rt_xtt_gtk.cpp,v 1.
5 2007-01-17 10:33:55
claes Exp $
* Proview $Id: rt_xtt_gtk.cpp,v 1.
6 2007-02-06 10:06:41
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -400,10 +400,13 @@ void XttGtk::activate_back( GtkWidget *w, gpointer data)
void
XttGtk
::
activate_india_ok
(
GtkWidget
*
w
,
gpointer
data
)
{
Xtt
*
xtt
=
(
Xtt
*
)
data
;
char
*
text
;
char
*
text
,
*
textutf8
;
text
=
gtk_editable_get_chars
(
GTK_EDITABLE
(((
XttGtk
*
)
xtt
)
->
india_text
),
text
utf8
=
gtk_editable_get_chars
(
GTK_EDITABLE
(((
XttGtk
*
)
xtt
)
->
india_text
),
0
,
-
1
);
text
=
g_convert
(
textutf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
textutf8
);
g_object_set
(
((
XttGtk
*
)
xtt
)
->
india_widget
,
"visible"
,
FALSE
,
NULL
);
(
xtt
->
india_ok_cb
)(
xtt
,
text
);
...
...
@@ -435,9 +438,12 @@ void XttGtk::valchanged_cmd_input( GtkWidget *w, gpointer data)
{
Xtt
*
xtt
=
(
Xtt
*
)
data
;
int
sts
;
char
*
text
;
char
*
text
,
*
textutf8
;
textutf8
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
w
),
0
,
-
1
);
text
=
g_convert
(
textutf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
textutf8
);
text
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
w
),
0
,
-
1
);
if
(
xtt
->
input_open
)
{
sts
=
xtt
->
xnav
->
set_attr_value
(
text
);
g_object_set
(
w
,
"visible"
,
FALSE
,
NULL
);
...
...
xtt/lib/ge/gtk/ge_attr_gtk.cpp
View file @
e2255584
/*
* Proview $Id: ge_attr_gtk.cpp,v 1.
2 2007-01-12 07:58:06
claes Exp $
* Proview $Id: ge_attr_gtk.cpp,v 1.
3 2007-02-06 10:06:41
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -207,7 +207,7 @@ static gboolean attr_focus_in_event( GtkWidget *w, GdkEvent *event, gpointer dat
static
void
attr_activate_cmd_input
(
GtkWidget
*
w
,
gpointer
data
)
{
char
*
text
;
char
*
text
,
*
textutf8
;
AttrGtk
*
attr
=
(
AttrGtk
*
)
data
;
int
sts
;
...
...
@@ -216,7 +216,9 @@ static void attr_activate_cmd_input( GtkWidget *w, gpointer data)
attr
->
attrnav
->
set_inputfocus
();
text
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
w
),
0
,
-
1
);
textutf8
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
w
),
0
,
-
1
);
text
=
g_convert
(
textutf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
textutf8
);
if
(
attr
->
input_open
)
{
sts
=
((
AttrNav
*
)
attr
->
attrnav
)
->
set_attr_value
(
text
);
g_object_set
(
w
,
"visible"
,
FALSE
,
NULL
);
...
...
@@ -232,7 +234,7 @@ static void attr_activate_cmd_input( GtkWidget *w, gpointer data)
static
void
attr_activate_cmd_scrolled_ok
(
GtkWidget
*
w
,
gpointer
data
)
{
AttrGtk
*
attr
=
(
AttrGtk
*
)
data
;
gchar
*
text
;
gchar
*
text
,
*
textutf8
;
int
sts
;
if
(
attr
->
input_open
)
{
...
...
@@ -240,8 +242,10 @@ static void attr_activate_cmd_scrolled_ok( GtkWidget *w, gpointer data)
gtk_text_buffer_get_start_iter
(
attr
->
cmd_scrolled_buffer
,
&
start_iter
);
gtk_text_buffer_get_end_iter
(
attr
->
cmd_scrolled_buffer
,
&
end_iter
);
text
=
gtk_text_buffer_get_text
(
attr
->
cmd_scrolled_buffer
,
&
start_iter
,
&
end_iter
,
text
utf8
=
gtk_text_buffer_get_text
(
attr
->
cmd_scrolled_buffer
,
&
start_iter
,
&
end_iter
,
FALSE
);
text
=
g_convert
(
textutf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
textutf8
);
sts
=
attr
->
attrnav
->
set_attr_value
(
text
);
g_object_set
(
attr
->
cmd_scrolledinput
,
"visible"
,
FALSE
,
NULL
);
...
...
xtt/lib/ge/gtk/ge_gtk.cpp
View file @
e2255584
/*
* Proview $Id: ge_gtk.cpp,v 1.
7 2007-02-06 07:30:35
claes Exp $
* Proview $Id: ge_gtk.cpp,v 1.
8 2007-02-06 10:06:41
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1130,9 +1130,12 @@ void GeGtk::activate_help(GtkWidget *w, gpointer gectx)
void
GeGtk
::
activate_india_ok
(
GtkWidget
*
w
,
gpointer
gectx
)
{
char
*
text
;
char
*
text
,
*
textutf8
;
textutf8
=
gtk_editable_get_chars
(
GTK_EDITABLE
(((
GeGtk
*
)
gectx
)
->
india_text
),
0
,
-
1
);
text
=
g_convert
(
textutf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
textutf8
);
text
=
gtk_editable_get_chars
(
GTK_EDITABLE
(((
GeGtk
*
)
gectx
)
->
india_text
),
0
,
-
1
);
g_object_set
(
((
GeGtk
*
)
gectx
)
->
india_widget
,
"visible"
,
FALSE
,
NULL
);
((
Ge
*
)
gectx
)
->
activate_india_ok
(
text
);
g_free
(
text
);
...
...
@@ -1171,9 +1174,11 @@ void GeGtk::valchanged_cmd_input( GtkWidget *w, gpointer data)
{
GeGtk
*
gectx
=
(
GeGtk
*
)
data
;
int
sts
;
char
*
text
;
char
*
text
,
*
textutf8
;
text
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
w
),
0
,
-
1
);
textutf8
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
w
),
0
,
-
1
);
text
=
g_convert
(
textutf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
textutf8
);
if
(
gectx
->
text_input_open
)
{
gectx
->
graph
->
change_text
(
gectx
->
current_text_object
,
text
);
...
...
xtt/lib/xtt/gtk/xtt_xatt_gtk.cpp
View file @
e2255584
/*
* Proview $Id: xtt_xatt_gtk.cpp,v 1.
2 2007-01-11 11:40:3
1 claes Exp $
* Proview $Id: xtt_xatt_gtk.cpp,v 1.
3 2007-02-06 10:06:4
1 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -284,13 +284,15 @@ void XAttGtk::change_value_close()
if
(
input_open
)
{
if
(
input_multiline
)
{
gchar
*
text
;
gchar
*
text
,
*
textutf8
;
GtkTextIter
start_iter
,
end_iter
;
gtk_text_buffer_get_start_iter
(
cmd_scrolled_buffer
,
&
start_iter
);
gtk_text_buffer_get_end_iter
(
cmd_scrolled_buffer
,
&
end_iter
);
text
=
gtk_text_buffer_get_text
(
cmd_scrolled_buffer
,
&
start_iter
,
&
end_iter
,
text
utf8
=
gtk_text_buffer_get_text
(
cmd_scrolled_buffer
,
&
start_iter
,
&
end_iter
,
FALSE
);
text
=
g_convert
(
textutf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
textutf8
);
sts
=
xattnav
->
set_attr_value
(
input_node
,
input_name
,
text
);
...
...
@@ -307,8 +309,12 @@ void XAttGtk::change_value_close()
xattnav
->
set_inputfocus
();
}
else
{
char
*
text
;
text
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
cmd_input
),
0
,
-
1
);
char
*
text
,
*
textutf8
;
textutf8
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
cmd_input
),
0
,
-
1
);
text
=
g_convert
(
textutf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
textutf8
);
sts
=
xattnav
->
set_attr_value
(
input_node
,
input_name
,
text
);
g_free
(
text
);
...
...
@@ -325,7 +331,7 @@ void XAttGtk::change_value_close()
void
XAttGtk
::
activate_cmd_input
(
GtkWidget
*
w
,
gpointer
data
)
{
char
*
text
;
char
*
text
,
*
textutf8
;
XAttGtk
*
xatt
=
(
XAttGtk
*
)
data
;
int
sts
;
...
...
@@ -334,7 +340,10 @@ void XAttGtk::activate_cmd_input( GtkWidget *w, gpointer data)
xatt
->
xattnav
->
set_inputfocus
();
text
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
w
),
0
,
-
1
);
textutf8
=
gtk_editable_get_chars
(
GTK_EDITABLE
(
w
),
0
,
-
1
);
text
=
g_convert
(
textutf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
textutf8
);
if
(
xatt
->
input_open
)
{
sts
=
xatt
->
xattnav
->
set_attr_value
(
xatt
->
input_node
,
xatt
->
input_name
,
text
);
...
...
@@ -350,7 +359,7 @@ void XAttGtk::activate_cmd_input( GtkWidget *w, gpointer data)
void
XAttGtk
::
activate_cmd_scrolled_ok
(
GtkWidget
*
w
,
gpointer
data
)
{
XAttGtk
*
xatt
=
(
XAttGtk
*
)
data
;
gchar
*
text
;
gchar
*
text
,
*
textutf8
;
int
sts
;
if
(
xatt
->
input_open
)
{
...
...
@@ -358,8 +367,10 @@ void XAttGtk::activate_cmd_scrolled_ok( GtkWidget *w, gpointer data)
gtk_text_buffer_get_start_iter
(
xatt
->
cmd_scrolled_buffer
,
&
start_iter
);
gtk_text_buffer_get_end_iter
(
xatt
->
cmd_scrolled_buffer
,
&
end_iter
);
text
=
gtk_text_buffer_get_text
(
xatt
->
cmd_scrolled_buffer
,
&
start_iter
,
&
end_iter
,
text
utf8
=
gtk_text_buffer_get_text
(
xatt
->
cmd_scrolled_buffer
,
&
start_iter
,
&
end_iter
,
FALSE
);
text
=
g_convert
(
textutf8
,
-
1
,
"ISO8859-1"
,
"UTF-8"
,
NULL
,
NULL
,
NULL
);
g_free
(
textutf8
);
sts
=
xatt
->
xattnav
->
set_attr_value
(
xatt
->
input_node
,
xatt
->
input_name
,
text
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment