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
cd44f1f8
Commit
cd44f1f8
authored
Sep 03, 2015
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wb edit mode mark in title added
parent
cbf64c7b
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
66 additions
and
195 deletions
+66
-195
wb/lib/wb/gtk/wb_uted_gtk.cpp
wb/lib/wb/gtk/wb_uted_gtk.cpp
+11
-195
wb/lib/wb/gtk/wb_uted_gtk.h
wb/lib/wb/gtk/wb_uted_gtk.h
+1
-0
wb/lib/wb/gtk/wb_watt_gtk.cpp
wb/lib/wb/gtk/wb_watt_gtk.cpp
+7
-0
wb/lib/wb/gtk/wb_watt_gtk.h
wb/lib/wb/gtk/wb_watt_gtk.h
+1
-0
wb/lib/wb/gtk/wb_wda_gtk.cpp
wb/lib/wb/gtk/wb_wda_gtk.cpp
+7
-0
wb/lib/wb/gtk/wb_wda_gtk.h
wb/lib/wb/gtk/wb_wda_gtk.h
+1
-0
wb/lib/wb/gtk/wb_wtt_gtk.cpp
wb/lib/wb/gtk/wb_wtt_gtk.cpp
+8
-0
wb/lib/wb/gtk/wb_wtt_gtk.h
wb/lib/wb/gtk/wb_wtt_gtk.h
+1
-0
wb/lib/wb/src/wb_uted.cpp
wb/lib/wb/src/wb_uted.cpp
+1
-0
wb/lib/wb/src/wb_uted.h
wb/lib/wb/src/wb_uted.h
+1
-0
wb/lib/wb/src/wb_watt.h
wb/lib/wb/src/wb_watt.h
+1
-0
wb/lib/wb/src/wb_wda.cpp
wb/lib/wb/src/wb_wda.cpp
+1
-0
wb/lib/wb/src/wb_wda.h
wb/lib/wb/src/wb_wda.h
+1
-0
wb/lib/wb/src/wb_wtt.cpp
wb/lib/wb/src/wb_wtt.cpp
+2
-0
wb/lib/wb/src/wb_wtt.h
wb/lib/wb/src/wb_wtt.h
+1
-0
xtt/lib/cow/gtk/cow_wow_gtk.cpp
xtt/lib/cow/gtk/cow_wow_gtk.cpp
+20
-0
xtt/lib/cow/gtk/cow_wow_gtk.h
xtt/lib/cow/gtk/cow_wow_gtk.h
+1
-0
No files found.
wb/lib/wb/gtk/wb_uted_gtk.cpp
View file @
cd44f1f8
...
...
@@ -270,6 +270,11 @@ void WUtedGtk::qbox_cancel_cb( GtkWidget *w, gpointer data)
g_object_set
(
((
WUtedGtk
*
)
uted
)
->
widgets
.
questionbox
,
"visible"
,
FALSE
,
NULL
);
}
void
WUtedGtk
::
update_title
(
int
editmode
)
{
CoWowGtk
::
update_title
(
toplevel
,
editmode
);
}
static
gint
delete_event
(
GtkWidget
*
w
,
GdkEvent
*
event
,
gpointer
uted
)
{
WUtedGtk
::
activate_quit
(
w
,
uted
);
...
...
@@ -298,13 +303,15 @@ WUtedGtk::WUtedGtk( void *wu_parent_ctx,
{
const
int
window_width
=
800
;
const
int
window_height
=
400
;
char
title
[]
=
"Wb Utilities"
;
memset
(
&
widgets
,
0
,
sizeof
(
widgets
));
toplevel
=
(
GtkWidget
*
)
g_object_new
(
GTK_TYPE_WINDOW
,
"default-height"
,
window_height
,
"default-width"
,
window_width
,
NULL
);
"default-height"
,
window_height
,
"default-width"
,
window_width
,
"title"
,
title
,
NULL
);
g_signal_connect
(
toplevel
,
"delete_event"
,
G_CALLBACK
(
delete_event
),
this
);
g_signal_connect
(
toplevel
,
"destroy"
,
G_CALLBACK
(
destroy_event
),
this
);
...
...
@@ -508,199 +515,8 @@ WUtedGtk::WUtedGtk( void *wu_parent_ctx,
batch_sts
=
UTED_BATCH_CURRSESS
;
reset_qual
();
enable_entries
(
wu_editmode
);
update_title
(
wu_editmode
);
#if 0
Arg args[20];
pwr_tStatus sts;
int i;
MrmHierarchy s_MrmH;
MrmType dclass;
/* DRM database hierarchy related variables */
static Pixmap icon = 0;
Dimension icon_w;
Dimension icon_h;
static Atom MwmDeleteWind = 0;
char uid_filename[200] = {"pwr_exe:wb_uted.uid"};
char *uid_filename_p = uid_filename;
static MrmRegisterArg reglist[] = {
/* First the context variable */
{ "uted_ctx", 0 },
/* Callbacks for the controlled foe widget */
{"uted_create_adb",(caddr_t)create_adb},
{"uted_create_quit",(caddr_t)create_quit},
{"uted_activate_quit",(caddr_t)activate_quit},
{"uted_create_commandlabel",(caddr_t)create_commandlabel},
{"uted_create_batchoptmenu",(caddr_t)create_batchoptmenu},
{"uted_create_batch",(caddr_t)create_batch},
{"uted_create_currsess",(caddr_t)create_currsess},
{"uted_create_file_entry",(caddr_t)create_file_entry},
{"uted_create_label",(caddr_t)create_label},
{"uted_create_adb",(caddr_t)create_adb},
{"uted_activate_command",(caddr_t)activate_command},
{"uted_create_command",(caddr_t)create_command},
{"uted_activate_batch",(caddr_t)activate_batch},
{"uted_activate_currsess",(caddr_t)activate_currsess},
{"uted_activate_ok",(caddr_t)activate_ok},
{"uted_activate_cancel",(caddr_t)activate_cancel},
{"uted_activate_show_cmd",(caddr_t)activate_show_cmd},
{"uted_create_commandwind_button",(caddr_t)create_commandwind_button},
{"uted_activate_cmd_wind",(caddr_t)activate_cmd_wind},
{"uted_create_cmd_wind",(caddr_t)create_cmd_wind},
{"uted_create_timelabel",(caddr_t)create_timelabel},
{"uted_create_timevalue",(caddr_t)create_timevalue},
{"uted_create_qualifier1",(caddr_t)create_qualifier1},
{"uted_create_value1",(caddr_t)create_value1},
{"uted_activate_present1",(caddr_t)activate_present1},
{"uted_create_present1",(caddr_t)create_present1},
{"uted_create_qualifier2",(caddr_t)create_qualifier2},
{"uted_create_value2",(caddr_t)create_value2},
{"uted_activate_present2",(caddr_t)activate_present2},
{"uted_create_present2",(caddr_t)create_present2},
{"uted_create_qualifier3",(caddr_t)create_qualifier3},
{"uted_create_value3",(caddr_t)create_value3},
{"uted_activate_present3",(caddr_t)activate_present3},
{"uted_create_present3",(caddr_t)create_present3},
{"uted_create_qualifier4",(caddr_t)create_qualifier4},
{"uted_create_value4",(caddr_t)create_value4},
{"uted_activate_present4",(caddr_t)activate_present4},
{"uted_create_present4",(caddr_t)create_present4},
{"uted_create_qualifier5",(caddr_t)create_qualifier5},
{"uted_create_value5",(caddr_t)create_value5},
{"uted_activate_present5",(caddr_t)activate_present5},
{"uted_create_present5",(caddr_t)create_present5},
{"uted_create_qualifier6",(caddr_t)create_qualifier6},
{"uted_create_value6",(caddr_t)create_value6},
{"uted_activate_present6",(caddr_t)activate_present6},
{"uted_create_present6",(caddr_t)create_present6},
{"uted_create_qualifier7",(caddr_t)create_qualifier7},
{"uted_create_value7",(caddr_t)create_value7},
{"uted_activate_present7",(caddr_t)activate_present7},
{"uted_create_present7",(caddr_t)create_present7},
{"uted_create_qualifier8",(caddr_t)create_qualifier8},
{"uted_create_value8",(caddr_t)create_value8},
{"uted_activate_present8",(caddr_t)activate_present8},
{"uted_create_present8",(caddr_t)create_present8},
{"uted_create_qualifier9",(caddr_t)create_qualifier9},
{"uted_create_value9",(caddr_t)create_value9},
{"uted_activate_present9",(caddr_t)activate_present9},
{"uted_create_present9",(caddr_t)create_present9},
{"uted_create_qualifier10",(caddr_t)create_qualifier10},
{"uted_create_value10",(caddr_t)create_value10},
{"uted_activate_present10",(caddr_t)activate_present10},
{"uted_create_present10",(caddr_t)create_present10},
{"uted_activate_helputils",(caddr_t)activate_helputils},
{"uted_activate_helppwr_plc",(caddr_t)activate_helppwr_plc},
{"uted_commandchanged",(caddr_t)commandchanged},
{"uted_qbox_cr",(caddr_t)qbox_cr},
{"uted_qbox_yes_cb",(caddr_t)qbox_yes_cb},
{"uted_qbox_no_cb",(caddr_t)qbox_no_cb},
{"uted_qbox_cancel_cb",(caddr_t)qbox_cancel_cb}
};
static int reglist_num = (sizeof reglist / sizeof reglist[0]);
/*
* Now start the module creation
*/
sts = dcli_translate_filename( uid_filename, uid_filename);
if ( EVEN(sts)) {
printf( "** pwr_exe is not defined\n");
exit(0);
}
/* set initialization values in context */
/* Save the context structure in the widget */
XtSetArg (args[0], XmNuserData, (unsigned int) this);
/*
* Create a new widget
* Open the UID files (the output of the UIL compiler) in the hierarchy
* Register the items DRM needs to bind for us.
* Create a new widget
* Close the hierarchy
* Compile the additional button translations and augment and add actions
*/
sts = MrmOpenHierarchy( 1, &uid_filename_p, NULL, &s_MrmH);
if (sts != MrmSUCCESS) printf("can't open hierarchy\n");
reglist[0].value = (caddr_t) this;
MrmRegisterNames(reglist, reglist_num);
if (icon == 0)
sts = MrmFetchBitmapLiteral(s_MrmH,"icon",
XtScreen(parent_wid), XtDisplay(parent_wid),
&icon, &icon_w, &icon_h);
i=0;
XtSetArg(args[i],XmNiconName, wu_iconname); i++;
XtSetArg(args[i],XmNiconPixmap, icon); i++;
XtSetArg(args[i],XmNtitle, name); i++;
/* SG 11.02.91 Save the id of the top in the context */
parent_wid = XtCreatePopupShell("utilities",
topLevelShellGtkWidgetClass, parent_wid, args, i);
/* the positioning of a top level can only be define after the creation
of the widget . So i do it know:
SG 24.02.91 use the parameters received x and y
*/
i=0;
XtSetArg(args[i],XmNx,100);i++;
XtSetArg(args[i],XmNy,100);i++;
XtSetArg(args[i],XtNallowShellResize,TRUE), i++;
XtSetValues( parent_wid, args, i);
/* now that we have a top level we can get the main window */
sts = MrmFetchGtkWidgetOverride(s_MrmH, "uted_window", parent_wid ,
name, args, 1,
&widgets.uted_window, &dclass);
if (sts != MrmSUCCESS) printf("can't fetch utedit widget\n");
XtManageChild( widgets.uted_window);
/* SG 09.02.91 a top level should always be realized ! */
XtPopup( parent_wid, XtGrabNone );
/* Ask MRM to fetch the question box */
i=0;
if (MrmFetchGtkWidgetOverride(s_MrmH,
"uted_qbox",
widgets.uted_window,
0,
args , i,
&widgets.questionbox, &dclass) != MrmSUCCESS) {
printf("can't fetch uted_qbox widget\n");
}
MrmCloseHierarchy(s_MrmH);
reset_qual();
batch_sts = UTED_BATCH_CURRSESS;
XtSetArg(args[0],XmNsensitive, 0);
XtSetValues( widgets.timelabel,args,1);
XtUnmanageChild( widgets.timevalue);
XtUnmanageChild( widgets.command_window);
enable_entries( wu_editmode);
if (MwmDeleteWind == 0)
MwmDeleteWind = XInternAtom(XtDisplay(parent_wid), "WM_DELETE_WINDOW", FALSE);
if (MwmDeleteWind != 0)
{
XtVaSetValues( parent_wid, XmNdeleteResponse, XmDO_NOTHING, NULL);
XmAddWMProtocolCallback( parent_wid, MwmDeleteWind,
(XtCallbackProc) activate_quit, this);
}
#endif
*
status
=
FOE__SUCCESS
;
}
...
...
wb/lib/wb/gtk/wb_uted_gtk.h
View file @
cd44f1f8
...
...
@@ -98,6 +98,7 @@ class WUtedGtk : public WUted {
void
(
*
no_procedure
)
(
WUted
*
),
void
(
*
cancel_procedure
)
(
WUted
*
),
pwr_tBoolean
cancel
);
void
update_title
(
int
editmode
);
static
void
activate_command
(
GtkWidget
*
w
,
gpointer
data
);
static
void
create_command
(
GtkWidget
*
w
,
gpointer
data
);
...
...
wb/lib/wb/gtk/wb_watt_gtk.cpp
View file @
cd44f1f8
...
...
@@ -490,6 +490,11 @@ void WAttGtk::pop()
gtk_window_present
(
GTK_WINDOW
(
toplevel
));
}
void
WAttGtk
::
update_title
()
{
CoWowGtk
::
update_title
(
toplevel
,
editmode
);
}
WAttGtk
::~
WAttGtk
()
{
delete
(
WAttNav
*
)
wattnav
;
...
...
@@ -681,6 +686,8 @@ WAttGtk::WAttGtk(
((
Wtt
*
)
parent_ctx
)
->
register_utility
(
(
void
*
)
this
,
wb_eUtility_AttributeEditor
);
}
update_title
();
}
...
...
wb/lib/wb/gtk/wb_watt_gtk.h
View file @
cd44f1f8
...
...
@@ -84,6 +84,7 @@ class WAttGtk : public WAtt {
void
change_value_close
();
void
pop
();
void
print
(
const
char
*
title
);
void
update_title
();
static
void
activate_change_value
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_close_changeval
(
GtkWidget
*
w
,
gpointer
data
);
...
...
wb/lib/wb/gtk/wb_wda_gtk.cpp
View file @
cd44f1f8
...
...
@@ -538,6 +538,11 @@ void WdaGtk::open_class_dialog( char *hierstr, char *classstr)
g_object_set
(
wdaclass_dia
,
"visible"
,
TRUE
,
NULL
);
}
void
WdaGtk
::
update_title
()
{
CoWowGtk
::
update_title
(
toplevel
,
editmode
);
}
WdaGtk
::~
WdaGtk
()
{
if
(
wow
)
...
...
@@ -758,6 +763,8 @@ WdaGtk::WdaGtk(
create_class_dialog
();
wow
=
new
CoWowGtk
(
toplevel
);
update_title
();
if
(
utility
==
wb_eUtility_Wtt
)
{
((
Wtt
*
)
parent_ctx
)
->
register_utility
(
(
void
*
)
this
,
wb_eUtility_SpreadsheetEditor
);
...
...
wb/lib/wb/gtk/wb_wda_gtk.h
View file @
cd44f1f8
...
...
@@ -90,6 +90,7 @@ class WdaGtk : public Wda {
void
open_class_dialog
(
char
*
hierstr
,
char
*
classstr
);
void
create_class_dialog
();
void
print
(
const
char
*
title
);
void
update_title
();
static
void
activate_change_value
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_close_changeval
(
GtkWidget
*
w
,
gpointer
data
);
...
...
wb/lib/wb/gtk/wb_wtt_gtk.cpp
View file @
cd44f1f8
...
...
@@ -1996,6 +1996,7 @@ void WttGtk::set_options()
build_crossref
,
build_manual
,
build_nocopy
);
}
// Callbacks from the options form
void
WttGtk
::
activate_options_ok
(
GtkWidget
*
w
,
gpointer
data
)
...
...
@@ -3068,6 +3069,8 @@ WttGtk::WttGtk(
g_object_set
(
tools_set_advuser
,
"visible"
,
FALSE
,
NULL
);
menu_setup
();
update_title
();
*
status
=
1
;
}
...
...
@@ -3462,3 +3465,8 @@ void WttGtk::disable_focus()
focustimer
.
disable
(
400
);
focustimer
.
disabled
();
}
void
WttGtk
::
update_title
()
{
CoWowGtk
::
update_title
(
toplevel
,
editmode
);
}
wb/lib/wb/gtk/wb_wtt_gtk.h
View file @
cd44f1f8
...
...
@@ -189,6 +189,7 @@ class WttGtk : public Wtt {
virtual
void
set_options
();
virtual
void
pop
();
virtual
void
disable_focus
();
virtual
void
update_title
();
void
create_options_dialog
();
void
create_confirm_dialog
();
...
...
wb/lib/wb/src/wb_uted.cpp
View file @
cd44f1f8
...
...
@@ -268,6 +268,7 @@ void WUted::set_editmode( int edit, ldh_tSesContext ldhses)
{
ldhses
=
ldhses
;
enable_entries
(
edit
);
update_title
(
edit
);
}
//
...
...
wb/lib/wb/src/wb_uted.h
View file @
cd44f1f8
...
...
@@ -127,6 +127,7 @@ class WUted {
void
(
*
no_procedure
)
(
WUted
*
),
void
(
*
cancel_procedure
)
(
WUted
*
),
pwr_tBoolean
cancel
)
{}
virtual
void
update_title
(
int
editmode
)
{}
static
void
get_message_error
(
pwr_tStatus
sts
,
char
*
str
);
static
pwr_tStatus
get_command_index
(
char
*
label
,
int
*
index
);
...
...
wb/lib/wb/src/wb_watt.h
View file @
cd44f1f8
...
...
@@ -91,6 +91,7 @@ class WAtt {
virtual
void
change_value_close
()
{}
virtual
void
pop
()
{}
virtual
void
print
(
const
char
*
title
)
{}
virtual
void
update_title
()
{}
void
activate_print
();
void
set_editmode
(
int
editmode
,
ldh_tSesContext
ldhses
);
...
...
wb/lib/wb/src/wb_wda.cpp
View file @
cd44f1f8
...
...
@@ -152,6 +152,7 @@ void Wda::set_editmode( int editmode, ldh_tSesContext ldhses)
this
->
ldhses
=
ldhses
;
this
->
editmode
=
editmode
;
((
WdaNav
*
)
wdanav
)
->
set_editmode
(
editmode
,
ldhses
);
update_title
();
}
int
Wda
::
open_changevalue
(
char
*
name
)
...
...
wb/lib/wb/src/wb_wda.h
View file @
cd44f1f8
...
...
@@ -99,6 +99,7 @@ class Wda {
virtual
void
change_value_close
()
{}
virtual
void
pop
()
{}
virtual
void
print
(
const
char
*
title
)
{}
virtual
void
update_title
()
{}
int
open_changevalue
(
char
*
name
);
void
set_editmode
(
int
editmode
,
ldh_tSesContext
ldhses
);
...
...
wb/lib/wb/src/wb_wtt.cpp
View file @
cd44f1f8
...
...
@@ -768,6 +768,7 @@ int Wtt::set_noedit( wtt_eNoEditMode save, wtt_eNoEditVolMode detach)
if
(
utedctx
)
utedctx
->
set_editmode
(
editmode
,
ldhses
);
}
update_title
();
return
1
;
}
...
...
@@ -883,6 +884,7 @@ int Wtt::set_edit()
free
(
(
char
*
)
config_status
);
}
}
update_title
();
return
1
;
}
...
...
wb/lib/wb/src/wb_wtt.h
View file @
cd44f1f8
...
...
@@ -307,6 +307,7 @@ class Wtt : public WUtility {
virtual
void
set_options
()
{}
virtual
void
pop
()
{}
virtual
void
disable_focus
()
{}
virtual
void
update_title
()
{}
static
int
format_selection
(
void
*
ctx
,
pwr_sAttrRef
attrref
,
...
...
xtt/lib/cow/gtk/cow_wow_gtk.cpp
View file @
cd44f1f8
...
...
@@ -1814,6 +1814,26 @@ void CoWowGtk::CreateFlowPrintDialogGtk( const char *title, void *flow_ctx, int
*
sts
=
WOW__SUCCESS
;
}
void
CoWowGtk
::
update_title
(
GtkWidget
*
w
,
int
editmode
)
{
char
*
title
;
char
new_title
[
512
];
g_object_get
(
w
,
"title"
,
&
title
,
NULL
);
if
(
editmode
)
{
if
(
strncmp
(
title
,
"*** "
,
4
)
!=
0
)
{
strcpy
(
new_title
,
"*** "
);
strcat
(
new_title
,
title
);
g_object_set
(
w
,
"title"
,
new_title
,
NULL
);
}
}
else
{
if
(
strncmp
(
title
,
"*** "
,
4
)
==
0
)
{
strcpy
(
new_title
,
&
title
[
4
]);
g_object_set
(
w
,
"title"
,
new_title
,
NULL
);
}
}
}
...
...
xtt/lib/cow/gtk/cow_wow_gtk.h
View file @
cd44f1f8
...
...
@@ -193,6 +193,7 @@ class CoWowGtk : public CoWow {
static
void
list_ok_cb
(
GtkWidget
*
w
,
gpointer
data
);
static
void
list_cancel_cb
(
GtkWidget
*
w
,
gpointer
data
);
static
gboolean
wait_cb
(
void
*
data
);
static
void
update_title
(
GtkWidget
*
w
,
int
editmode
);
};
...
...
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