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
3fa82e1e
Commit
3fa82e1e
authored
May 22, 2006
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Classes command and added to wtt menue
parent
a0eec161
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
125 additions
and
4 deletions
+125
-4
wb/lib/wb/src/wb_wnav_command.cpp
wb/lib/wb/src/wb_wnav_command.cpp
+80
-1
wb/lib/wb/src/wb_wtt.cpp
wb/lib/wb/src/wb_wtt.cpp
+26
-1
wb/lib/wb/src/wb_wtt.h
wb/lib/wb/src/wb_wtt.h
+2
-1
wb/mmi/wb/src/wb_wtt.uil
wb/mmi/wb/src/wb_wtt.uil
+17
-1
No files found.
wb/lib/wb/src/wb_wnav_command.cpp
View file @
3fa82e1e
/*
* Proview $Id: wb_wnav_command.cpp,v 1.4
1 2006-05-11 07:12:20
claes Exp $
* Proview $Id: wb_wnav_command.cpp,v 1.4
2 2006-05-22 08:20:36
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -84,6 +84,7 @@ extern "C" {
#include "wb_erep.h"
#include "wb_vrepwbl.h"
#include "wb_vrepmem.h"
#include "wb_vrepdb.h"
#include "wb_pkg.h"
#include "wb_build.h"
#include "wb_wtt.h"
...
...
@@ -178,6 +179,10 @@ static int wnav_release_func( void *client_data,
void
*
client_flag
);
static
int
wnav_build_func
(
void
*
client_data
,
void
*
client_flag
);
static
int
wnav_check_func
(
void
*
client_data
,
void
*
client_flag
);
static
int
wnav_update_func
(
void
*
client_data
,
void
*
client_flag
);
dcli_tCmdTable
wnav_command_table
[]
=
{
{
...
...
@@ -428,6 +433,16 @@ dcli_tCmdTable wnav_command_table[] = {
{
"dcli_arg1"
,
"dcli_arg2"
,
"/FORCE"
,
"/DEBUG"
,
"/CROSSREFERENCE"
,
"/MANUAL"
,
"/NAME"
,
""
}
},
{
"CHECK"
,
&
wnav_check_func
,
{
"dcli_arg1"
,
""
}
},
{
"UPDATE"
,
&
wnav_update_func
,
{
"dcli_arg1"
,
""
}
},
{
""
,}};
...
...
@@ -4637,6 +4652,70 @@ static int wnav_build_func( void *client_data,
return
1
;
}
static
int
wnav_check_func
(
void
*
client_data
,
void
*
client_flag
)
{
WNav
*
wnav
=
(
WNav
*
)
client_data
;
char
arg1_str
[
80
];
pwr_tStatus
sts
;
sts
=
wnav_wccm_get_ldhsession_cb
(
wnav
,
&
wnav
->
ldhses
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
dcli_get_qualifier
(
"dcli_arg1"
,
arg1_str
,
sizeof
(
arg1_str
));
if
(
EVEN
(
sts
))
{
wnav
->
message
(
'E'
,
"Syntax error"
);
return
WNAV__SYNTAX
;
}
if
(
strncmp
(
arg1_str
,
"CLASSES"
,
strlen
(
arg1_str
))
==
0
)
{
wb_volume
*
v
=
(
wb_volume
*
)
ldh_SessionToVol
(
wnav
->
ldhses
);
wb_vrepdb
*
vrep
=
(
wb_vrepdb
*
)((
wb_vrep
*
)
*
v
);
vrep
->
checkMeta
();
}
else
{
wnav
->
message
(
'E'
,
"Syntax error"
);
return
WNAV__SYNTAX
;
}
return
1
;
}
static
int
wnav_update_func
(
void
*
client_data
,
void
*
client_flag
)
{
WNav
*
wnav
=
(
WNav
*
)
client_data
;
char
arg1_str
[
80
];
pwr_tStatus
sts
;
sts
=
wnav_wccm_get_ldhsession_cb
(
wnav
,
&
wnav
->
ldhses
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
dcli_get_qualifier
(
"dcli_arg1"
,
arg1_str
,
sizeof
(
arg1_str
));
if
(
EVEN
(
sts
))
{
wnav
->
message
(
'E'
,
"Syntax error"
);
return
WNAV__SYNTAX
;
}
if
(
strncmp
(
arg1_str
,
"CLASSES"
,
strlen
(
arg1_str
))
==
0
)
{
if
(
!
wnav
->
editmode
)
{
wnav
->
message
(
'E'
,
"Not in edit mode"
);
return
WNAV__NOEDIT
;
}
wb_volume
*
v
=
(
wb_volume
*
)
ldh_SessionToVol
(
wnav
->
ldhses
);
wb_vrepdb
*
vrep
=
(
wb_vrepdb
*
)((
wb_vrep
*
)
*
v
);
vrep
->
updateMeta
();
wnav
->
message
(
'E'
,
"Classvolumes updated"
);
}
else
{
wnav
->
message
(
'E'
,
"Syntax error"
);
return
WNAV__SYNTAX
;
}
return
1
;
}
int
WNav
::
show_database
()
{
int
sts
;
...
...
wb/lib/wb/src/wb_wtt.cpp
View file @
3fa82e1e
/*
* Proview $Id: wb_wtt.cpp,v 1.3
2 2006-05-11 10:47:24
claes Exp $
* Proview $Id: wb_wtt.cpp,v 1.3
3 2006-05-22 08:20:36
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -265,6 +265,7 @@ void Wtt::menu_setup()
XtSetValues
(
menu_change_value_w
,
sensitive
,
1
);
XtSetValues
(
menu_edit_w
,
sensitive
,
1
);
XtSetValues
(
menu_classeditor_w
,
nosensitive
,
1
);
XtSetValues
(
menu_updateclasses_w
,
sensitive
,
1
);
}
else
{
XtSetValues
(
menu_save_w
,
nosensitive
,
1
);
...
...
@@ -284,6 +285,7 @@ void Wtt::menu_setup()
XtSetValues
(
menu_change_value_w
,
nosensitive
,
1
);
XtSetValues
(
menu_edit_w
,
sensitive
,
1
);
XtSetValues
(
menu_classeditor_w
,
sensitive
,
1
);
XtSetValues
(
menu_updateclasses_w
,
nosensitive
,
1
);
}
break
;
case
wb_eType_Volume
:
...
...
@@ -305,6 +307,10 @@ void Wtt::menu_setup()
XtSetValues
(
menu_change_value_w
,
sensitive
,
1
);
XtSetValues
(
menu_edit_w
,
sensitive
,
1
);
XtSetValues
(
menu_classeditor_w
,
nosensitive
,
1
);
if
(
ldhses
&&
ldh_VolRepType
(
ldhses
)
==
ldh_eVolRep_Dbs
)
XtSetValues
(
menu_updateclasses_w
,
nosensitive
,
1
);
else
XtSetValues
(
menu_updateclasses_w
,
sensitive
,
1
);
}
else
{
XtSetValues
(
menu_save_w
,
nosensitive
,
1
);
...
...
@@ -327,6 +333,7 @@ void Wtt::menu_setup()
XtSetValues
(
menu_change_value_w
,
nosensitive
,
1
);
XtSetValues
(
menu_edit_w
,
sensitive
,
1
);
XtSetValues
(
menu_classeditor_w
,
nosensitive
,
1
);
XtSetValues
(
menu_updateclasses_w
,
nosensitive
,
1
);
}
break
;
case
wb_eType_Class
:
...
...
@@ -348,6 +355,7 @@ void Wtt::menu_setup()
XtSetValues
(
menu_change_value_w
,
sensitive
,
1
);
XtSetValues
(
menu_edit_w
,
sensitive
,
1
);
XtSetValues
(
menu_classeditor_w
,
nosensitive
,
1
);
XtSetValues
(
menu_updateclasses_w
,
nosensitive
,
1
);
}
else
{
XtSetValues
(
menu_save_w
,
nosensitive
,
1
);
...
...
@@ -367,6 +375,7 @@ void Wtt::menu_setup()
XtSetValues
(
menu_change_value_w
,
nosensitive
,
1
);
XtSetValues
(
menu_edit_w
,
nosensitive
,
1
);
XtSetValues
(
menu_classeditor_w
,
nosensitive
,
1
);
XtSetValues
(
menu_updateclasses_w
,
nosensitive
,
1
);
}
break
;
case
wb_eType_ClassEditor
:
...
...
@@ -392,6 +401,7 @@ void Wtt::menu_setup()
XtSetValues
(
menu_change_value_w
,
sensitive
,
1
);
XtSetValues
(
menu_edit_w
,
sensitive
,
1
);
XtSetValues
(
menu_classeditor_w
,
nosensitive
,
1
);
XtSetValues
(
menu_updateclasses_w
,
nosensitive
,
1
);
}
else
{
XtSetValues
(
menu_save_w
,
nosensitive
,
1
);
...
...
@@ -411,6 +421,7 @@ void Wtt::menu_setup()
XtSetValues
(
menu_change_value_w
,
nosensitive
,
1
);
XtSetValues
(
menu_edit_w
,
sensitive
,
1
);
XtSetValues
(
menu_classeditor_w
,
nosensitive
,
1
);
XtSetValues
(
menu_updateclasses_w
,
nosensitive
,
1
);
}
break
;
case
wb_eType_Buffer
:
...
...
@@ -432,6 +443,7 @@ void Wtt::menu_setup()
XtSetValues
(
menu_change_value_w
,
sensitive
,
1
);
XtSetValues
(
menu_edit_w
,
sensitive
,
1
);
XtSetValues
(
menu_classeditor_w
,
nosensitive
,
1
);
XtSetValues
(
menu_updateclasses_w
,
nosensitive
,
1
);
}
else
{
XtSetValues
(
menu_save_w
,
nosensitive
,
1
);
...
...
@@ -451,6 +463,7 @@ void Wtt::menu_setup()
XtSetValues
(
menu_change_value_w
,
nosensitive
,
1
);
XtSetValues
(
menu_edit_w
,
sensitive
,
1
);
XtSetValues
(
menu_classeditor_w
,
nosensitive
,
1
);
XtSetValues
(
menu_updateclasses_w
,
nosensitive
,
1
);
}
break
;
case
wb_eType_ExternVolume
:
...
...
@@ -472,6 +485,7 @@ void Wtt::menu_setup()
XtSetValues
(
menu_change_value_w
,
sensitive
,
1
);
XtSetValues
(
menu_edit_w
,
sensitive
,
1
);
XtSetValues
(
menu_classeditor_w
,
nosensitive
,
1
);
XtSetValues
(
menu_updateclasses_w
,
nosensitive
,
1
);
}
else
{
XtSetValues
(
menu_save_w
,
nosensitive
,
1
);
...
...
@@ -491,6 +505,7 @@ void Wtt::menu_setup()
XtSetValues
(
menu_change_value_w
,
nosensitive
,
1
);
XtSetValues
(
menu_edit_w
,
sensitive
,
1
);
XtSetValues
(
menu_classeditor_w
,
nosensitive
,
1
);
XtSetValues
(
menu_updateclasses_w
,
nosensitive
,
1
);
}
break
;
default:
...
...
@@ -2501,6 +2516,14 @@ static void wtt_activate_showcrossref( Widget w, Wtt *wtt, XmAnyCallbackStruct *
wtt
->
focused_wnav
->
command
(
cmd
);
}
static
void
wtt_activate_updateclasses
(
Widget
w
,
Wtt
*
wtt
,
XmAnyCallbackStruct
*
data
)
{
char
cmd
[
80
]
=
"update classes"
;
if
(
!
wtt
->
focused_wnav
)
wtt
->
set_focus_default
();
wtt
->
focused_wnav
->
command
(
cmd
);
}
static
void
wtt_activate_zoom_in
(
Widget
w
,
Wtt
*
wtt
,
XmAnyCallbackStruct
*
data
)
{
double
zoom_factor
;
...
...
@@ -2628,6 +2651,7 @@ void wtt_create_menubutton( Widget w, Wtt *wtt)
case
15
:
wtt
->
menu_edit_w
=
w
;
break
;
case
16
:
wtt
->
menu_classeditor_w
=
w
;
break
;
case
17
:
wtt
->
menu_copykeep_w
=
w
;
break
;
case
18
:
wtt
->
menu_updateclasses_w
=
w
;
break
;
default:
;
}
...
...
@@ -3537,6 +3561,7 @@ Wtt::Wtt(
{
"wtt_activate_buildvolume"
,(
caddr_t
)
wtt_activate_buildvolume
},
{
"wtt_activate_buildnode"
,(
caddr_t
)
wtt_activate_buildnode
},
{
"wtt_activate_distribute"
,(
caddr_t
)
wtt_activate_distribute
},
{
"wtt_activate_updateclasses"
,(
caddr_t
)
wtt_activate_updateclasses
},
{
"wtt_activate_showcrossref"
,(
caddr_t
)
wtt_activate_showcrossref
},
{
"wtt_activate_change_value"
,(
caddr_t
)
wtt_activate_change_value
},
{
"wtt_activate_command"
,(
caddr_t
)
wtt_activate_command
},
...
...
wb/lib/wb/src/wb_wtt.h
View file @
3fa82e1e
/*
* Proview $Id: wb_wtt.h,v 1.1
5 2006-03-31 14:29:39
claes Exp $
* Proview $Id: wb_wtt.h,v 1.1
6 2006-05-22 08:20:36
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -228,6 +228,7 @@ class Wtt {
Widget
menu_change_value_w
;
Widget
menu_edit_w
;
Widget
menu_classeditor_w
;
Widget
menu_updateclasses_w
;
uted_ctx
utedctx
;
WPkg
*
wpkg
;
WNav
*
input_wnav
;
...
...
wb/mmi/wb/src/wb_wtt.uil
View file @
3fa82e1e
!
! Proview $Id: wb_wtt.uil,v 1.
9 2006-05-11 10:46:05
claes Exp $
! Proview $Id: wb_wtt.uil,v 1.
10 2006-05-22 08:20:36
claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! This program is free software; you can redistribute it and/or
...
...
@@ -65,6 +65,7 @@ procedure
wtt_activate_messages(integer);
wtt_activate_openplc(integer);
wtt_activate_showcrossref(integer);
wtt_activate_updateclasses(integer);
wtt_activate_change_value(integer);
wtt_activate_command(integer);
wtt_activate_zoom_in(integer);
...
...
@@ -854,6 +855,21 @@ object functions_entry : XmCascadeButton
};
};
XmPushButton
{
arguments
{
XmNlabelString = compound_string("Update Classes");
XmNmnemonic = keysym('p');
XmNfontList = menu_font;
XmNuserData = 18;
};
callbacks
{
XmNactivateCallback = procedure wtt_activate_updateclasses(wtt_ctx);
MrmNcreateCallback = procedure wtt_create_menubutton(wtt_ctx);
};
};
XmPushButton
{
arguments
{
...
...
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