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
937ae7eb
Commit
937ae7eb
authored
Sep 27, 2017
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xtt trace, toolbar button to open parent trace window
parent
884c8b73
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
4 deletions
+52
-4
xtt/lib/xtt/gtk/xtt_trace_gtk.cpp
xtt/lib/xtt/gtk/xtt_trace_gtk.cpp
+24
-1
xtt/lib/xtt/gtk/xtt_trace_gtk.h
xtt/lib/xtt/gtk/xtt_trace_gtk.h
+2
-1
xtt/lib/xtt/src/xtt_trace.cpp
xtt/lib/xtt/src/xtt_trace.cpp
+24
-1
xtt/lib/xtt/src/xtt_trace.h
xtt/lib/xtt/src/xtt_trace.h
+2
-1
No files found.
xtt/lib/xtt/gtk/xtt_trace_gtk.cpp
View file @
937ae7eb
...
...
@@ -112,6 +112,13 @@ void RtTraceGtk::activate_display_object(GtkWidget *w, gpointer data)
tractx
->
activate_display_object
();
}
void
RtTraceGtk
::
activate_parent_window
(
GtkWidget
*
w
,
gpointer
data
)
{
RtTrace
*
tractx
=
(
RtTrace
*
)
data
;
tractx
->
activate_parent_window
();
}
void
RtTraceGtk
::
activate_collect_insert
(
GtkWidget
*
w
,
gpointer
data
)
{
RtTrace
*
tractx
=
(
RtTrace
*
)
data
;
...
...
@@ -312,6 +319,8 @@ RtTraceGtk::RtTraceGtk( void *tr_parent_ctx, GtkWidget *tr_parent_wid, pwr_tObji
pwr_tAName
hostname
;
pwr_tOName
plcconnect
;
pwr_tFileName
fname
;
pwr_tObjid
parent
;
pwr_tCid
parent_cid
;
sts
=
gdh_ObjidToName
(
tr_objid
,
name
,
sizeof
(
name
),
cdh_mNName
);
if
(
EVEN
(
sts
))
{
...
...
@@ -613,6 +622,20 @@ RtTraceGtk::RtTraceGtk( void *tr_parent_ctx, GtkWidget *tr_parent_wid, pwr_tObji
// Toolbar
GtkToolbar
*
tools
=
(
GtkToolbar
*
)
g_object_new
(
GTK_TYPE_TOOLBAR
,
NULL
);
// Open parent window for subwindows
sts
=
gdh_GetParent
(
objid
,
&
parent
);
if
(
ODD
(
sts
))
{
sts
=
gdh_GetObjectClass
(
parent
,
&
parent_cid
);
if
(
ODD
(
sts
)
&&
parent_cid
!=
pwr_cClass_plc
)
{
GtkWidget
*
tools_parent_window
=
gtk_button_new
();
dcli_translate_filename
(
fname
,
"$pwr_exe/xtt_up.png"
);
gtk_container_add
(
GTK_CONTAINER
(
tools_parent_window
),
gtk_image_new_from_file
(
fname
));
g_signal_connect
(
tools_parent_window
,
"clicked"
,
G_CALLBACK
(
activate_parent_window
),
this
);
gtk_toolbar_append_widget
(
tools
,
tools_parent_window
,
"Open parent window"
,
""
);
}
}
GtkWidget
*
tools_display_object
=
gtk_button_new
();
dcli_translate_filename
(
fname
,
"$pwr_exe/xtt_navigator.png"
);
gtk_container_add
(
GTK_CONTAINER
(
tools_display_object
),
...
...
@@ -722,4 +745,4 @@ RtTraceGtk::RtTraceGtk( void *tr_parent_ctx, GtkWidget *tr_parent_wid, pwr_tObji
sprintf
(
msg
,
"Trace file is older than database version
\n
(%s < %s)"
,
flow_version_str
,
window_version_str
);
wow
->
DisplayError
(
"Version mismatch"
,
msg
);
}
}
\ No newline at end of file
}
xtt/lib/xtt/gtk/xtt_trace_gtk.h
View file @
937ae7eb
...
...
@@ -66,6 +66,7 @@ class RtTraceGtk : public RtTrace {
static
void
activate_savetrace
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_restoretrace
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_cleartrace
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_parent_window
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_display_object
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_collect_insert
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_open_object
(
GtkWidget
*
w
,
gpointer
data
);
...
...
@@ -88,4 +89,4 @@ class RtTraceGtk : public RtTrace {
static
void
activate_helpplclist
(
GtkWidget
*
w
,
gpointer
data
);
};
#endif
\ No newline at end of file
#endif
xtt/lib/xtt/src/xtt_trace.cpp
View file @
937ae7eb
...
...
@@ -470,6 +470,29 @@ void RtTrace::activate_cleartrace()
flow_RemoveTraceObjects
(
flow_ctx
);
}
void
RtTrace
::
activate_parent_window
()
{
int
sts
;
pwr_tAttrRef
attrref
;
pwr_tOid
parent
;
xmenu_eItemType
itemtype
;
sts
=
gdh_GetParent
(
objid
,
&
parent
);
if
(
EVEN
(
sts
))
return
;
itemtype
=
xmenu_eItemType_Object
;
attrref
=
cdh_ObjidToAref
(
parent
);
if
(
call_method_cb
)
{
(
call_method_cb
)(
parent_ctx
,
"$Object-OpenTrace"
,
"$Object-OpenTraceFilter"
,
attrref
,
itemtype
,
xmenu_mUtility_XNav
,
NULL
);
}
}
void
RtTrace
::
activate_display_object
()
{
flow_tObject
node
;
...
...
@@ -1578,4 +1601,4 @@ RtTrace::RtTrace( void *tr_parent_ctx, pwr_tObjid tr_objid,
display_object_cb
(
0
),
collect_insert_cb
(
0
),
is_authorized_cb
(
0
),
popup_menu_cb
(
0
),
call_method_cb
(
0
),
trace_list
(
0
),
version
(
0
),
m_has_host
(
0
),
wow
(
0
)
{
}
\ No newline at end of file
}
xtt/lib/xtt/src/xtt_trace.h
View file @
937ae7eb
...
...
@@ -113,6 +113,7 @@ class RtTrace {
void
activate_savetrace
();
void
activate_restoretrace
();
void
activate_cleartrace
();
void
activate_parent_window
();
void
activate_display_object
();
void
activate_collect_insert
();
void
activate_open_object
();
...
...
@@ -155,4 +156,4 @@ class RtTrace {
};
#endif
\ No newline at end of file
#endif
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