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
abb0be99
Commit
abb0be99
authored
Sep 23, 2009
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
History methods for PlantHier, PlcPgm and XttGraph objects
parent
0aed03a8
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
324 additions
and
34 deletions
+324
-34
src/lib/co/gtk/co_logw_gtk.cpp
src/lib/co/gtk/co_logw_gtk.cpp
+4
-3
src/lib/co/gtk/co_logw_gtk.h
src/lib/co/gtk/co_logw_gtk.h
+1
-0
src/lib/co/gtk/co_logwnav_gtk.cpp
src/lib/co/gtk/co_logwnav_gtk.cpp
+4
-3
src/lib/co/gtk/co_logwnav_gtk.h
src/lib/co/gtk/co_logwnav_gtk.h
+1
-0
src/lib/co/src/co_log.cpp
src/lib/co/src/co_log.cpp
+7
-4
src/lib/co/src/co_log.h
src/lib/co/src/co_log.h
+2
-2
src/lib/co/src/co_logw.cpp
src/lib/co/src/co_logw.cpp
+3
-2
src/lib/co/src/co_logw.h
src/lib/co/src/co_logw.h
+2
-1
src/lib/co/src/co_logwnav.cpp
src/lib/co/src/co_logwnav.cpp
+15
-8
src/lib/co/src/co_logwnav.h
src/lib/co/src/co_logwnav.h
+4
-2
src/wbl/pwrb/src/pwrb_c_plcpgm.wb_load
src/wbl/pwrb/src/pwrb_c_plcpgm.wb_load
+45
-0
src/wbl/pwrb/src/pwrb_c_xttgraph.wb_load
src/wbl/pwrb/src/pwrb_c_xttgraph.wb_load
+40
-0
src/wbl/pwrs/src/pwrs_c_planthier.wb_load
src/wbl/pwrs/src/pwrs_c_planthier.wb_load
+45
-0
wb/lib/wb/gtk/wb_foe_gtk.cpp
wb/lib/wb/gtk/wb_foe_gtk.cpp
+1
-1
wb/lib/wb/gtk/wb_wnav_gtk.cpp
wb/lib/wb/gtk/wb_wnav_gtk.cpp
+24
-0
wb/lib/wb/gtk/wb_wnav_gtk.h
wb/lib/wb/gtk/wb_wnav_gtk.h
+1
-0
wb/lib/wb/gtk/wb_wpkg_gtk.cpp
wb/lib/wb/gtk/wb_wpkg_gtk.cpp
+1
-1
wb/lib/wb/gtk/wb_wtt_gtk.cpp
wb/lib/wb/gtk/wb_wtt_gtk.cpp
+1
-1
wb/lib/wb/src/wb_c_object.cpp
wb/lib/wb/src/wb_c_object.cpp
+71
-0
wb/lib/wb/src/wb_wnav.h
wb/lib/wb/src/wb_wnav.h
+5
-0
wb/lib/wb/src/wb_wnav_command.cpp
wb/lib/wb/src/wb_wnav_command.cpp
+42
-1
xtt/exp/inc/src/xnav_bitmap_build12.h
xtt/exp/inc/src/xnav_bitmap_build12.h
+2
-2
xtt/exp/inc/src/xnav_bitmap_copy12.h
xtt/exp/inc/src/xnav_bitmap_copy12.h
+2
-2
xtt/lib/ge/gtk/ge_gtk.cpp
xtt/lib/ge/gtk/ge_gtk.cpp
+1
-1
No files found.
src/lib/co/gtk/co_logw_gtk.cpp
View file @
abb0be99
...
...
@@ -50,8 +50,9 @@ CoLogWGtk::CoLogWGtk (
void
*
logw_parent_ctx
,
GtkWidget
*
logw_parent_wid
,
const
char
*
logw_name
,
int
l_show_item
,
pwr_tStatus
*
status
)
:
CoLogW
(
logw_parent_ctx
,
logw_name
,
status
),
parent_wid
(
logw_parent_wid
)
CoLogW
(
logw_parent_ctx
,
logw_name
,
l_show_item
,
status
),
parent_wid
(
logw_parent_wid
)
{
const
int
window_width
=
800
;
const
int
window_height
=
600
;
...
...
@@ -110,7 +111,7 @@ CoLogWGtk::CoLogWGtk (
form
=
gtk_vbox_new
(
FALSE
,
0
);
// Create logwnav
logwnav
=
new
CoLogWNavGtk
(
this
,
form
,
&
nav_widget
);
logwnav
=
new
CoLogWNavGtk
(
this
,
form
,
l_show_item
,
&
nav_widget
);
gtk_box_pack_start
(
GTK_BOX
(
form
),
GTK_WIDGET
(
menu_bar
),
FALSE
,
FALSE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
form
),
GTK_WIDGET
(
nav_widget
),
TRUE
,
TRUE
,
0
);
...
...
@@ -138,7 +139,7 @@ gboolean CoLogWGtk::action_inputfocus( GtkWidget *w, GdkEvent *event, gpointer d
{
CoLogWGtk
*
logw
=
(
CoLogWGtk
*
)
data
;
if
(
logw
&&
logw
->
displayed
)
{
if
(
logw
)
{
if
(
logw
->
focustimer
.
disabled
())
return
FALSE
;
...
...
src/lib/co/gtk/co_logw_gtk.h
View file @
abb0be99
...
...
@@ -38,6 +38,7 @@ class CoLogWGtk : public CoLogW {
void
*
msg_parent_ctx
,
GtkWidget
*
msg_parent_wid
,
const
char
*
msg_name
,
int
l_show_item
,
pwr_tStatus
*
status
);
~
CoLogWGtk
();
...
...
src/lib/co/gtk/co_logwnav_gtk.cpp
View file @
abb0be99
...
...
@@ -38,10 +38,11 @@ extern "C" {
#include "co_logwnav_gtk.h"
CoLogWNavGtk
::
CoLogWNavGtk
(
void
*
ev_parent_ctx
,
GtkWidget
*
ev_parent_wid
,
void
*
l_parent_ctx
,
GtkWidget
*
l_parent_wid
,
int
l_show_item
,
GtkWidget
**
w
)
:
CoLogWNav
(
ev_parent_ctx
),
parent_wid
(
ev
_parent_wid
)
CoLogWNav
(
l_parent_ctx
,
l_show_item
),
parent_wid
(
l
_parent_wid
)
{
form_widget
=
scrolledbrowwidgetgtk_new
(
CoLogWNav
::
init_brow_cb
,
this
,
&
brow_widget
);
...
...
src/lib/co/gtk/co_logwnav_gtk.h
View file @
abb0be99
...
...
@@ -31,6 +31,7 @@ class CoLogWNavGtk : public CoLogWNav {
CoLogWNavGtk
(
void
*
ev_parent_ctx
,
GtkWidget
*
ev_parent_wid
,
int
l_show_item
,
GtkWidget
**
w
);
~
CoLogWNavGtk
();
...
...
src/lib/co/src/co_log.cpp
View file @
abb0be99
...
...
@@ -80,7 +80,7 @@ void CoLog::log( const char *category, const char *str, const char *cmt, unsigne
}
void
CoLog
::
get
(
char
categories
[][
20
],
char
*
item
,
void
item_cb
(
void
*
,
pwr_tTime
,
char
*
,
char
*
),
void
*
ctx
)
void
item_cb
(
void
*
,
pwr_tTime
,
char
*
,
char
*
,
char
*
),
void
*
ctx
)
{
ifstream
fp
;
char
line
[
1024
];
...
...
@@ -98,7 +98,10 @@ void CoLog::get( char categories[][20], char *item,
parts
=
dcli_parse
(
line
,
" "
,
""
,
(
char
*
)
line_array
,
sizeof
(
line_array
)
/
sizeof
(
line_array
[
0
]),
sizeof
(
line_array
[
0
]),
0
);
if
(
item
&&
cdh_NoCaseStrcmp
(
line_array
[
5
],
item
)
!=
0
)
if
(
item
&&
!
(
item
[
strlen
(
item
)
-
1
]
==
'*'
&&
cdh_NoCaseStrncmp
(
line_array
[
5
],
item
,
strlen
(
item
)
-
1
)
==
0
)
&&
cdh_NoCaseStrcmp
(
line_array
[
5
],
item
)
!=
0
)
continue
;
int
found
=
0
;
...
...
@@ -123,9 +126,9 @@ void CoLog::get( char categories[][20], char *item,
continue
;
if
(
parts
>
6
)
item_cb
(
ctx
,
time
,
line_array
[
4
],
line_array
[
6
]);
item_cb
(
ctx
,
time
,
line_array
[
4
],
line_array
[
5
],
line_array
[
6
]);
else
item_cb
(
ctx
,
time
,
line_array
[
4
],
0
);
item_cb
(
ctx
,
time
,
line_array
[
4
],
line_array
[
5
],
0
);
}
}
...
...
src/lib/co/src/co_log.h
View file @
abb0be99
...
...
@@ -51,7 +51,7 @@ class CoLog
void
set_default
()
{
m_default_log
=
this
;}
void
log
(
const
char
*
category
,
const
char
*
str
,
const
char
*
cmt
,
unsigned
int
opt
=
0
);
void
get
(
char
categories
[][
20
],
char
*
item
,
void
item_cb
(
void
*
,
pwr_tTime
,
char
*
,
char
*
),
void
*
ctx
);
void
item_cb
(
void
*
,
pwr_tTime
,
char
*
,
char
*
,
char
*
),
void
*
ctx
);
void
push
()
{
m_level
++
;}
void
pull
()
{
m_level
--
;
...
...
@@ -65,7 +65,7 @@ class CoLog
if
(
m_default_log
)
m_default_log
->
push
();}
static
void
dpull
()
{
if
(
m_default_log
)
m_default_log
->
pull
();}
static
void
dget
(
char
categories
[][
20
],
char
*
item
,
void
item_cb
(
void
*
,
pwr_tTime
,
char
*
,
char
*
),
void
*
ctx
)
{
static
void
dget
(
char
categories
[][
20
],
char
*
item
,
void
item_cb
(
void
*
,
pwr_tTime
,
char
*
,
char
*
,
char
*
),
void
*
ctx
)
{
if
(
m_default_log
)
m_default_log
->
get
(
categories
,
item
,
item_cb
,
ctx
);}
};
...
...
src/lib/co/src/co_logw.cpp
View file @
abb0be99
...
...
@@ -36,9 +36,10 @@
CoLogW
::
CoLogW
(
void
*
msg_parent_ctx
,
const
char
*
logw_name
,
int
l_show_item
,
pwr_tStatus
*
status
)
:
parent_ctx
(
msg_parent_ctx
),
logwnav
(
NULL
),
displayed
(
0
),
size
(
0
),
max_size
(
500
),
wow
(
0
)
parent_ctx
(
msg_parent_ctx
),
logwnav
(
NULL
),
size
(
0
),
max_size
(
500
),
show_item
(
l_show_item
),
wow
(
0
)
{
*
status
=
1
;
strcpy
(
name
,
logw_name
);
...
...
src/lib/co/src/co_logw.h
View file @
abb0be99
...
...
@@ -38,6 +38,7 @@ class CoLogW {
CoLogW
(
void
*
msg_parent_ctx
,
const
char
*
logw_name
,
int
l_show_item
,
pwr_tStatus
*
status
);
virtual
~
CoLogW
()
{}
...
...
@@ -46,9 +47,9 @@ class CoLogW {
void
*
parent_ctx
;
char
name
[
80
];
CoLogWNav
*
logwnav
;
int
displayed
;
int
size
;
int
max_size
;
int
show_item
;
CoWow
*
wow
;
};
...
...
src/lib/co/src/co_logwnav.cpp
View file @
abb0be99
...
...
@@ -123,6 +123,9 @@ void CoLogWNavBrow::create_nodeclasses()
brow_AddAnnot
(
nc_log
,
13
,
0.6
,
2
,
flow_eDrawType_TextHelvetica
,
2
,
flow_eAnnotType_OneLine
,
0
);
brow_AddAnnot
(
nc_log
,
30
,
0.6
,
3
,
flow_eDrawType_TextHelvetica
,
2
,
flow_eAnnotType_OneLine
,
1
);
brow_AddFrame
(
nc_log
,
0
,
0
,
35
,
0.83
,
flow_eDrawType_LineGray
,
-
1
,
1
);
}
...
...
@@ -185,9 +188,8 @@ int CoLogWNav::init_brow_cb( FlowCtx *fctx, void *client_data)
return
1
;
}
CoLogWNav
::
CoLogWNav
(
void
*
ev_parent_ctx
)
:
parent_ctx
(
ev_parent_ctx
)
CoLogWNav
::
CoLogWNav
(
void
*
l_parent_ctx
,
int
l_show_item
)
:
parent_ctx
(
l_parent_ctx
),
show_item
(
l_show_item
)
{
}
...
...
@@ -396,10 +398,14 @@ ItemLog::ItemLog( CoLogWNav *item_logwnav, const char *item_name,
time_AtoAscii
(
&
time
,
time_eFormat_ComprDateAndTime
,
time_str
,
sizeof
(
time_str
));
time_str
[
17
]
=
0
;
brow_SetAnnotation
(
node
,
0
,
time_str
,
strlen
(
time_str
));
brow_SetAnnotation
(
node
,
1
,
category
,
strlen
(
category
));
int
annot
=
0
;
brow_SetAnnotation
(
node
,
annot
++
,
time_str
,
strlen
(
time_str
));
brow_SetAnnotation
(
node
,
annot
++
,
category
,
strlen
(
category
));
if
(
logwnav
->
show_item
)
brow_SetAnnotation
(
node
,
annot
++
,
item_name
,
strlen
(
item_name
));
if
(
item_comment
)
brow_SetAnnotation
(
node
,
2
,
item_comment
,
strlen
(
item_comment
));
brow_SetAnnotation
(
node
,
annot
++
,
item_comment
,
strlen
(
item_comment
));
if
(
(
s
=
strstr
(
category
,
"Save"
)))
brow_SetAnnotPixmap
(
node
,
0
,
logwnav
->
brow
->
pixmap_save
);
...
...
@@ -414,11 +420,12 @@ ItemLog::ItemLog( CoLogWNav *item_logwnav, const char *item_name,
}
void
CoLogWNav
::
item_cb
(
void
*
ctx
,
pwr_tTime
time
,
char
*
category
,
char
*
comment
)
void
CoLogWNav
::
item_cb
(
void
*
ctx
,
pwr_tTime
time
,
char
*
category
,
char
*
item
,
char
*
comment
)
{
CoLogWNav
*
logwnav
=
(
CoLogWNav
*
)
ctx
;
new
ItemLog
(
logwnav
,
"Log"
,
time
,
category
,
comment
,
0
,
flow_eDest_IntoLast
);
new
ItemLog
(
logwnav
,
item
,
time
,
category
,
comment
,
0
,
flow_eDest_IntoLast
);
}
void
CoLogWNav
::
show
(
char
categories
[][
20
],
char
*
item
)
...
...
src/lib/co/src/co_logwnav.h
View file @
abb0be99
...
...
@@ -65,11 +65,12 @@ class CoLogWNavBrow {
class
CoLogWNav
{
public:
CoLogWNav
(
void
*
ev_parent_ctx
);
void
*
l_parent_ctx
,
int
l_show_item
);
virtual
~
CoLogWNav
();
void
*
parent_ctx
;
CoLogWNavBrow
*
brow
;
int
show_item
;
virtual
void
set_input_focus
()
{}
...
...
@@ -79,7 +80,8 @@ class CoLogWNav {
static
int
init_brow_cb
(
FlowCtx
*
fctx
,
void
*
client_data
);
static
int
brow_cb
(
FlowCtx
*
ctx
,
flow_tEvent
event
);
static
void
item_cb
(
void
*
ctx
,
pwr_tTime
time
,
char
*
category
,
char
*
comment
);
static
void
item_cb
(
void
*
ctx
,
pwr_tTime
time
,
char
*
category
,
char
*
item
,
char
*
comment
);
};
class
ItemLog
{
...
...
src/wbl/pwrb/src/pwrb_c_plcpgm.wb_load
View file @
abb0be99
...
...
@@ -146,6 +146,15 @@ SObject pwrb:Class
Attr FilterName = "$Object-BuildFilter"
EndBody
EndObject
Object History $MenuButton
Body SysBody
Attr ButtonName = "History"
Attr MethodName = "$Object-History"
Attr FilterName = "$Object-HistoryFilter"
Attr MethodArguments[0] = "PlcSave"
Attr MethodArguments[1] = "Descendants"
EndBody
EndObject
EndObject
EndObject
Object NavigatorPoson $Menu
...
...
@@ -163,6 +172,15 @@ SObject pwrb:Class
Attr FilterName = "$Object-BuildFilter"
EndBody
EndObject
Object History $MenuButton
Body SysBody
Attr ButtonName = "History"
Attr MethodName = "$Object-History"
Attr FilterName = "$Object-HistoryFilter"
Attr MethodArguments[0] = "PlcSave"
Attr MethodArguments[1] = "Descendants"
EndBody
EndObject
EndObject
EndObject
Object NavigatorPosos $Menu
...
...
@@ -180,6 +198,15 @@ SObject pwrb:Class
Attr FilterName = "$Object-BuildFilter"
EndBody
EndObject
Object History $MenuButton
Body SysBody
Attr ButtonName = "History"
Attr MethodName = "$Object-History"
Attr FilterName = "$Object-HistoryFilter"
Attr MethodArguments[0] = "PlcSave"
Attr MethodArguments[1] = "Descendants"
EndBody
EndObject
EndObject
EndObject
Object NavigatorPosms $Menu
...
...
@@ -197,6 +224,15 @@ SObject pwrb:Class
Attr FilterName = "$Object-BuildFilter"
EndBody
EndObject
Object History $MenuButton
Body SysBody
Attr ButtonName = "History"
Attr MethodName = "$Object-History"
Attr FilterName = "$Object-HistoryFilter"
Attr MethodArguments[0] = "PlcSave"
Attr MethodArguments[1] = "Descendants"
EndBody
EndObject
EndObject
EndObject
Object NavigatorPosmn $Menu
...
...
@@ -214,6 +250,15 @@ SObject pwrb:Class
Attr FilterName = "$Object-BuildFilter"
EndBody
EndObject
Object History $MenuButton
Body SysBody
Attr ButtonName = "History"
Attr MethodName = "$Object-History"
Attr FilterName = "$Object-HistoryFilter"
Attr MethodArguments[0] = "PlcSave"
Attr MethodArguments[1] = "Descendants"
EndBody
EndObject
EndObject
EndObject
Object ConfiguratorPoson $Menu
...
...
src/wbl/pwrb/src/pwrb_c_xttgraph.wb_load
View file @
abb0be99
...
...
@@ -202,6 +202,14 @@ SObject pwrb:Class
Attr FilterName = "$Object-BuildFilter"
EndBody
EndObject
Object History $MenuButton
Body SysBody
Attr ButtonName = "History"
Attr MethodName = "$Object-History"
Attr FilterName = "$Object-HistoryFilter"
Attr MethodArguments[0] = "GeSave"
EndBody
EndObject
EndObject
EndObject
Object NavigatorPoson $Menu
...
...
@@ -219,6 +227,14 @@ SObject pwrb:Class
Attr FilterName = "$Object-BuildFilter"
EndBody
EndObject
Object History $MenuButton
Body SysBody
Attr ButtonName = "History"
Attr MethodName = "$Object-History"
Attr FilterName = "$Object-HistoryFilter"
Attr MethodArguments[0] = "GeSave"
EndBody
EndObject
EndObject
EndObject
Object NavigatorPosos $Menu
...
...
@@ -236,6 +252,14 @@ SObject pwrb:Class
Attr FilterName = "$Object-BuildFilter"
EndBody
EndObject
Object History $MenuButton
Body SysBody
Attr ButtonName = "History"
Attr MethodName = "$Object-History"
Attr FilterName = "$Object-HistoryFilter"
Attr MethodArguments[0] = "GeSave"
EndBody
EndObject
EndObject
EndObject
Object NavigatorPosms $Menu
...
...
@@ -253,6 +277,14 @@ SObject pwrb:Class
Attr FilterName = "$Object-BuildFilter"
EndBody
EndObject
Object History $MenuButton
Body SysBody
Attr ButtonName = "History"
Attr MethodName = "$Object-History"
Attr FilterName = "$Object-HistoryFilter"
Attr MethodArguments[0] = "GeSave"
EndBody
EndObject
EndObject
EndObject
Object NavigatorPosmn $Menu
...
...
@@ -270,6 +302,14 @@ SObject pwrb:Class
Attr FilterName = "$Object-BuildFilter"
EndBody
EndObject
Object History $MenuButton
Body SysBody
Attr ButtonName = "History"
Attr MethodName = "$Object-History"
Attr FilterName = "$Object-HistoryFilter"
Attr MethodArguments[0] = "GeSave"
EndBody
EndObject
EndObject
EndObject
EndObject
...
...
src/wbl/pwrs/src/pwrs_c_planthier.wb_load
View file @
abb0be99
...
...
@@ -135,6 +135,15 @@ SObject pwrs:Class
Attr FilterName = "$Object-BuildFilter"
EndBody
EndObject
Object History $MenuButton
Body SysBody
Attr ButtonName = "History"
Attr MethodName = "$Object-History"
Attr FilterName = "$Object-HistoryFilter"
Attr MethodArguments[0] = "PlcSave"
Attr MethodArguments[1] = "Descendants"
EndBody
EndObject
EndObject
EndObject
Object NavigatorPoson $Menu
...
...
@@ -146,6 +155,15 @@ SObject pwrs:Class
Attr FilterName = "$Object-BuildFilter"
EndBody
EndObject
Object History $MenuButton
Body SysBody
Attr ButtonName = "History"
Attr MethodName = "$Object-History"
Attr FilterName = "$Object-HistoryFilter"
Attr MethodArguments[0] = "PlcSave"
Attr MethodArguments[1] = "Descendants"
EndBody
EndObject
EndObject
EndObject
Object NavigatorPosos $Menu
...
...
@@ -157,6 +175,15 @@ SObject pwrs:Class
Attr FilterName = "$Object-BuildFilter"
EndBody
EndObject
Object History $MenuButton
Body SysBody
Attr ButtonName = "History"
Attr MethodName = "$Object-History"
Attr FilterName = "$Object-HistoryFilter"
Attr MethodArguments[0] = "PlcSave"
Attr MethodArguments[1] = "Descendants"
EndBody
EndObject
EndObject
EndObject
Object NavigatorPosms $Menu
...
...
@@ -168,6 +195,15 @@ SObject pwrs:Class
Attr FilterName = "$Object-BuildFilter"
EndBody
EndObject
Object History $MenuButton
Body SysBody
Attr ButtonName = "History"
Attr MethodName = "$Object-History"
Attr FilterName = "$Object-HistoryFilter"
Attr MethodArguments[0] = "PlcSave"
Attr MethodArguments[1] = "Descendants"
EndBody
EndObject
EndObject
EndObject
Object NavigatorPosmn $Menu
...
...
@@ -179,6 +215,15 @@ SObject pwrs:Class
Attr FilterName = "$Object-BuildFilter"
EndBody
EndObject
Object History $MenuButton
Body SysBody
Attr ButtonName = "History"
Attr MethodName = "$Object-History"
Attr FilterName = "$Object-HistoryFilter"
Attr MethodArguments[0] = "PlcSave"
Attr MethodArguments[1] = "Descendants"
EndBody
EndObject
EndObject
EndObject
Object ConfiguratorPoson $Menu
...
...
wb/lib/wb/gtk/wb_foe_gtk.cpp
View file @
abb0be99
...
...
@@ -115,7 +115,7 @@ void WFoeGtk::activate_history( GtkWidget *w, gpointer data)
strcpy
(
title
,
"History "
);
strcat
(
title
,
wname
);
CoLogWGtk
*
logw
=
new
CoLogWGtk
(
foe
,
((
WFoeGtk
*
)
foe
)
->
toplevel
,
title
,
&
sts
);
CoLogWGtk
*
logw
=
new
CoLogWGtk
(
foe
,
((
WFoeGtk
*
)
foe
)
->
toplevel
,
title
,
0
,
&
sts
);
logw
->
show
(
categories
,
wname
);
}
...
...
wb/lib/wb/gtk/wb_wnav_gtk.cpp
View file @
abb0be99
...
...
@@ -47,6 +47,7 @@ extern "C" {
#include "wb_wnav_item.h"
#include "co_wow_gtk.h"
#include "co_login_gtk.h"
#include "co_logw_gtk.h"
#include "wb_wge_gtk.h"
#include "ge_gtk.h"
#include "wb_wda_gtk.h"
...
...
@@ -263,6 +264,29 @@ wb_utl *WNavGtk::utl_new()
return
utl
;
}
void
WNavGtk
::
logw_new
(
char
*
item
,
wlog_eCategory
*
categories
,
int
show_item
)
{
char
categories_str
[
10
][
20
];
char
title
[
300
];
pwr_tStatus
sts
;
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
categories_str
)
/
sizeof
(
categories_str
[
0
]);
i
++
)
{
if
(
categories
[
i
]
==
wlog_eCategory_
)
{
strcpy
(
categories_str
[
i
],
""
);
break
;
}
else
wb_log
::
category_to_string
(
categories
[
i
],
categories_str
[
i
]);
}
strcpy
(
title
,
"History "
);
strcat
(
title
,
item
);
if
(
title
[
strlen
(
title
)
-
1
]
==
'*'
)
title
[
strlen
(
title
)
-
1
]
=
0
;
CoLogWGtk
*
logw
=
new
CoLogWGtk
(
this
,
parent_wid
,
title
,
show_item
,
&
sts
);
logw
->
show
(
categories_str
,
item
);
}
void
WNavGtk
::
sel_convert_cb
(
GtkWidget
*
w
,
GtkSelectionData
*
selection_data
,
guint
info
,
guint
time_stamp
,
gpointer
data
)
{
...
...
wb/lib/wb/gtk/wb_wnav_gtk.h
View file @
abb0be99
...
...
@@ -74,6 +74,7 @@ class WNavGtk : public WNav {
void
wge_modal_loop
(
WGe
*
wge
);
bool
has_window
()
{
return
parent_wid
?
true
:
false
;}
wb_utl
*
utl_new
();
void
logw_new
(
char
*
item
,
wlog_eCategory
*
categories
,
int
show_item
);
CoLogin
*
login_new
(
const
char
*
name
,
const
char
*
groupname
,
void
(
*
bc_success
)(
void
*
),
void
(
*
bc_cancel
)(
void
*
),
pwr_tStatus
*
status
);
...
...
wb/lib/wb/gtk/wb_wpkg_gtk.cpp
View file @
abb0be99
...
...
@@ -142,7 +142,7 @@ void WPkgGtk::activate_history( GtkWidget *w, gpointer data)
strcpy
(
categories
[
2
],
""
);
strcpy
(
title
,
"Distributor History"
);
CoLogWGtk
*
logw
=
new
CoLogWGtk
(
wpkg
,
((
WPkgGtk
*
)
wpkg
)
->
toplevel
,
title
,
&
sts
);
CoLogWGtk
*
logw
=
new
CoLogWGtk
(
wpkg
,
((
WPkgGtk
*
)
wpkg
)
->
toplevel
,
title
,
1
,
&
sts
);
logw
->
show
(
categories
,
0
);
}
...
...
wb/lib/wb/gtk/wb_wtt_gtk.cpp
View file @
abb0be99
...
...
@@ -978,7 +978,7 @@ void WttGtk::activate_history( GtkWidget *w, gpointer data)
strcpy
(
title
,
"History Configurator "
);
strcat
(
title
,
vname
);
CoLogWGtk
*
logw
=
new
CoLogWGtk
(
wtt
,
((
WttGtk
*
)
wtt
)
->
parent_wid
,
title
,
&
sts
);
CoLogWGtk
*
logw
=
new
CoLogWGtk
(
wtt
,
((
WttGtk
*
)
wtt
)
->
parent_wid
,
title
,
0
,
&
sts
);
logw
->
show
(
categories
,
vname
);
}
...
...
wb/lib/wb/src/wb_c_object.cpp
View file @
abb0be99
...
...
@@ -22,6 +22,7 @@
#include <stdio.h>
#include <string.h>
#include "pwr.h"
#include "pwr_baseclasses.h"
#include "wb_pwrs.h"
#include "wb_ldh_msg.h"
#include "wb_ldh.h"
...
...
@@ -960,6 +961,74 @@ static pwr_tStatus BuildFilter( ldh_sMenuCall *ip)
return
0
;
}
//
// History log
//
static
pwr_tStatus
History
(
ldh_sMenuCall
*
ip
)
{
pwr_tStatus
sts
;
pwr_tOName
oname
;
char
item
[
300
];
int
size
;
pwr_sMenuButton
mb
;
pwr_tCmd
cmd
;
char
categories
[
80
];
int
showitem
=
0
;
pwr_tCid
cid
;
char
*
action
;
char
*
s
;
sts
=
ldh_ObjidToName
(
ip
->
PointedSession
,
ip
->
Pointed
.
Objid
,
ldh_eName_VolPath
,
oname
,
sizeof
(
oname
),
&
size
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ldh_GetObjectClass
(
ip
->
PointedSession
,
ip
->
Pointed
.
Objid
,
&
cid
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ldh_ReadObjectBody
(
ip
->
PointedSession
,
ip
->
ItemList
[
ip
->
ChosenItem
].
MenuObject
,
"SysBody"
,
&
mb
,
sizeof
(
pwr_sMenuButton
));
switch
(
cid
)
{
case
pwr_cClass_XttGraph
:
// Get action attribute
sts
=
ldh_GetObjectPar
(
ip
->
PointedSession
,
ip
->
Pointed
.
Objid
,
"RtBody"
,
"Action"
,
&
action
,
&
size
);
if
(
EVEN
(
sts
))
return
sts
;
strcpy
(
item
,
action
);
free
(
action
);
if
(
(
s
=
strstr
(
item
,
".pwg"
)))
*
s
=
0
;
else
return
1
;
strcpy
(
categories
,
mb
.
MethodArguments
[
0
]);
showitem
=
1
;
break
;
default:
// Item is object name
strcpy
(
item
,
oname
);
strcpy
(
categories
,
mb
.
MethodArguments
[
0
]);
if
(
strcmp
(
mb
.
MethodArguments
[
1
],
"Descendants"
)
==
0
)
{
strcat
(
item
,
"*"
);
showitem
=
1
;
}
}
sprintf
(
cmd
,
"open history/item=
\"
%s
\"
/categories=
\"
%s
\"
"
,
item
,
categories
);
if
(
showitem
)
strcat
(
cmd
,
"/showitem"
);
ip
->
wnav
->
command
(
cmd
);
return
1
;
}
static
pwr_tStatus
HistoryFilter
(
ldh_sMenuCall
*
ip
)
{
return
1
;
}
pwr_dExport
pwr_BindMethods
(
$
Object
)
=
{
pwr_BindMethod
(
CreateObject
),
...
...
@@ -987,6 +1056,8 @@ pwr_dExport pwr_BindMethods($Object) = {
pwr_BindMethod
(
ConfigureComponent
),
pwr_BindMethod
(
ConfigureComponentFilter
),
pwr_BindMethod
(
BuildFilter
),
pwr_BindMethod
(
History
),
pwr_BindMethod
(
HistoryFilter
),
pwr_NullMethod
};
...
...
wb/lib/wb/src/wb_wnav.h
View file @
abb0be99
...
...
@@ -66,6 +66,10 @@
#include "wb.h"
#endif
#ifndef wb_log_h
#include "wb_log.h"
#endif
#define wnav_cVersion "X3.3a"
#define wnav_cScriptDescKey "!** Description"
...
...
@@ -313,6 +317,7 @@ class WNav : public WUtility{
virtual
void
wge_modal_loop
(
WGe
*
wge
)
{}
virtual
bool
has_window
()
{
return
false
;}
virtual
wb_utl
*
utl_new
()
{
return
0
;}
virtual
void
logw_new
(
char
*
item
,
wlog_eCategory
*
categories
,
int
show_item
)
{}
virtual
CoLogin
*
login_new
(
const
char
*
name
,
const
char
*
groupname
,
void
(
*
bc_success
)(
void
*
),
void
(
*
bc_cancel
)(
void
*
),
pwr_tStatus
*
status
)
{
return
0
;}
...
...
wb/lib/wb/src/wb_wnav_command.cpp
View file @
abb0be99
...
...
@@ -72,6 +72,7 @@
#include "wb_pkg.h"
#include "wb_build.h"
#include "wb_wtt.h"
#include "wb_log.h"
#include "ge.h"
#include "wb_utl.h"
...
...
@@ -255,7 +256,7 @@ dcli_tCmdTable wnav_command_table[] = {
{
"dcli_arg1"
,
"dcli_arg2"
,
"/NAME"
,
"/FILE"
,
"/SCROLLBAR"
,
"/WIDTH"
,
"/HEIGHT"
,
"/MENU"
,
"/NAVIGATOR"
,
"/CENTER"
,
"/OBJECT"
,
"/MODAL"
,
"/INSTANCE"
,
"/TITLE"
,
"/VOLUME
"
,
""
}
"/VOLUME"
,
"/ITEM"
,
"/SHOWITEM"
,
"/CATEGORIES
"
,
""
}
},
{
"CLOSE"
,
...
...
@@ -3589,6 +3590,46 @@ static int wnav_open_func( void *client_data,
wge
->
close_cb
=
wnav_wge_close_cb
;
}
}
else
if
(
strncmp
(
arg1_str
,
"HISTORY"
,
strlen
(
arg1_str
))
==
0
)
{
char
categoriesstr
[
80
];
pwr_tAName
itemstr
;
int
showitem
;
char
cvect
[
10
][
20
];
wlog_eCategory
categories
[
10
];
int
nr
;
// Command is "OPEN HISTORY"
if
(
EVEN
(
dcli_get_qualifier
(
"/ITEM"
,
itemstr
,
sizeof
(
itemstr
))))
{
wnav
->
message
(
'E'
,
"Item is missing"
);
return
WNAV__SYNTAX
;
}
showitem
=
ODD
(
dcli_get_qualifier
(
"/SHOWITEM"
,
0
,
0
));
if
(
EVEN
(
dcli_get_qualifier
(
"/CATEGORIES"
,
categoriesstr
,
sizeof
(
categoriesstr
))))
{
wnav
->
message
(
'E'
,
"Categories are missing"
);
return
WNAV__SYNTAX
;
}
nr
=
dcli_parse
(
categoriesstr
,
","
,
""
,
(
char
*
)
cvect
,
sizeof
(
cvect
)
/
sizeof
(
cvect
[
0
]),
sizeof
(
cvect
[
0
]),
0
);
if
(
nr
==
0
)
{
wnav
->
message
(
'E'
,
"Syntax error"
);
return
WNAV__SYNTAX
;
}
if
(
nr
>
9
)
nr
=
9
;
for
(
int
i
=
0
;
i
<
nr
;
i
++
)
{
wb_log
::
string_to_category
(
cvect
[
i
],
&
categories
[
i
]);
}
categories
[
nr
]
=
wlog_eCategory_
;
wnav
->
logw_new
(
itemstr
,
categories
,
showitem
);
}
else
{
wnav
->
message
(
'E'
,
"Syntax error"
);
...
...
xtt/exp/inc/src/xnav_bitmap_build12.h
View file @
abb0be99
#define xnav_bitmap_build12_width 12
#define xnav_bitmap_build12_height 12
static
unsigned
char
xnav_bitmap_build12_bits
[]
=
{
0x3
4
,
0x00
,
0xbe
,
0x00
,
0xd4
,
0x01
,
0xab
,
0x00
,
0xd7
,
0x01
,
0xaa
,
0x01
,
0x
57
,
0x00
,
0xfa
,
0x06
,
0xd8
,
0x05
,
0x80
,
0x0a
,
0x00
,
0x0d
,
0x00
,
0x03
};
0x3
0
,
0x01
,
0xfa
,
0x03
,
0x87
,
0x01
,
0x76
,
0x02
,
0x8a
,
0x06
,
0xab
,
0x06
,
0x
8b
,
0x02
,
0x72
,
0x03
,
0x0c
,
0x07
,
0xfe
,
0x02
,
0x64
,
0x00
,
0x00
,
0x00
};
xtt/exp/inc/src/xnav_bitmap_copy12.h
View file @
abb0be99
#define xnav_bitmap_copy12_width 12
#define xnav_bitmap_copy12_height 12
static
unsigned
char
xnav_bitmap_copy12_bits
[]
=
{
0x00
,
0x00
,
0x00
,
0x00
,
0xf
8
,
0x01
,
0x04
,
0x02
,
0xf2
,
0x04
,
0x0a
,
0x05
,
0x
91
,
0x08
,
0x0a
,
0x05
,
0x04
,
0x02
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
};
0x00
,
0x00
,
0x00
,
0x00
,
0xf
0
,
0x00
,
0x98
,
0x01
,
0x6d
,
0x0b
,
0x97
,
0x0e
,
0x
0f
,
0x0f
,
0x0f
,
0x0f
,
0x9f
,
0x0f
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
};
xtt/lib/ge/gtk/ge_gtk.cpp
View file @
abb0be99
...
...
@@ -677,7 +677,7 @@ void GeGtk::activate_history( GtkWidget *w, gpointer data)
strcpy
(
title
,
"History "
);
strcat
(
title
,
name
);
CoLogWGtk
*
logw
=
new
CoLogWGtk
(
ge
,
((
GeGtk
*
)
ge
)
->
toplevel
,
title
,
&
sts
);
CoLogWGtk
*
logw
=
new
CoLogWGtk
(
ge
,
((
GeGtk
*
)
ge
)
->
toplevel
,
title
,
0
,
&
sts
);
logw
->
show
(
categories
,
name
);
}
...
...
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