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
4cb16e62
Commit
4cb16e62
authored
Apr 09, 2014
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xtt ge graph or multiview base window is operator window and navigator hidden
parent
5521c405
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
240 additions
and
50 deletions
+240
-50
src/wbl/pwrb/src/pwrb_td_opplaceoptionsmask.wb_load
src/wbl/pwrb/src/pwrb_td_opplaceoptionsmask.wb_load
+10
-0
xtt/exe/rt_xtt/gtk/rt_xtt_gtk.cpp
xtt/exe/rt_xtt/gtk/rt_xtt_gtk.cpp
+1
-1
xtt/lib/cow/gtk/cow_wow_gtk.cpp
xtt/lib/cow/gtk/cow_wow_gtk.cpp
+12
-0
xtt/lib/cow/src/cow_wow.cpp
xtt/lib/cow/src/cow_wow.cpp
+1
-0
xtt/lib/cow/src/cow_wow.h
xtt/lib/cow/src/cow_wow.h
+2
-0
xtt/lib/xtt/gtk/xtt_ev_gtk.cpp
xtt/lib/xtt/gtk/xtt_ev_gtk.cpp
+15
-0
xtt/lib/xtt/gtk/xtt_ev_gtk.h
xtt/lib/xtt/gtk/xtt_ev_gtk.h
+3
-0
xtt/lib/xtt/gtk/xtt_ge_gtk.cpp
xtt/lib/xtt/gtk/xtt_ge_gtk.cpp
+5
-1
xtt/lib/xtt/gtk/xtt_multiview_gtk.cpp
xtt/lib/xtt/gtk/xtt_multiview_gtk.cpp
+4
-1
xtt/lib/xtt/gtk/xtt_op_gtk.cpp
xtt/lib/xtt/gtk/xtt_op_gtk.cpp
+0
-3
xtt/lib/xtt/gtk/xtt_xnav_gtk.cpp
xtt/lib/xtt/gtk/xtt_xnav_gtk.cpp
+12
-0
xtt/lib/xtt/gtk/xtt_xnav_gtk.h
xtt/lib/xtt/gtk/xtt_xnav_gtk.h
+1
-0
xtt/lib/xtt/src/xtt_ev.h
xtt/lib/xtt/src/xtt_ev.h
+3
-0
xtt/lib/xtt/src/xtt_op.cpp
xtt/lib/xtt/src/xtt_op.cpp
+0
-29
xtt/lib/xtt/src/xtt_op.h
xtt/lib/xtt/src/xtt_op.h
+0
-2
xtt/lib/xtt/src/xtt_xnav.cpp
xtt/lib/xtt/src/xtt_xnav.cpp
+58
-1
xtt/lib/xtt/src/xtt_xnav.h
xtt/lib/xtt/src/xtt_xnav.h
+7
-1
xtt/lib/xtt/src/xtt_xnav_command.cpp
xtt/lib/xtt/src/xtt_xnav_command.cpp
+106
-11
No files found.
src/wbl/pwrb/src/pwrb_td_opplaceoptionsmask.wb_load
View file @
4cb16e62
...
...
@@ -81,6 +81,16 @@ SObject pwrb:Type
Attr Value = 4
EndBody
EndObject
!/**
! All windows transient of main.
!*/
Object EnablePrintDialog $Bit
Body SysBody
Attr PgmName = "AllMainTransient"
Attr Text = "AllMainTransient"
Attr Value = 8
EndBody
EndObject
EndObject
EndSObject
...
...
xtt/exe/rt_xtt/gtk/rt_xtt_gtk.cpp
View file @
4cb16e62
...
...
@@ -280,7 +280,7 @@ void XttGtk::activate_exit( GtkWidget *w, gpointer data)
{
Xtt
*
xtt
=
(
Xtt
*
)
data
;
close
(
xtt
,
xtt
->
xnav
->
op
?
0
:
1
);
close
(
xtt
,
xtt
->
xnav
->
op
||
xtt
->
xnav
->
ge_main
||
xtt
->
xnav
->
multiview_main
?
0
:
1
);
}
void
XttGtk
::
activate_print
(
GtkWidget
*
w
,
gpointer
data
)
...
...
xtt/lib/cow/gtk/cow_wow_gtk.cpp
View file @
4cb16e62
...
...
@@ -176,6 +176,9 @@ void CoWowGtk::DisplayQuestion( void *ctx, const char *title, const char *text,
gtk_box_pack_end
(
GTK_BOX
(
question_vbox
),
question_hboxbuttons
,
FALSE
,
FALSE
,
15
);
gtk_container_add
(
GTK_CONTAINER
(
question_widget
),
question_vbox
);
gtk_widget_show_all
(
question_widget
);
if
(
m_transient_wid
)
gtk_window_set_transient_for
(
GTK_WINDOW
(
question_widget
),
GTK_WINDOW
(
m_transient_wid
));
}
void
CoWowGtk
::
inputdialog_ok_cb
(
GtkWidget
*
w
,
gpointer
data
)
...
...
@@ -300,6 +303,9 @@ void CoWowGtk::CreateInputDialog( void *ctx, const char *title, const char *text
strlen
(
textutf8
),
&
pos
);
g_free
(
textutf8
);
}
if
(
m_transient_wid
)
gtk_window_set_transient_for
(
GTK_WINDOW
(
inputdialog_widget
),
GTK_WINDOW
(
m_transient_wid
));
}
/************************************************************************
...
...
@@ -407,6 +413,8 @@ void CoWowGtk::DisplayText( const char *title, const char *text, int width, int
gtk_container_add
(
GTK_CONTAINER
(
dialog
),
displaytext_vbox
);
gtk_widget_show_all
(
dialog
);
if
(
m_transient_wid
)
gtk_window_set_transient_for
(
GTK_WINDOW
(
dialog
),
GTK_WINDOW
(
m_transient_wid
));
}
/************************************************************************
...
...
@@ -619,6 +627,9 @@ void *CoWowGtk::CreateList (
// Set input focus to the scrolled list widget
gtk_widget_grab_focus
(
ctx
->
list
);
if
(
m_transient_wid
)
gtk_window_set_transient_for
(
GTK_WINDOW
(
ctx
->
toplevel
),
GTK_WINDOW
(
m_transient_wid
));
return
ctx
;
}
...
...
@@ -1702,6 +1713,7 @@ void CoWowGtk::CreateBrowPrintDialogGtk( const char *title, void *brow_ctx, int
settings
=
(
GtkPrintSettings
*
)
g_object_ref
(
gtk_print_operation_get_print_settings
(
print
));
}
g_object_unref
(
print
);
*
sts
=
WOW__SUCCESS
;
}
...
...
xtt/lib/cow/src/cow_wow.cpp
View file @
4cb16e62
...
...
@@ -47,6 +47,7 @@
bool
CoWow
::
m_autoremove
=
false
;
bool
CoWow
::
m_printdialog_disable
=
false
;
char
CoWow
::
m_default_printer
[
80
]
=
""
;
void
*
CoWow
::
m_transient_wid
=
0
;
CoWow
::~
CoWow
()
{}
...
...
xtt/lib/cow/src/cow_wow.h
View file @
4cb16e62
...
...
@@ -106,6 +106,7 @@ class CoWow {
static
bool
m_autoremove
;
static
bool
m_printdialog_disable
;
static
char
m_default_printer
[
80
];
static
void
*
m_transient_wid
;
public:
CoWow
()
{}
...
...
@@ -163,6 +164,7 @@ class CoWow {
static
void
DisablePrintDialog
()
{
m_printdialog_disable
=
true
;}
static
bool
PrintDialogIsDisabled
()
{
return
m_printdialog_disable
;}
static
void
SetAutoRemove
(
bool
on
)
{
m_autoremove
=
on
;}
static
void
SetTransient
(
void
*
transient_wid
)
{
m_transient_wid
=
transient_wid
;}
};
...
...
xtt/lib/xtt/gtk/xtt_ev_gtk.cpp
View file @
4cb16e62
...
...
@@ -976,6 +976,21 @@ void EvGtk::unmap_blk()
}
}
void
EvGtk
::
set_transient_eve
(
void
*
basewidget
)
{
gtk_window_set_transient_for
(
GTK_WINDOW
(
parent_wid_eve
),
GTK_WINDOW
(
basewidget
));
}
void
EvGtk
::
set_transient_ala
(
void
*
basewidget
)
{
gtk_window_set_transient_for
(
GTK_WINDOW
(
parent_wid_ala
),
GTK_WINDOW
(
basewidget
));
}
void
EvGtk
::
set_transient_blk
(
void
*
basewidget
)
{
gtk_window_set_transient_for
(
GTK_WINDOW
(
parent_wid_blk
),
GTK_WINDOW
(
basewidget
));
}
void
EvGtk
::
set_title_ala
(
char
*
title
)
{
g_object_set
(
parent_wid_ala
,
"title"
,
title
,
NULL
);
...
...
xtt/lib/xtt/gtk/xtt_ev_gtk.h
View file @
4cb16e62
...
...
@@ -84,6 +84,9 @@ class EvGtk : public Ev {
void
unmap_eve
();
void
unmap_ala
();
void
unmap_blk
();
void
set_transient_eve
(
void
*
basewidget
);
void
set_transient_ala
(
void
*
basewidget
);
void
set_transient_blk
(
void
*
basewidget
);
void
set_title_ala
(
char
*
title
);
EvAla
*
open_alarmlist_satellite
(
const
char
*
title
,
pwr_tStatus
*
sts
,
int
width
,
int
height
,
int
x
,
int
y
,
pwr_tObjid
view
,
...
...
xtt/lib/xtt/gtk/xtt_ge_gtk.cpp
View file @
4cb16e62
...
...
@@ -203,7 +203,9 @@ void XttGeGtk::activate_exit( GtkWidget *w, gpointer data)
{
XttGe
*
ge
=
(
XttGe
*
)
data
;
if
(
!
(
ge
->
options
&
ge_mOptions_Embedded
))
if
(
ge
->
options
&
ge_mOptions_IsMain
)
(
ge
->
close_cb
)(
ge
->
parent_ctx
,
ge
);
else
if
(
!
(
ge
->
options
&
ge_mOptions_Embedded
))
delete
ge
;
}
...
...
@@ -339,6 +341,8 @@ XttGeGtk::XttGeGtk( GtkWidget *xg_parent_wid, void *xg_parent_ctx, const char *x
if
(
basewidget
)
{
gtk_window_set_transient_for
(
GTK_WINDOW
(
toplevel
),
GTK_WINDOW
(
basewidget
));
}
if
(
options
&
ge_mOptions_IsMain
)
CoWow
::
SetTransient
(
toplevel
);
}
else
{
...
...
xtt/lib/xtt/gtk/xtt_multiview_gtk.cpp
View file @
4cb16e62
...
...
@@ -108,7 +108,10 @@ void XttMultiViewGtk::activate_exit( GtkWidget *w, gpointer data)
{
XttMultiViewGtk
*
multiview
=
(
XttMultiViewGtk
*
)
data
;
delete
multiview
;
if
(
multiview
->
options
&
ge_mOptions_IsMain
)
(
multiview
->
close_cb
)(
multiview
->
parent_ctx
,
multiview
);
else
delete
multiview
;
}
...
...
xtt/lib/xtt/gtk/xtt_op_gtk.cpp
View file @
4cb16e62
...
...
@@ -1066,9 +1066,6 @@ int OpGtk::configure( char *opplace_str)
if
(
opplace_p
->
StartJavaProcess
)
start_jop
=
1
;
// Store autostart array
memcpy
(
autostart_aref
,
opplace_p
->
AutoStart
,
sizeof
(
autostart_aref
));
// Examine Graph objects
for
(
i
=
0
;
i
<
sizeof
(
opplace_p
->
FastAvail
)
/
sizeof
(
opplace_p
->
FastAvail
[
0
]);
i
++
)
{
...
...
xtt/lib/xtt/gtk/xtt_xnav_gtk.cpp
View file @
4cb16e62
...
...
@@ -192,6 +192,18 @@ void XNavGtk::pop()
gtk_window_present
(
GTK_WINDOW
(
top
));
}
void
XNavGtk
::
set_transient
(
void
*
basewidget
)
{
GtkWidget
*
parent
,
*
top
;
parent
=
gtk_widget_get_parent
(
form_widget
);
while
(
parent
)
{
top
=
parent
;
parent
=
gtk_widget_get_parent
(
parent
);
}
gtk_window_set_transient_for
(
GTK_WINDOW
(
top
),
GTK_WINDOW
(
basewidget
));
}
RtTrace
*
XNavGtk
::
plctrace_new
(
pwr_tOid
oid
,
pwr_tStatus
*
sts
)
{
return
new
RtTraceGtk
(
this
,
form_widget
,
oid
,
sts
);
...
...
xtt/lib/xtt/gtk/xtt_xnav_gtk.h
View file @
4cb16e62
...
...
@@ -58,6 +58,7 @@ class XNavGtk : public XNav {
void
set_inputfocus
();
void
pop
();
void
set_transient
(
void
*
basewidget
);
void
create_popup_menu
(
pwr_sAttrRef
attrref
,
xmenu_eItemType
item_type
,
xmenu_mUtility
caller
,
unsigned
int
priv
,
...
...
xtt/lib/xtt/src/xtt_ev.h
View file @
4cb16e62
...
...
@@ -133,6 +133,9 @@ class Ev {
virtual
void
unmap_eve
()
{}
virtual
void
unmap_ala
()
{}
virtual
void
unmap_blk
()
{}
virtual
void
set_transient_eve
(
void
*
basewidget
)
{}
virtual
void
set_transient_ala
(
void
*
basewidget
)
{}
virtual
void
set_transient_blk
(
void
*
basewidget
)
{}
virtual
void
set_title_ala
(
char
*
title
)
{}
virtual
EvAla
*
open_alarmlist_satellite
(
const
char
*
title
,
pwr_tStatus
*
sts
,
int
width
,
int
height
,
int
x
,
int
y
,
...
...
xtt/lib/xtt/src/xtt_op.cpp
View file @
4cb16e62
...
...
@@ -368,32 +368,3 @@ void Op::sup_scan( void *data)
op
->
sup_timerid
->
add
(
time
,
sup_scan
,
op
);
}
void
Op
::
appl_startup
()
{
pwr_tCmd
cmd
;
pwr_tAName
name
;
int
sts
;
if
(
command_cb
)
{
if
(
layout_mask
&
pwr_mOpWindLayoutMask_HideNavigator
||
(
is_authorized_cb
&&
!
is_authorized_cb
(
parent_ctx
,
pwr_mAccess_RtNavigator
|
pwr_mAccess_System
)))
{
strcpy
(
cmd
,
"close navigator"
);
command_cb
(
parent_ctx
,
cmd
);
}
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
autostart_aref
)
/
sizeof
(
autostart_aref
[
0
]);
i
++
)
{
if
(
cdh_ObjidIsNotNull
(
autostart_aref
[
i
].
Objid
))
{
sts
=
gdh_AttrrefToName
(
&
autostart_aref
[
i
],
name
,
sizeof
(
name
),
cdh_mName_volumeStrict
);
if
(
ODD
(
sts
))
{
strcpy
(
cmd
,
"ope gra/obj="
);
strcat
(
cmd
,
name
);
command_cb
(
parent_ctx
,
cmd
);
}
}
}
}
}
xtt/lib/xtt/src/xtt_op.h
View file @
4cb16e62
...
...
@@ -98,7 +98,6 @@ class Op {
pwr_tAttrRef
button_aref
[
25
];
int
button_cnt
;
int
start_jop
;
pwr_tAttrRef
autostart_aref
[
25
];
Jop
*
jop
;
void
(
*
command_cb
)(
void
*
,
char
*
);
void
(
*
map_cb
)(
void
*
);
...
...
@@ -131,7 +130,6 @@ class Op {
int
appl_action
(
int
idx
);
int
jop_command
(
char
*
command
);
int
sup_init
();
void
appl_startup
();
void
activate_exit
();
void
activate_aalarm_ack
();
void
activate_balarm_ack
();
...
...
xtt/lib/xtt/src/xtt_xnav.cpp
View file @
4cb16e62
...
...
@@ -3690,7 +3690,11 @@ int XNav::init_brow_base_cb( FlowCtx *fctx, void *client_data)
strcat
(
cmd
,
" /closebutton"
);
xnav
->
command
(
cmd
);
xnav
->
load_ev_from_opplace
();
// xnav->load_ev_from_opplace();
// xnav->appl_startup();
}
else
{
xnav
->
appl_startup
();
}
if
(
xnav
->
op
)
xnav
->
op
->
set_title
(
xnav
->
user
);
...
...
@@ -4259,3 +4263,56 @@ int XNav::eventlog_enabled()
}
return
elog_enabled
;
}
void
XNav
::
appl_startup
()
{
pwr_tCmd
cmd
;
pwr_tAName
name
;
int
sts
;
pwr_tCid
cid
;
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
opplace_p
->
AutoStart
)
/
sizeof
(
opplace_p
->
AutoStart
[
0
]);
i
++
)
{
if
(
cdh_ObjidIsNotNull
(
opplace_p
->
AutoStart
[
i
].
Objid
))
{
sts
=
gdh_AttrrefToName
(
&
opplace_p
->
AutoStart
[
i
],
name
,
sizeof
(
name
),
cdh_mName_volumeStrict
);
if
(
EVEN
(
sts
))
continue
;
sts
=
gdh_GetAttrRefTid
(
&
opplace_p
->
AutoStart
[
i
],
&
cid
);
if
(
EVEN
(
sts
))
continue
;
switch
(
cid
)
{
case
pwr_cClass_XttGraph
:
strcpy
(
cmd
,
"ope gra/obj="
);
strcat
(
cmd
,
name
);
if
(
i
==
0
&&
!
op
&&
opplace_p
->
OpWindLayout
&
pwr_mOpWindLayoutMask_HideNavigator
&&
opplace_p
->
OpWindLayout
&
pwr_mOpWindLayoutMask_HideOperatorWindow
)
{
strcat
(
cmd
,
"/main"
);
load_ev_from_opplace
();
}
command
(
cmd
);
break
;
case
pwr_cClass_XttMultiView
:
strcpy
(
cmd
,
"ope mult "
);
strcat
(
cmd
,
name
);
if
(
i
==
0
&&
!
op
&&
opplace_p
->
OpWindLayout
&
pwr_mOpWindLayoutMask_HideNavigator
&&
opplace_p
->
OpWindLayout
&
pwr_mOpWindLayoutMask_HideOperatorWindow
)
{
strcat
(
cmd
,
"/main"
);
load_ev_from_opplace
();
}
command
(
cmd
);
default:
;
}
}
}
if
(
opplace_p
->
OpWindLayout
&
pwr_mOpWindLayoutMask_HideNavigator
||
(
!
is_authorized
(
pwr_mAccess_RtNavigator
|
pwr_mAccess_System
)))
{
strcpy
(
cmd
,
"close navigator"
);
command
(
cmd
);
}
}
xtt/lib/xtt/src/xtt_xnav.h
View file @
4cb16e62
...
...
@@ -215,7 +215,9 @@ typedef enum {
ge_mOptions_FullMaximize
=
1
<<
2
,
ge_mOptions_Iconify
=
1
<<
3
,
ge_mOptions_Invisible
=
1
<<
4
,
ge_mOptions_Embedded
=
1
<<
5
ge_mOptions_Embedded
=
1
<<
5
,
ge_mOptions_IsMain
=
1
<<
6
,
ge_mOptions_HideCloseButton
=
1
<<
7
}
ge_mOptions
;
class
XNav
;
...
...
@@ -298,6 +300,8 @@ class XNav {
xnav_sMenu
*
menu_tree
;
Ev
*
ev
;
Op
*
op
;
XttGe
*
ge_main
;
XttMultiView
*
multiview_main
;
CLog
*
clog
;
int
closing_down
;
pwr_tOName
opplace_name
;
...
...
@@ -329,6 +333,7 @@ class XNav {
virtual
void
set_inputfocus
()
{}
virtual
void
pop
()
{}
virtual
void
set_transient
(
void
*
basewidget
)
{}
virtual
void
create_popup_menu
(
pwr_sAttrRef
attrref
,
xmenu_eItemType
item_type
,
xmenu_mUtility
caller
,
unsigned
int
priv
,
...
...
@@ -451,6 +456,7 @@ class XNav {
int
sound
(
pwr_tAttrRef
*
arp
);
int
sound_attached
();
int
eventlog_enabled
();
void
appl_startup
();
static
int
init_brow_base_cb
(
FlowCtx
*
fctx
,
void
*
client_data
);
...
...
xtt/lib/xtt/src/xtt_xnav_command.cpp
View file @
4cb16e62
...
...
@@ -165,6 +165,7 @@ static int xnav_attribute_func (
static
int
xnav_multiview_command_cb
(
void
*
gectx
,
char
*
command
,
void
*
caller
);
static
int
xnav_ge_command_cb
(
void
*
gectx
,
char
*
command
,
void
*
caller
);
static
void
xnav_ge_close_cb
(
void
*
xnav
,
void
*
gectx
);
static
void
xnav_multiview_close_cb
(
void
*
xnav
,
void
*
mvctx
);
//new code by Jonas Nylund 030131
static
void
xnav_hist_close_cb
(
void
*
ctx
);
//end new code by Jonas Nylund 030131
...
...
@@ -270,7 +271,7 @@ dcli_tCmdTable xnav_command_table[] = {
{
"dcli_arg1"
,
"dcli_arg2"
,
"/NAME"
,
"/FILE"
,
"/SCROLLBAR"
,
"/WIDTH"
,
"/HEIGHT"
,
"/MENU"
,
"/NAVIGATOR"
,
"/CENTER"
,
"/OBJECT"
,
"/NEW"
,
"/INSTANCE"
,
"/COLLECT"
,
"/FOCUS"
,
"/INPUTEMPTY"
,
"/INSTANCE"
,
"/COLLECT"
,
"/FOCUS"
,
"/INPUTEMPTY"
,
"/MAIN"
,
"/ENTRY"
,
"/TITLE"
,
"/ACCESS"
,
"/CLASSGRAPH"
,
"/PARENT"
,
"/PWINDOW"
,
"/PINSTANCE"
,
"/BYPASS"
,
"/CLOSEBUTTON"
,
"/TARGET"
,
"/TRIGGER"
,
"/TYPE"
,
"/FTYPE"
,
...
...
@@ -1905,6 +1906,7 @@ static int xnav_show_func( void *client_data,
char
arg2_str
[
80
];
int
arg2_sts
;
unsigned
int
options
=
0
;
void
*
basewidget
=
0
;
if
(
ODD
(
dcli_get_qualifier
(
"/FULLSCREEN"
,
0
,
0
)))
options
|=
ev_mAlaOptions_FullScreen
;
...
...
@@ -2015,6 +2017,15 @@ static int xnav_show_func( void *client_data,
}
else
{
xnav
->
ev
->
map_eve
(
options
);
if
(
xnav
->
opplace_p
->
Options
&
pwr_mOpPlaceOptionsMask_AllMainTransient
)
{
if
(
xnav
->
ge_main
)
basewidget
=
xnav
->
ge_main
->
get_widget
();
else
if
(
xnav
->
multiview_main
)
basewidget
=
xnav
->
multiview_main
->
get_widget
();
if
(
basewidget
)
xnav
->
ev
->
set_transient_eve
(
basewidget
);
}
}
}
/*new code by Jonas Nylund 030122*/
...
...
@@ -2059,6 +2070,7 @@ static int xnav_show_func( void *client_data,
char
arg2_str
[
80
];
int
arg2_sts
;
unsigned
int
options
=
0
;
void
*
basewidget
=
0
;
if
(
ODD
(
dcli_get_qualifier
(
"/FULLSCREEN"
,
0
,
0
)))
options
|=
ev_mAlaOptions_FullScreen
;
...
...
@@ -2168,11 +2180,21 @@ static int xnav_show_func( void *client_data,
}
else
{
xnav
->
ev
->
map_ala
(
options
);
if
(
xnav
->
opplace_p
->
Options
&
pwr_mOpPlaceOptionsMask_AllMainTransient
)
{
if
(
xnav
->
ge_main
)
basewidget
=
xnav
->
ge_main
->
get_widget
();
else
if
(
xnav
->
multiview_main
)
basewidget
=
xnav
->
multiview_main
->
get_widget
();
if
(
basewidget
)
xnav
->
ev
->
set_transient_ala
(
basewidget
);
}
}
}
else
if
(
cdh_NoCaseStrncmp
(
arg1_str
,
"BLOCKLIST"
,
strlen
(
arg1_str
))
==
0
)
{
unsigned
int
options
=
0
;
void
*
basewidget
=
0
;
if
(
ODD
(
dcli_get_qualifier
(
"/FULLSCREEN"
,
0
,
0
)))
options
|=
ev_mAlaOptions_FullScreen
;
...
...
@@ -2212,6 +2234,15 @@ static int xnav_show_func( void *client_data,
}
else
xnav
->
ev
->
map_blk
(
options
);
if
(
xnav
->
opplace_p
->
Options
&
pwr_mOpPlaceOptionsMask_AllMainTransient
)
{
if
(
xnav
->
ge_main
)
basewidget
=
xnav
->
ge_main
->
get_widget
();
else
if
(
xnav
->
multiview_main
)
basewidget
=
xnav
->
multiview_main
->
get_widget
();
if
(
basewidget
)
xnav
->
ev
->
set_transient_blk
(
basewidget
);
}
}
else
if
(
cdh_NoCaseStrncmp
(
arg1_str
,
"USER"
,
strlen
(
arg1_str
))
==
0
)
{
...
...
@@ -2898,7 +2929,12 @@ static int xnav_open_func( void *client_data,
if
(
ODD
(
dcli_get_qualifier
(
"/ICONIFY"
,
0
,
0
)))
options
|=
ge_mOptions_Iconify
;
if
(
ODD
(
dcli_get_qualifier
(
"/HIDE"
,
0
,
0
)))
options
|=
ge_mOptions_Invisible
;
options
|=
ge_mOptions_Invisible
;
if
(
ODD
(
dcli_get_qualifier
(
"/MAIN"
,
0
,
0
))
&&
!
xnav
->
op
&&
!
xnav
->
ge_main
&&
!
xnav
->
multiview_main
)
{
options
|=
ge_mOptions_IsMain
;
if
(
xnav
->
opplace_p
->
OpWindLayout
&
pwr_mOpWindLayoutMask_HideCloseButton
)
options
|=
ge_mOptions_HideCloseButton
;
}
if
(
ODD
(
dcli_get_qualifier
(
"/PWINDOW"
,
pwindow_str
,
sizeof
(
pwindow_str
))))
{
char
*
pinstance_p
=
0
;
...
...
@@ -2925,6 +2961,12 @@ static int xnav_open_func( void *client_data,
basewidget
=
gectx
->
get_widget
();
}
}
else
if
(
xnav
->
opplace_p
->
Options
&
pwr_mOpPlaceOptionsMask_AllMainTransient
)
{
if
(
xnav
->
ge_main
)
basewidget
=
xnav
->
ge_main
->
get_widget
();
else
if
(
xnav
->
multiview_main
)
basewidget
=
xnav
->
multiview_main
->
get_widget
();
}
if
(
ODD
(
dcli_get_qualifier
(
"/INSTANCE"
,
instance_str
,
sizeof
(
instance_str
))))
{
instance_p
=
instance_str
;
...
...
@@ -3264,6 +3306,11 @@ static int xnav_open_func( void *client_data,
options
|=
ge_mOptions_Iconify
;
if
(
ODD
(
dcli_get_qualifier
(
"/HIDE"
,
0
,
0
)))
options
|=
ge_mOptions_Invisible
;
if
(
ODD
(
dcli_get_qualifier
(
"/MAIN"
,
0
,
0
))
&&
!
xnav
->
op
&&
!
xnav
->
ge_main
&&
!
xnav
->
multiview_main
)
{
options
|=
ge_mOptions_IsMain
;
if
(
xnav
->
opplace_p
->
OpWindLayout
&
pwr_mOpWindLayoutMask_HideCloseButton
)
options
|=
ge_mOptions_HideCloseButton
;
}
if
(
ODD
(
dcli_get_qualifier
(
"/WIDTH"
,
tmp_str
,
sizeof
(
tmp_str
))))
{
nr
=
sscanf
(
tmp_str
,
"%d"
,
&
width
);
...
...
@@ -3319,7 +3366,7 @@ static int xnav_open_func( void *client_data,
xnav
->
message
(
' '
,
XNav
::
get_message
(
sts
));
return
sts
;
}
mvctx
->
close_cb
=
xnav_
ge
_close_cb
;
mvctx
->
close_cb
=
xnav_
multiview
_close_cb
;
mvctx
->
help_cb
=
xnav_ge_help_cb
;
mvctx
->
display_in_xnav_cb
=
xnav_ge_display_in_xnav_cb
;
mvctx
->
popup_menu_cb
=
xnav_popup_menu_cb
;
...
...
@@ -3330,6 +3377,14 @@ static int xnav_open_func( void *client_data,
xnav
->
appl
.
insert
(
applist_eType_MultiView
,
(
void
*
)
mvctx
,
&
aref
,
""
,
NULL
);
if
(
options
&
ge_mOptions_IsMain
)
{
if
(
xnav
->
opplace_p
->
OpWindLayout
&
pwr_mOpWindLayoutMask_HideCloseButton
)
options
|=
ge_mOptions_HideCloseButton
;
if
(
!
xnav
->
op
&&
!
xnav
->
ge_main
)
xnav
->
multiview_main
=
mvctx
;
}
}
return
XNAV__SUCCESS
;
}
...
...
@@ -3391,8 +3446,11 @@ static int xnav_open_func( void *client_data,
if
(
!
xnav
->
op
)
{
if
(
EVEN
(
dcli_get_qualifier
(
"dcli_arg2"
,
opplace_str
,
sizeof
(
opplace_str
))))
{
if
(
xnav
->
ge_main
||
xnav
->
multiview_main
)
{
xnav
->
message
(
'E'
,
"Main window alreay opened"
);
return
XNAV__HOLDCOMMAND
;
}
if
(
EVEN
(
dcli_get_qualifier
(
"dcli_arg2"
,
opplace_str
,
sizeof
(
opplace_str
))))
{
xnav
->
message
(
'E'
,
"Enter opplace"
);
return
XNAV__HOLDCOMMAND
;
}
...
...
@@ -3419,7 +3477,6 @@ static int xnav_open_func( void *client_data,
xnav
->
op
->
add_close_button
();
strcpy
(
xnav
->
opplace_name
,
opplace_str
);
xnav
->
op
->
set_title
(
xnav
->
user
);
xnav
->
op
->
appl_startup
();
// Load eventlist
if
(
xnav
->
ev
)
{
...
...
@@ -3428,6 +3485,7 @@ static int xnav_open_func( void *client_data,
}
xnav
->
load_ev_from_opplace
();
xnav
->
appl_startup
();
}
else
{
...
...
@@ -4408,7 +4466,7 @@ static int xnav_open_func( void *client_data,
xnav
->
clog
=
xnav
->
clog_new
(
"System Messages"
,
&
sts
);
if
(
EVEN
(
sts
))
{
delete
xnav
->
clog
;
xnav
->
op
=
0
;
xnav
->
clog
=
0
;
xnav
->
message
(
'E'
,
"Unable to open console log"
);
return
XNAV__SUCCESS
;
}
...
...
@@ -4485,6 +4543,7 @@ static int xnav_open_func( void *client_data,
pwr_tAName
object_str
;
pwr_tAttrRef
aref
;
pwr_tStatus
sts
;
void
*
basewidget
=
0
;
if
(
ODD
(
dcli_get_qualifier
(
"/OBJECT"
,
object_str
,
sizeof
(
object_str
))))
{
sts
=
gdh_NameToAttrref
(
pwr_cNObjid
,
object_str
,
&
aref
);
...
...
@@ -4497,6 +4556,16 @@ static int xnav_open_func( void *client_data,
}
xnav
->
pop
();
if
(
xnav
->
opplace_p
->
Options
&
pwr_mOpPlaceOptionsMask_AllMainTransient
)
{
if
(
xnav
->
ge_main
)
basewidget
=
xnav
->
ge_main
->
get_widget
();
else
if
(
xnav
->
multiview_main
)
basewidget
=
xnav
->
multiview_main
->
get_widget
();
if
(
basewidget
)
xnav
->
set_transient
(
basewidget
);
}
}
else
xnav
->
message
(
'E'
,
"Syntax error"
);
...
...
@@ -4785,7 +4854,7 @@ static int xnav_close_func( void *client_data,
else
if
(
cdh_NoCaseStrncmp
(
arg1_str
,
"NAVIGATOR"
,
strlen
(
arg1_str
))
==
0
)
{
if
(
xnav
->
close_cb
)
(
xnav
->
close_cb
)(
xnav
->
parent_ctx
,
xnav
->
op
?
0
:
1
);
(
xnav
->
close_cb
)(
xnav
->
parent_ctx
,
xnav
->
op
||
xnav
->
ge_main
||
xnav
->
multiview_main
?
0
:
1
);
}
else
if
(
cdh_NoCaseStrncmp
(
arg1_str
,
"ALL"
,
strlen
(
arg1_str
))
==
0
)
{
...
...
@@ -4988,9 +5057,32 @@ static int xnav_ge_command_cb( void *ctx, char *command, void *caller)
return
((
XNav
*
)
ctx
)
->
get_command_sts
();
}
static
void
xnav_ge_close_cb
(
void
*
x
nav
,
void
*
ctx
)
static
void
xnav_ge_close_cb
(
void
*
nav
,
void
*
ctx
)
{
((
XNav
*
)
xnav
)
->
appl
.
remove
(
(
void
*
)
ctx
);
XNav
*
xnav
=
(
XNav
*
)
nav
;
if
(
ctx
==
xnav
->
ge_main
)
{
if
(
xnav
->
close_cb
)
(
xnav
->
close_cb
)(
xnav
->
parent_ctx
,
1
);
else
exit
(
0
);
}
else
xnav
->
appl
.
remove
(
(
void
*
)
ctx
);
}
static
void
xnav_multiview_close_cb
(
void
*
nav
,
void
*
ctx
)
{
XNav
*
xnav
=
(
XNav
*
)
nav
;
if
(
ctx
==
xnav
->
multiview_main
)
{
if
(
xnav
->
close_cb
)
(
xnav
->
close_cb
)(
xnav
->
parent_ctx
,
1
);
else
exit
(
0
);
}
else
xnav
->
appl
.
remove
(
(
void
*
)
ctx
);
}
//new code Jonas Nylund 030131
...
...
@@ -8374,7 +8466,10 @@ void XNav::open_graph( const char *name, const char *filename, int scrollbar, in
object_name
);
if
(
focus_name
)
gectx
->
set_object_focus
(
focus_name
,
input_focus_empty
);
if
(
options
&
ge_mOptions_IsMain
)
{
if
(
!
op
&&
!
multiview_main
)
ge_main
=
gectx
;
}
}
}
...
...
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