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
4799be55
Commit
4799be55
authored
Sep 12, 2013
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xtt methods menu, hist event for attribute objects added (refs #136)
parent
d0e98683
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
44 additions
and
40 deletions
+44
-40
xtt/lib/xtt/gtk/xtt_hist_gtk.cpp
xtt/lib/xtt/gtk/xtt_hist_gtk.cpp
+11
-9
xtt/lib/xtt/gtk/xtt_hist_gtk.h
xtt/lib/xtt/gtk/xtt_hist_gtk.h
+1
-1
xtt/lib/xtt/gtk/xtt_xnav_gtk.cpp
xtt/lib/xtt/gtk/xtt_xnav_gtk.cpp
+2
-2
xtt/lib/xtt/gtk/xtt_xnav_gtk.h
xtt/lib/xtt/gtk/xtt_xnav_gtk.h
+1
-1
xtt/lib/xtt/motif/xtt_hist_motif.cpp
xtt/lib/xtt/motif/xtt_hist_motif.cpp
+12
-11
xtt/lib/xtt/motif/xtt_hist_motif.h
xtt/lib/xtt/motif/xtt_hist_motif.h
+1
-1
xtt/lib/xtt/motif/xtt_xnav_motif.cpp
xtt/lib/xtt/motif/xtt_xnav_motif.cpp
+2
-2
xtt/lib/xtt/motif/xtt_xnav_motif.h
xtt/lib/xtt/motif/xtt_xnav_motif.h
+1
-1
xtt/lib/xtt/src/xtt_c_object.cpp
xtt/lib/xtt/src/xtt_c_object.cpp
+1
-1
xtt/lib/xtt/src/xtt_hist.cpp
xtt/lib/xtt/src/xtt_hist.cpp
+1
-1
xtt/lib/xtt/src/xtt_hist.h
xtt/lib/xtt/src/xtt_hist.h
+1
-1
xtt/lib/xtt/src/xtt_xnav.h
xtt/lib/xtt/src/xtt_xnav.h
+1
-1
xtt/lib/xtt/src/xtt_xnav_command.cpp
xtt/lib/xtt/src/xtt_xnav_command.cpp
+9
-8
No files found.
xtt/lib/xtt/gtk/xtt_hist_gtk.cpp
View file @
4799be55
...
@@ -92,9 +92,9 @@ static void destroy_event( GtkWidget *w, gpointer data)
...
@@ -92,9 +92,9 @@ static void destroy_event( GtkWidget *w, gpointer data)
HistGtk
::
HistGtk
(
void
*
hist_parent_ctx
,
HistGtk
::
HistGtk
(
void
*
hist_parent_ctx
,
GtkWidget
*
hist_parent_wid
,
GtkWidget
*
hist_parent_wid
,
char
*
hist_name
,
pwr_t
Objid
objid
,
char
*
hist_name
,
pwr_t
AttrRef
*
arp
,
pwr_tStatus
*
status
)
:
pwr_tStatus
*
status
)
:
Hist
(
hist_parent_ctx
,
hist_name
,
objid
,
status
),
Hist
(
hist_parent_ctx
,
hist_name
,
arp
,
status
),
parent_wid
(
hist_parent_wid
),
parent_wid_hist
(
NULL
)
parent_wid
(
hist_parent_wid
),
parent_wid_hist
(
NULL
)
{
{
const
int
hist_width
=
800
;
const
int
hist_width
=
800
;
...
@@ -438,20 +438,22 @@ HistGtk::HistGtk( void *hist_parent_ctx,
...
@@ -438,20 +438,22 @@ HistGtk::HistGtk( void *hist_parent_ctx,
// Init start and stop time
// Init start and stop time
pwr_tStatus
sts
;
pwr_tStatus
sts
;
pwr_t
O
Name
name_str
;
pwr_t
A
Name
name_str
;
gint
pos
=
0
;
gint
pos
=
0
;
((
Hist
*
)
this
)
->
all_cb
();
((
Hist
*
)
this
)
->
all_cb
();
// If objid is applied, search for this object
// If objid is applied, search for this object
pos
=
0
;
pos
=
0
;
sts
=
gdh_ObjidToName
(
objid
,
name_str
,
sizeof
(
name_str
),
cdh_mName_pathStrict
);
if
(
arp
&&
cdh_ObjidIsNotNull
(
arp
->
Objid
))
{
sts
=
gdh_AttrrefToName
(
arp
,
name_str
,
sizeof
(
name_str
),
cdh_mName_pathStrict
);
if
(
ODD
(
sts
))
{
if
(
ODD
(
sts
))
{
gtk_editable_insert_text
(
GTK_EDITABLE
(
event_name_entry_w
),
name_str
,
gtk_editable_insert_text
(
GTK_EDITABLE
(
event_name_entry_w
),
name_str
,
strlen
(
name_str
),
&
pos
);
strlen
(
name_str
),
&
pos
);
this
->
eventName_str
=
name_str
;
this
->
eventName_str
=
name_str
;
get_hist_list
();
get_hist_list
();
}
}
}
wow
=
new
CoWowGtk
(
parent_wid_hist
);
wow
=
new
CoWowGtk
(
parent_wid_hist
);
...
...
xtt/lib/xtt/gtk/xtt_hist_gtk.h
View file @
4799be55
...
@@ -49,7 +49,7 @@ class HistGtk : public Hist {
...
@@ -49,7 +49,7 @@ class HistGtk : public Hist {
public:
public:
HistGtk
(
void
*
hist_parent_ctx
,
HistGtk
(
void
*
hist_parent_ctx
,
GtkWidget
*
hist_parent_wid
,
GtkWidget
*
hist_parent_wid
,
char
*
hist_name
,
pwr_t
Objid
objid
,
char
*
hist_name
,
pwr_t
AttrRef
*
arp
,
pwr_tStatus
*
status
);
pwr_tStatus
*
status
);
~
HistGtk
();
~
HistGtk
();
...
...
xtt/lib/xtt/gtk/xtt_xnav_gtk.cpp
View file @
4799be55
...
@@ -226,9 +226,9 @@ Ev *XNavGtk::ev_new( char *eve_name, char *ala_name, char *blk_name,
...
@@ -226,9 +226,9 @@ Ev *XNavGtk::ev_new( char *eve_name, char *ala_name, char *blk_name,
status
);
status
);
}
}
Hist
*
XNavGtk
::
hist_new
(
char
*
title
,
pwr_t
Oid
oid
,
pwr_tStatus
*
sts
)
Hist
*
XNavGtk
::
hist_new
(
char
*
title
,
pwr_t
AttrRef
*
arp
,
pwr_tStatus
*
sts
)
{
{
return
new
HistGtk
(
this
,
parent_wid
,
title
,
oid
,
sts
);
return
new
HistGtk
(
this
,
parent_wid
,
title
,
arp
,
sts
);
}
}
Block
*
XNavGtk
::
block_new
(
pwr_tAttrRef
*
arp
,
char
*
name
,
unsigned
int
priv
,
Block
*
XNavGtk
::
block_new
(
pwr_tAttrRef
*
arp
,
char
*
name
,
unsigned
int
priv
,
...
...
xtt/lib/xtt/gtk/xtt_xnav_gtk.h
View file @
4799be55
...
@@ -71,7 +71,7 @@ class XNavGtk : public XNav {
...
@@ -71,7 +71,7 @@ class XNavGtk : public XNav {
pwr_tObjid
ev_user
,
int
display_ala
,
int
display_eve
,
pwr_tObjid
ev_user
,
int
display_ala
,
int
display_eve
,
int
display_blk
,
int
display_return
,
int
display_ack
,
int
display_blk
,
int
display_return
,
int
display_ack
,
int
ev_beep
,
pwr_tMask
ev_pop_mask
,
int
ev_eventname_seg
,
pwr_tStatus
*
status
);
int
ev_beep
,
pwr_tMask
ev_pop_mask
,
int
ev_eventname_seg
,
pwr_tStatus
*
status
);
Hist
*
hist_new
(
char
*
title
,
pwr_t
Oid
oid
,
pwr_tStatus
*
sts
);
Hist
*
hist_new
(
char
*
title
,
pwr_t
AttrRef
*
arp
,
pwr_tStatus
*
sts
);
Block
*
block_new
(
pwr_tAttrRef
*
arp
,
char
*
name
,
unsigned
int
priv
,
Block
*
block_new
(
pwr_tAttrRef
*
arp
,
char
*
name
,
unsigned
int
priv
,
pwr_tStatus
*
sts
);
pwr_tStatus
*
sts
);
Op
*
op_new
(
char
*
opplace
,
pwr_tStatus
*
sts
);
Op
*
op_new
(
char
*
opplace
,
pwr_tStatus
*
sts
);
...
...
xtt/lib/xtt/motif/xtt_hist_motif.cpp
View file @
4799be55
...
@@ -92,9 +92,9 @@ extern "C" {
...
@@ -92,9 +92,9 @@ extern "C" {
HistMotif
::
HistMotif
(
void
*
hist_parent_ctx
,
HistMotif
::
HistMotif
(
void
*
hist_parent_ctx
,
Widget
hist_parent_wid
,
Widget
hist_parent_wid
,
char
*
hist_name
,
pwr_t
Objid
objid
,
char
*
hist_name
,
pwr_t
AttrRef
*
arp
,
pwr_tStatus
*
status
)
:
pwr_tStatus
*
status
)
:
Hist
(
hist_parent_ctx
,
hist_name
,
objid
,
status
),
Hist
(
hist_parent_ctx
,
hist_name
,
arp
,
status
),
parent_wid
(
hist_parent_wid
),
parent_wid_hist
(
NULL
)
parent_wid
(
hist_parent_wid
),
parent_wid_hist
(
NULL
)
{
{
char
uid_filename
[
120
]
=
{
"xtt_hist.uid"
};
char
uid_filename
[
120
]
=
{
"xtt_hist.uid"
};
...
@@ -252,17 +252,18 @@ HistMotif::HistMotif( void *hist_parent_ctx,
...
@@ -252,17 +252,18 @@ HistMotif::HistMotif( void *hist_parent_ctx,
flow_AddCloseVMProtocolCb
(
parent_wid_hist
,
flow_AddCloseVMProtocolCb
(
parent_wid_hist
,
(
XtCallbackProc
)
activate_exit
,
this
);
(
XtCallbackProc
)
activate_exit
,
this
);
char
name_str
[
80
]
;
pwr_tAName
name_str
;
sts
=
gdh_ObjidToName
(
objid
,
name_str
,
sizeof
(
name_str
),
cdh_mName_pathStrict
);
if
(
ODD
(
sts
))
if
(
arp
&&
cdh_ObjidIsNotNull
(
arp
->
Objid
))
{
{
sts
=
gdh_AttrrefToName
(
arp
,
name_str
,
sizeof
(
name_str
),
cdh_mName_pathStrict
);
if
(
this
->
event_name_entry_w
!=
NULL
)
if
(
ODD
(
sts
))
{
{
if
(
this
->
event_name_entry_w
!=
NULL
)
{
XmTextSetString
(
this
->
event_name_entry_w
,
name_str
);
XmTextSetString
(
this
->
event_name_entry_w
,
name_str
);
this
->
eventName_str
=
name_str
;
this
->
eventName_str
=
name_str
;
this
->
get_hist_list
();
this
->
get_hist_list
();
}
}
}
}
}
wow
=
new
CoWowMotif
(
parent_wid_hist
);
wow
=
new
CoWowMotif
(
parent_wid_hist
);
...
...
xtt/lib/xtt/motif/xtt_hist_motif.h
View file @
4799be55
...
@@ -53,7 +53,7 @@ class HistMotif : public Hist {
...
@@ -53,7 +53,7 @@ class HistMotif : public Hist {
public:
public:
HistMotif
(
void
*
hist_parent_ctx
,
HistMotif
(
void
*
hist_parent_ctx
,
Widget
hist_parent_wid
,
Widget
hist_parent_wid
,
char
*
hist_name
,
pwr_t
Objid
objid
,
char
*
hist_name
,
pwr_t
AttrRef
*
arp
,
pwr_tStatus
*
status
);
pwr_tStatus
*
status
);
~
HistMotif
();
~
HistMotif
();
...
...
xtt/lib/xtt/motif/xtt_xnav_motif.cpp
View file @
4799be55
...
@@ -246,9 +246,9 @@ Ev *XNavMotif::ev_new( char *eve_name, char *ala_name, char *blk_name,
...
@@ -246,9 +246,9 @@ Ev *XNavMotif::ev_new( char *eve_name, char *ala_name, char *blk_name,
display_return
,
display_ack
,
ev_beep
,
ev_pop_mask
,
ev_eventname_seg
,
status
);
display_return
,
display_ack
,
ev_beep
,
ev_pop_mask
,
ev_eventname_seg
,
status
);
}
}
Hist
*
XNavMotif
::
hist_new
(
char
*
title
,
pwr_t
Oid
oid
,
pwr_tStatus
*
sts
)
Hist
*
XNavMotif
::
hist_new
(
char
*
title
,
pwr_t
AttrRef
*
arp
,
pwr_tStatus
*
sts
)
{
{
return
new
HistMotif
(
this
,
parent_wid
,
title
,
oid
,
sts
);
return
new
HistMotif
(
this
,
parent_wid
,
title
,
arp
,
sts
);
}
}
Block
*
XNavMotif
::
block_new
(
pwr_tAttrRef
*
arp
,
char
*
name
,
unsigned
int
priv
,
Block
*
XNavMotif
::
block_new
(
pwr_tAttrRef
*
arp
,
char
*
name
,
unsigned
int
priv
,
...
...
xtt/lib/xtt/motif/xtt_xnav_motif.h
View file @
4799be55
...
@@ -69,7 +69,7 @@ class XNavMotif : public XNav {
...
@@ -69,7 +69,7 @@ class XNavMotif : public XNav {
pwr_tObjid
ev_user
,
int
display_ala
,
int
display_eve
,
pwr_tObjid
ev_user
,
int
display_ala
,
int
display_eve
,
int
display_blk
,
int
display_return
,
int
display_ack
,
int
display_blk
,
int
display_return
,
int
display_ack
,
int
ev_beep
,
pwr_tMask
ev_pop_mask
,
int
ev_eventname_seg
,
pwr_tStatus
*
status
);
int
ev_beep
,
pwr_tMask
ev_pop_mask
,
int
ev_eventname_seg
,
pwr_tStatus
*
status
);
Hist
*
hist_new
(
char
*
title
,
pwr_t
Oid
oid
,
pwr_tStatus
*
sts
);
Hist
*
hist_new
(
char
*
title
,
pwr_t
AttrRef
*
arp
,
pwr_tStatus
*
sts
);
Block
*
block_new
(
pwr_tAttrRef
*
arp
,
char
*
name
,
unsigned
int
priv
,
Block
*
block_new
(
pwr_tAttrRef
*
arp
,
char
*
name
,
unsigned
int
priv
,
pwr_tStatus
*
sts
);
pwr_tStatus
*
sts
);
Op
*
op_new
(
char
*
opplace
,
pwr_tStatus
*
sts
);
Op
*
op_new
(
char
*
opplace
,
pwr_tStatus
*
sts
);
...
...
xtt/lib/xtt/src/xtt_c_object.cpp
View file @
4799be55
...
@@ -167,7 +167,7 @@ static pwr_tStatus HistEventFilter( xmenu_sMenuCall *ip)
...
@@ -167,7 +167,7 @@ static pwr_tStatus HistEventFilter( xmenu_sMenuCall *ip)
else
else
objar
=
&
ip
->
ItemList
[
ip
->
ChosenItem
].
CurrentObject
;
objar
=
&
ip
->
ItemList
[
ip
->
ChosenItem
].
CurrentObject
;
if
(
objar
->
Flags
.
b
.
Object
)
if
(
objar
->
Flags
.
b
.
Object
||
objar
->
Flags
.
b
.
ObjectAttr
)
return
1
;
return
1
;
return
0
;
return
0
;
}
}
...
...
xtt/lib/xtt/src/xtt_hist.cpp
View file @
4799be55
...
@@ -83,7 +83,7 @@ pwr_tStatus mh_clear_alarmlist_bc( pwr_tNodeIndex nix);
...
@@ -83,7 +83,7 @@ pwr_tStatus mh_clear_alarmlist_bc( pwr_tNodeIndex nix);
bool
compDate
(
sEvent
ev1
,
sEvent
ev2
);
bool
compDate
(
sEvent
ev1
,
sEvent
ev2
);
Hist
::
Hist
(
void
*
hist_parent_ctx
,
Hist
::
Hist
(
void
*
hist_parent_ctx
,
char
*
hist_name
,
pwr_t
Objid
objid
,
char
*
hist_name
,
pwr_t
AttrRef
*
arp
,
pwr_tStatus
*
status
)
:
pwr_tStatus
*
status
)
:
parent_ctx
(
hist_parent_ctx
),
parent_ctx
(
hist_parent_ctx
),
start_trace_cb
(
NULL
),
display_in_xnav_cb
(
NULL
),
update_info_cb
(
NULL
),
start_trace_cb
(
NULL
),
display_in_xnav_cb
(
NULL
),
update_info_cb
(
NULL
),
...
...
xtt/lib/xtt/src/xtt_hist.h
View file @
4799be55
...
@@ -61,7 +61,7 @@ class CoWow;
...
@@ -61,7 +61,7 @@ class CoWow;
class
Hist
{
class
Hist
{
public:
public:
Hist
(
void
*
hist_parent_ctx
,
Hist
(
void
*
hist_parent_ctx
,
char
*
hist_name
,
pwr_t
Objid
objid
,
char
*
hist_name
,
pwr_t
AttrRef
*
arp
,
pwr_tStatus
*
status
);
pwr_tStatus
*
status
);
virtual
~
Hist
();
virtual
~
Hist
();
...
...
xtt/lib/xtt/src/xtt_xnav.h
View file @
4799be55
...
@@ -342,7 +342,7 @@ class XNav {
...
@@ -342,7 +342,7 @@ class XNav {
pwr_tObjid
ev_user
,
int
display_ala
,
int
display_eve
,
pwr_tObjid
ev_user
,
int
display_ala
,
int
display_eve
,
int
display_blk
,
int
display_return
,
int
display_ack
,
int
display_blk
,
int
display_return
,
int
display_ack
,
int
ev_beep
,
pwr_tMask
ev_pop_mask
,
int
ev_eventname_seg
,
pwr_tStatus
*
status
)
{
return
0
;}
int
ev_beep
,
pwr_tMask
ev_pop_mask
,
int
ev_eventname_seg
,
pwr_tStatus
*
status
)
{
return
0
;}
virtual
Hist
*
hist_new
(
char
*
title
,
pwr_t
Oid
oid
,
pwr_tStatus
*
sts
)
{
return
0
;}
virtual
Hist
*
hist_new
(
char
*
title
,
pwr_t
AttrRef
*
arp
,
pwr_tStatus
*
sts
)
{
return
0
;}
virtual
Block
*
block_new
(
pwr_tAttrRef
*
arp
,
char
*
name
,
unsigned
int
priv
,
virtual
Block
*
block_new
(
pwr_tAttrRef
*
arp
,
char
*
name
,
unsigned
int
priv
,
pwr_tStatus
*
sts
)
{
return
0
;}
pwr_tStatus
*
sts
)
{
return
0
;}
virtual
Op
*
op_new
(
char
*
opplace
,
pwr_tStatus
*
sts
)
{
return
0
;}
virtual
Op
*
op_new
(
char
*
opplace
,
pwr_tStatus
*
sts
)
{
return
0
;}
...
...
xtt/lib/xtt/src/xtt_xnav_command.cpp
View file @
4799be55
...
@@ -1932,22 +1932,23 @@ static int xnav_show_func( void *client_data,
...
@@ -1932,22 +1932,23 @@ static int xnav_show_func( void *client_data,
else
if
(
cdh_NoCaseStrncmp
(
arg1_str
,
"HISTLIST"
,
strlen
(
arg1_str
))
==
0
)
else
if
(
cdh_NoCaseStrncmp
(
arg1_str
,
"HISTLIST"
,
strlen
(
arg1_str
))
==
0
)
{
{
char
hist_title
[
40
];
char
hist_title
[
40
];
pwr_tOName
name_str
;
pwr_tAName
name_str
;
pwr_tObjid
objid
=
pwr_cNObjid
;
pwr_tAttrRef
*
arp
=
0
;
pwr_tAttrRef
aref
;
if
(
ODD
(
dcli_get_qualifier
(
"dcli_arg2"
,
name_str
,
sizeof
(
name_str
))))
if
(
ODD
(
dcli_get_qualifier
(
"dcli_arg2"
,
name_str
,
sizeof
(
name_str
))))
{
{
sts
=
gdh_NameToObjid
(
name_str
,
&
objid
);
sts
=
gdh_NameToAttrref
(
pwr_cNOid
,
name_str
,
&
aref
);
if
(
EVEN
(
sts
))
if
(
EVEN
(
sts
))
{
{
xnav
->
message
(
'E'
,
"Object not found"
);
xnav
->
message
(
'E'
,
"Object not found"
);
return
XNAV__HOLDCOMMAND
;
return
XNAV__HOLDCOMMAND
;
}
}
arp
=
&
aref
;
}
}
strcpy
(
hist_title
,
Lng
::
translate
(
"Hist list"
));
strcpy
(
hist_title
,
Lng
::
translate
(
"Hist list"
));
Hist
*
hist
;
Hist
*
hist
;
hist
=
xnav
->
hist_new
(
hist_title
,
objid
,
&
sts
);
hist
=
xnav
->
hist_new
(
hist_title
,
arp
,
&
sts
);
if
(
EVEN
(
sts
))
if
(
EVEN
(
sts
))
{
{
delete
hist
;
delete
hist
;
...
...
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