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
91e2b37b
Commit
91e2b37b
authored
Nov 03, 2009
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Translation and utf8 conversion of search condition in EventLog window fixed
parent
450572be
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
111 deletions
+51
-111
xtt/changelog.txt
xtt/changelog.txt
+4
-1
xtt/lib/xtt/gtk/xtt_hist_gtk.cpp
xtt/lib/xtt/gtk/xtt_hist_gtk.cpp
+4
-4
xtt/lib/xtt/src/xtt_hist.cpp
xtt/lib/xtt/src/xtt_hist.cpp
+26
-104
xtt/lib/xtt/src/xtt_hist.h
xtt/lib/xtt/src/xtt_hist.h
+1
-2
xtt/mmi/xtt/en_us/xtt_lng.dat
xtt/mmi/xtt/en_us/xtt_lng.dat
+8
-0
xtt/mmi/xtt/sv_se/xtt_lng.dat
xtt/mmi/xtt/sv_se/xtt_lng.dat
+8
-0
No files found.
xtt/changelog.txt
View file @
91e2b37b
...
...
@@ -148,4 +148,7 @@
090930 cs ge Java compile problems for subgraphs with multiple annotations fixed.
091020 cs xtt Bugfix in System Messages, zip-files >= version 10 was not opened in the correct order in next/prev file.
091029 cs xtt Bugfix in xtt logging, restore on attributes of attributeobject didn't work.
091029 cs xtt Bugfix in xtt logging, if showfile was activate before logging was terminated, xtt could segfault.
\ No newline at end of file
091029 cs xtt Bugfix in xtt logging, if showfile was activate before logging was terminated, xtt could segfault.
091102 cs ge Menu entry to create subgraphs added.
091102 cs ge Menu items for connections changed to radio items.
091103 cs xtt Translation and utf8 conversion of search condition in EventLog window fixed.
xtt/lib/xtt/gtk/xtt_hist_gtk.cpp
View file @
91e2b37b
...
...
@@ -678,10 +678,10 @@ void HistGtk::set_search_string( const char *s1, const char *s2,
const
char
*
s3
,
const
char
*
s4
)
{
gtk_label_set_text
(
GTK_LABEL
(
this
->
search_string_lbl_w
),
s1
);
gtk_label_set_text
(
GTK_LABEL
(
this
->
search_string2_lbl_w
),
s2
);
gtk_label_set_text
(
GTK_LABEL
(
this
->
search_string3_lbl_w
),
s3
);
gtk_label_set_text
(
GTK_LABEL
(
this
->
search_string4_lbl_w
),
s4
);
gtk_label_set_text
(
GTK_LABEL
(
this
->
search_string_lbl_w
),
CoWowGtk
::
convert_utf8
(
s1
)
);
gtk_label_set_text
(
GTK_LABEL
(
this
->
search_string2_lbl_w
),
CoWowGtk
::
convert_utf8
(
s2
)
);
gtk_label_set_text
(
GTK_LABEL
(
this
->
search_string3_lbl_w
),
CoWowGtk
::
convert_utf8
(
s3
)
);
gtk_label_set_text
(
GTK_LABEL
(
this
->
search_string4_lbl_w
),
CoWowGtk
::
convert_utf8
(
s4
)
);
}
...
...
xtt/lib/xtt/src/xtt_hist.cpp
View file @
91e2b37b
...
...
@@ -313,15 +313,7 @@ void Hist::get_hist_list()
dcli_translate_filename
(
dbName
,
DATABASE
);
switch
(
Lng
::
lang
)
{
case
lng_eLanguage_sv_se
:
printSearchStr_sv_se
();
break
;
default:
printSearchStr_en_us
();
break
;
}
printSearchStr
();
/*create the database if it's not already created*/
if
((
ret
=
db_create
(
&
dataBaseP
,
NULL
,
0
))
!=
0
)
...
...
@@ -658,36 +650,36 @@ int Hist::compareStr(char *ev, char *usr)
return
sts
;
}
void
Hist
::
printSearchStr
_en_us
()
void
Hist
::
printSearchStr
()
{
//return;
bool
addAnd
=
false
;
bool
prioPrinted
=
false
;
int
i
=
0
;
string
searchStr
[
4
];
searchStr
[
0
]
=
" All events"
;
searchStr
[
0
]
=
Lng
::
translate
(
" All events"
)
;
searchStr
[
1
]
=
""
;
searchStr
[
2
]
=
""
;
searchStr
[
3
]
=
""
;
if
((
minTime_str
!=
NULL
)
&&
(
strlen
(
minTime_str
)
>
0
)
)
{
searchStr
[
i
]
+=
" From "
;
searchStr
[
i
]
+=
Lng
::
translate
(
" from "
)
;
searchStr
[
i
]
+=
minTime_str
;
addAnd
=
true
;
}
if
((
maxTime_str
!=
NULL
)
&&
(
strlen
(
maxTime_str
)
>
0
)
)
{
searchStr
[
i
]
+=
" To "
;
searchStr
[
i
]
+=
Lng
::
translate
(
" to "
)
;
searchStr
[
i
]
+=
maxTime_str
;
addAnd
=
true
;
}
if
(
eventPrio_A
||
eventPrio_B
||
eventPrio_C
||
eventPrio_D
)
{
if
(
addAnd
)
searchStr
[
i
]
+=
" and"
;
if
(
addAnd
)
searchStr
[
i
]
+=
Lng
::
translate
(
" and"
)
;
i
++
;
prioPrinted
=
true
;
searchStr
[
i
]
+=
" with prio "
;
searchStr
[
i
]
+=
Lng
::
translate
(
" with prio "
)
;
if
(
eventPrio_A
)
searchStr
[
i
]
+=
"A"
;
if
(
eventPrio_B
)
...
...
@@ -700,33 +692,39 @@ void Hist::printSearchStr_en_us()
}
if
(
eventType_Ack
||
eventType_Alarm
||
eventType_Info
||
eventType_Return
)
{
if
(
addAnd
)
searchStr
[
i
]
+=
" and"
;
if
(
addAnd
)
searchStr
[
i
]
+=
Lng
::
translate
(
" and"
)
;
if
(
!
prioPrinted
)
i
++
;
searchStr
[
i
]
+=
" with type "
;
if
(
eventType_Ack
)
searchStr
[
i
]
+=
"Ack "
;
if
(
eventType_Alarm
)
searchStr
[
i
]
+=
"Active "
;
if
(
eventType_Info
)
searchStr
[
i
]
+=
"Info "
;
searchStr
[
i
]
+=
Lng
::
translate
(
" with type "
);
if
(
eventType_Ack
)
{
searchStr
[
i
]
+=
Lng
::
translate
(
"Ack"
);
searchStr
[
i
]
+=
" "
;;
}
if
(
eventType_Alarm
)
{
searchStr
[
i
]
+=
Lng
::
translate
(
"Active"
);
searchStr
[
i
]
+=
" "
;;
}
if
(
eventType_Info
)
{
searchStr
[
i
]
+=
Lng
::
translate
(
"Info"
);
searchStr
[
i
]
+=
" "
;;
}
if
(
eventType_Return
)
searchStr
[
i
]
+=
"Return"
;
searchStr
[
i
]
+=
Lng
::
translate
(
"Return"
)
;
addAnd
=
true
;
}
if
((
eventName_str
!=
NULL
)
&&
(
strlen
(
eventName_str
)
>
0
)
)
{
if
(
addAnd
)
searchStr
[
i
]
+=
" and"
;
if
(
addAnd
)
searchStr
[
i
]
+=
Lng
::
translate
(
" and"
)
;
i
++
;
searchStr
[
i
]
+=
" with EventName "
;
searchStr
[
i
]
+=
Lng
::
translate
(
" with EventName "
)
;
searchStr
[
i
]
+=
eventName_str
;
addAnd
=
true
;
}
if
((
eventText_str
!=
NULL
)
&&
(
strlen
(
eventText_str
)
>
0
)
)
{
if
(
addAnd
)
searchStr
[
i
]
+=
" and"
;
if
(
addAnd
)
searchStr
[
i
]
+=
Lng
::
translate
(
" and"
)
;
i
++
;
searchStr
[
i
]
+=
" with EventText "
;
searchStr
[
i
]
+=
Lng
::
translate
(
" with EventText "
)
;
searchStr
[
i
]
+=
eventText_str
;
}
...
...
@@ -734,82 +732,6 @@ void Hist::printSearchStr_en_us()
searchStr
[
2
].
c_str
(),
searchStr
[
3
].
c_str
());
}
void
Hist
::
printSearchStr_sv_se
()
{
//return;
bool
addAnd
=
false
;
bool
prioPrinted
=
false
;
int
i
=
0
;
string
searchStr
[
4
];
searchStr
[
0
]
=
" Alla hndelser"
;
searchStr
[
1
]
=
""
;
searchStr
[
2
]
=
""
;
searchStr
[
3
]
=
""
;
if
((
minTime_str
!=
NULL
)
&&
(
strlen
(
minTime_str
)
>
0
)
)
{
searchStr
[
i
]
+=
" Frn "
;
searchStr
[
i
]
+=
minTime_str
;
addAnd
=
true
;
}
if
((
maxTime_str
!=
NULL
)
&&
(
strlen
(
maxTime_str
)
>
0
)
)
{
searchStr
[
i
]
+=
" till "
;
searchStr
[
i
]
+=
maxTime_str
;
addAnd
=
true
;
}
if
(
eventPrio_A
||
eventPrio_B
||
eventPrio_C
||
eventPrio_D
)
{
if
(
addAnd
)
searchStr
[
i
]
+=
" och"
;
prioPrinted
=
true
;
i
++
;
searchStr
[
i
]
+=
" med prio "
;
if
(
eventPrio_A
)
searchStr
[
i
]
+=
"A"
;
if
(
eventPrio_B
)
searchStr
[
i
]
+=
"B"
;
if
(
eventPrio_C
)
searchStr
[
i
]
+=
"C"
;
if
(
eventPrio_D
)
searchStr
[
i
]
+=
"D"
;
addAnd
=
true
;
}
if
(
eventType_Ack
||
eventType_Alarm
||
eventType_Info
||
eventType_Return
)
{
if
(
addAnd
)
searchStr
[
i
]
+=
" och"
;
if
(
!
prioPrinted
)
i
++
;
searchStr
[
i
]
+=
" med typ "
;
if
(
eventType_Ack
)
searchStr
[
i
]
+=
"Kvittens "
;
if
(
eventType_Alarm
)
searchStr
[
i
]
+=
"Aktiv "
;
if
(
eventType_Info
)
searchStr
[
i
]
+=
"Info "
;
if
(
eventType_Return
)
searchStr
[
i
]
+=
"Retur"
;
addAnd
=
true
;
}
if
((
eventName_str
!=
NULL
)
&&
(
strlen
(
eventName_str
)
>
0
)
)
{
if
(
addAnd
)
searchStr
[
i
]
+=
" och"
;
i
++
;
searchStr
[
i
]
+=
" med Hndelsenamn "
;
searchStr
[
i
]
+=
eventName_str
;
addAnd
=
true
;
}
if
((
eventText_str
!=
NULL
)
&&
(
strlen
(
eventText_str
)
>
0
)
)
{
if
(
addAnd
)
searchStr
[
i
]
+=
" och"
;
i
++
;
searchStr
[
i
]
+=
" med hndelsetext "
;
searchStr
[
i
]
+=
eventText_str
;
}
set_search_string
(
searchStr
[
0
].
c_str
(),
searchStr
[
1
].
c_str
(),
searchStr
[
2
].
c_str
(),
searchStr
[
3
].
c_str
());
}
/************************************************************************
...
...
xtt/lib/xtt/src/xtt_hist.h
View file @
91e2b37b
...
...
@@ -92,8 +92,7 @@ class Hist {
pwr_tStatus
hist_clear_histlist
();
int
check_conditions
(
sEvent
*
evp
);
int
compareStr
(
char
*
,
char
*
);
void
printSearchStr_en_us
();
void
printSearchStr_sv_se
();
void
printSearchStr
();
virtual
void
set_num_of_events
(
int
nrOfEvents
)
{}
virtual
void
set_search_string
(
const
char
*
s1
,
const
char
*
s2
,
...
...
xtt/mmi/xtt/en_us/xtt_lng.dat
View file @
91e2b37b
...
...
@@ -185,6 +185,14 @@ E 1.9.23 "Last Month"
E 1.9.24 "All "
E 1.9.25 "Time"
E 1.9.26 "Search Condition"
E 1.9.27 " All events"
E 1.9.28 " from "
E 1.9.29 " to "
E 1.9.30 " and"
E 1.9.31 " with prio "
E 1.9.32 " with type "
E 1.9.33 " with EventName "
E 1.9.34 " with EventText "
#
# Ge Curve
E 1.10.1 "_Refresh"
...
...
xtt/mmi/xtt/sv_se/xtt_lng.dat
View file @
91e2b37b
...
...
@@ -185,6 +185,14 @@ E 1.9.23 "F
E 1.9.24 "Allt "
E 1.9.25 "Tid"
E 1.9.26 "Skvillkor"
E 1.9.27 " Alla hndelser"
E 1.9.28 " frn "
E 1.9.29 " till "
E 1.9.30 " och"
E 1.9.31 " med prio "
E 1.9.32 " med typ "
E 1.9.33 " med Hndelsenamn "
E 1.9.34 " med Hndelsetext "
#
# Ge Curve
E 1.10.1 "_Uppdatera"
...
...
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