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
0cf9d9ce
Commit
0cf9d9ce
authored
Oct 20, 2009
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Variable textsize in Wow::CreateList
parent
3e7f9be0
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
44 additions
and
35 deletions
+44
-35
src/changelog.txt
src/changelog.txt
+1
-0
src/lib/co/gtk/co_wow_gtk.cpp
src/lib/co/gtk/co_wow_gtk.cpp
+7
-4
src/lib/co/gtk/co_wow_gtk.h
src/lib/co/gtk/co_wow_gtk.h
+1
-1
src/lib/co/motif/co_wow_motif.cpp
src/lib/co/motif/co_wow_motif.cpp
+8
-7
src/lib/co/motif/co_wow_motif.h
src/lib/co/motif/co_wow_motif.h
+1
-0
src/lib/co/src/co_wow.h
src/lib/co/src/co_wow.h
+1
-1
wb/lib/wb/src/wb_wcast.cpp
wb/lib/wb/src/wb_wcast.cpp
+1
-1
wb/lib/wb/src/wb_wda.cpp
wb/lib/wb/src/wb_wda.cpp
+1
-1
xtt/changelog.txt
xtt/changelog.txt
+2
-1
xtt/exe/rt_xtt/src/xtt_main.cpp
xtt/exe/rt_xtt/src/xtt_main.cpp
+1
-1
xtt/lib/ge/gtk/ge_gtk.cpp
xtt/lib/ge/gtk/ge_gtk.cpp
+1
-1
xtt/lib/ge/motif/ge_motif.cpp
xtt/lib/ge/motif/ge_motif.cpp
+1
-1
xtt/lib/xtt/gtk/xtt_clog_gtk.cpp
xtt/lib/xtt/gtk/xtt_clog_gtk.cpp
+1
-1
xtt/lib/xtt/src/xtt_clognav.cpp
xtt/lib/xtt/src/xtt_clognav.cpp
+11
-10
xtt/lib/xtt/src/xtt_xnav_command.cpp
xtt/lib/xtt/src/xtt_xnav_command.cpp
+6
-5
No files found.
src/changelog.txt
View file @
0cf9d9ce
...
...
@@ -123,3 +123,4 @@
091005 cs gdh Bugfix in DetachedVolume. Attaching objects on a remote node didn't work.
091005 cs statusmon Change node dialog and language support added. Some documentation.
091014 cs doc Links in Designer's Guide updated and code format added in html version.
091020 cs co wow_CreateList now with variable text size.
\ No newline at end of file
src/lib/co/gtk/co_wow_gtk.cpp
View file @
0cf9d9ce
...
...
@@ -220,6 +220,7 @@ class WowListCtx {
GtkWidget
*
toplevel
;
GtkWidget
*
list
;
char
*
texts
;
int
textsize
;
void
(
*
action_cb
)
(
void
*
,
char
*
);
void
(
*
cancel_cb
)
(
void
*
);
void
*
parent_ctx
;
...
...
@@ -240,7 +241,7 @@ void CoWowGtk::list_apply_cb (
{
WowListCtx
*
ctx
=
(
WowListCtx
*
)
data
;
char
*
text
;
static
char
selected_text
[
80
];
static
char
selected_text
[
512
];
GtkTreeIter
iter
;
GtkTreeModel
*
store
;
...
...
@@ -307,6 +308,7 @@ static gboolean list_delete_event( GtkWidget *w, GdkEvent *event, gpointer data)
void
*
CoWowGtk
::
CreateList
(
const
char
*
title
,
const
char
*
texts
,
int
textsize
,
void
(
action_cb
)(
void
*
,
char
*
),
void
(
cancel_cb
)(
void
*
),
void
*
parent_ctx
,
...
...
@@ -345,7 +347,7 @@ void *CoWowGtk::CreateList (
gtk_list_store_append
(
store
,
&
iter
);
gtk_list_store_set
(
store
,
&
iter
,
0
,
nameutf8
,
-
1
);
name_p
+=
80
;
name_p
+=
textsize
;
i
++
;
g_free
(
nameutf8
);
}
...
...
@@ -409,8 +411,9 @@ void *CoWowGtk::CreateList (
// GtkTreeSelection *selection = gtk_tree_view_get_selection( GTK_TREE_VIEW(ctx->list));
// gtk_tree_selection_set_mode( selection, GTK_SELECTION_SINGLE);
ctx
->
texts
=
(
char
*
)
calloc
(
i
+
1
,
80
);
memcpy
(
ctx
->
texts
,
texts
,
(
i
+
1
)
*
80
);
ctx
->
texts
=
(
char
*
)
calloc
(
i
+
1
,
textsize
);
memcpy
(
ctx
->
texts
,
texts
,
(
i
+
1
)
*
textsize
);
ctx
->
textsize
=
textsize
;
// Set input focus to the scrolled list widget
gtk_widget_grab_focus
(
ctx
->
list
);
...
...
src/lib/co/gtk/co_wow_gtk.h
View file @
0cf9d9ce
...
...
@@ -96,7 +96,7 @@ class CoWowGtk : public CoWow {
void
*
data
);
void
DisplayError
(
const
char
*
title
,
const
char
*
text
);
void
DisplayText
(
const
char
*
title
,
const
char
*
text
);
void
*
CreateList
(
const
char
*
title
,
const
char
*
texts
,
void
*
CreateList
(
const
char
*
title
,
const
char
*
texts
,
int
textsize
,
void
(
action_cb
)(
void
*
,
char
*
),
void
(
cancel_cb
)(
void
*
),
void
*
ctx
,
...
...
src/lib/co/motif/co_wow_motif.cpp
View file @
0cf9d9ce
...
...
@@ -242,11 +242,11 @@ void CoWowMotif::list_ok_cb( Widget w, XtPointer data,
{
wow_tListCtx
ctx
=
(
wow_tListCtx
)
data
;
int
*
pos_list
,
pos_cnt
;
static
char
selected_text
[
80
];
static
char
selected_text
[
512
];
if
(
ctx
->
action_cb
)
{
if
(
XmListGetSelectedPos
(
ctx
->
list
,
&
pos_list
,
&
pos_cnt
))
{
strcpy
(
selected_text
,
ctx
->
texts
+
(
pos_list
[
0
]
-
1
)
*
80
);
strcpy
(
selected_text
,
ctx
->
texts
+
(
pos_list
[
0
]
-
1
)
*
ctx
->
textsize
);
(
ctx
->
action_cb
)(
ctx
->
parent_ctx
,
selected_text
);
XtFree
(
(
char
*
)
pos_list
);
...
...
@@ -276,7 +276,7 @@ void CoWowMotif::list_action_cb( Widget w, XtPointer data,
{
wow_tListCtx
ctx
=
(
wow_tListCtx
)
data
;
char
*
item_str
;
static
char
action_text
[
80
];
static
char
action_text
[
512
];
if
(
cbs
->
event
->
type
==
KeyPress
)
// The ok callback will be called later
...
...
@@ -295,7 +295,7 @@ void CoWowMotif::list_action_cb( Widget w, XtPointer data,
free
(
ctx
);
}
void
*
CoWowMotif
::
CreateList
(
const
char
*
title
,
const
char
*
texts
,
void
*
CoWowMotif
::
CreateList
(
const
char
*
title
,
const
char
*
texts
,
int
textsize
,
void
(
action_cb
)(
void
*
,
char
*
),
void
(
cancel_cb
)(
void
*
),
void
*
parent_ctx
,
...
...
@@ -412,12 +412,13 @@ void *CoWowMotif::CreateList( const char *title, const char *texts,
cstr
=
XmStringCreateSimple
(
name_p
);
XmListAddItemUnselected
(
ctx
->
list
,
cstr
,
0
);
XmStringFree
(
cstr
);
name_p
+=
80
;
name_p
+=
textsize
;
i
++
;
}
ctx
->
texts
=
(
char
*
)
calloc
(
i
+
1
,
80
);
memcpy
(
ctx
->
texts
,
texts
,
(
i
+
1
)
*
80
);
ctx
->
texts
=
(
char
*
)
calloc
(
i
+
1
,
textsize
);
ctx
->
textsize
=
textsize
;
memcpy
(
ctx
->
texts
,
texts
,
(
i
+
1
)
*
textsize
);
XtPopup
(
ctx
->
toplevel
,
XtGrabNone
);
// Set input focus to the scrolled list widget
...
...
src/lib/co/motif/co_wow_motif.h
View file @
0cf9d9ce
...
...
@@ -32,6 +32,7 @@ typedef struct {
Widget
toplevel
;
Widget
list
;
char
*
texts
;
int
textsize
;
void
(
*
action_cb
)
(
void
*
,
char
*
);
void
(
*
cancel_cb
)
(
void
*
);
void
*
parent_ctx
;
...
...
src/lib/co/src/co_wow.h
View file @
0cf9d9ce
...
...
@@ -91,7 +91,7 @@ class CoWow {
void
*
data
)
{}
virtual
void
DisplayError
(
const
char
*
title
,
const
char
*
text
)
{}
virtual
void
DisplayText
(
const
char
*
title
,
const
char
*
text
)
{}
virtual
void
*
CreateList
(
const
char
*
title
,
const
char
*
texts
,
virtual
void
*
CreateList
(
const
char
*
title
,
const
char
*
texts
,
int
textsize
,
void
(
action_cb
)(
void
*
,
char
*
),
void
(
cancel_cb
)(
void
*
),
void
*
ctx
,
...
...
wb/lib/wb/src/wb_wcast.cpp
View file @
0cf9d9ce
...
...
@@ -91,7 +91,7 @@ pwr_tStatus WCast::open_castlist()
}
strcpy
(
class_vect
[
class_cnt
],
""
);
wow
->
CreateList
(
name
,
(
char
*
)
class_vect
,
selected_cb
,
0
,
(
void
*
)
this
);
wow
->
CreateList
(
name
,
(
char
*
)
class_vect
,
80
,
selected_cb
,
0
,
(
void
*
)
this
);
return
1
;
}
...
...
wb/lib/wb/src/wb_wda.cpp
View file @
0cf9d9ce
...
...
@@ -175,7 +175,7 @@ void Wda::open_attr_dialog()
strcpy
(
attr_vect
[
attr_cnt
],
""
);
wow
->
CreateList
(
"Attributes"
,
(
char
*
)
attr_vect
,
wow
->
CreateList
(
"Attributes"
,
(
char
*
)
attr_vect
,
80
,
set_attr_cb
,
0
,
(
void
*
)
this
);
}
...
...
xtt/changelog.txt
View file @
0cf9d9ce
...
...
@@ -145,4 +145,5 @@
090916 cs xtt Alarm time viewed in operator window.
090916 cs xtt New xtt command 'show objectlist /class='.
090916 cs xtt New xtt commands 'create opmenuitem' and 'delete opmenuitem' to modify operator window menu..
090930 cs ge Java compile problems for subgraphs with multiple annotations fixed.
\ No newline at end of file
090930 cs ge Java compile problems for subgraphs with multiple annotations fixed.
091020 cs xtt Buggfix in System Messages, zip-files >= version 10 was not opened in the correct order in next/prev file.
\ No newline at end of file
xtt/exe/rt_xtt/src/xtt_main.cpp
View file @
0cf9d9ce
...
...
@@ -714,7 +714,7 @@ void Xtt::list_opplace()
}
else
// Select oplace from list
wow
->
CreateList
(
"Select Operator Place"
,
(
char
*
)
texts
,
opplace_selected_cb
,
0
,
this
);
wow
->
CreateList
(
"Select Operator Place"
,
(
char
*
)
texts
,
80
,
opplace_selected_cb
,
0
,
this
);
}
...
...
xtt/lib/ge/gtk/ge_gtk.cpp
View file @
0cf9d9ce
...
...
@@ -109,7 +109,7 @@ void GeGtk::create_list( const char *title, const char *texts,
void
(
action_cb
)(
void
*
,
char
*
),
void
*
ctx
)
{
CoWowGtk
wow
(
toplevel
);
wow
.
CreateList
(
title
,
texts
,
action_cb
,
0
,
ctx
,
1
);
wow
.
CreateList
(
title
,
texts
,
80
,
action_cb
,
0
,
ctx
,
1
);
}
void
GeGtk
::
subgraphs_new
()
...
...
xtt/lib/ge/motif/ge_motif.cpp
View file @
0cf9d9ce
...
...
@@ -78,7 +78,7 @@ void GeMotif::create_list( const char *title, const char *texts,
void
(
action_cb
)(
void
*
,
char
*
),
void
*
ctx
)
{
CoWowMotif
wow
(
toplevel
);
wow
.
CreateList
(
title
,
texts
,
action_cb
,
0
,
ctx
);
wow
.
CreateList
(
title
,
texts
,
80
,
action_cb
,
0
,
ctx
);
}
void
GeMotif
::
subgraphs_new
()
...
...
xtt/lib/xtt/gtk/xtt_clog_gtk.cpp
View file @
0cf9d9ce
...
...
@@ -310,7 +310,7 @@ void CLogGtk::activate_select_file( GtkWidget *w, gpointer data)
strcat
(
str
[
i
],
clog
->
clognav
->
file_list
[
i
].
name
);
}
clog
->
wow
->
CreateList
(
"Select File"
,
(
char
*
)
str
,
file_selected_cb
,
0
,
clog
);
clog
->
wow
->
CreateList
(
"Select File"
,
(
char
*
)
str
,
80
,
file_selected_cb
,
0
,
clog
);
free
(
str
);
}
...
...
xtt/lib/xtt/src/xtt_clognav.cpp
View file @
0cf9d9ce
...
...
@@ -373,20 +373,21 @@ void CLogNav::get_files()
}
dcli_search_file
(
file_spec
,
found_file
,
DCLI_DIR_SEARCH_END
);
sprintf
(
file_spec
,
"$pwrp_log/pwr_%s.log.*.gz"
,
nodename
);
sts
=
dcli_search_file
(
file_spec
,
found_file
,
DCLI_DIR_SEARCH_INIT
);
while
(
ODD
(
sts
))
{
for
(
int
i
=
1
;
i
<
21
;
i
++
)
{
sprintf
(
file_spec
,
"$pwrp_log/pwr_%s.log.%d.gz"
,
nodename
,
i
);
sts
=
dcli_search_file
(
file_spec
,
found_file
,
DCLI_DIR_SEARCH_INIT
);
if
(
ODD
(
sts
))
{
stat
(
found_file
,
&
info
);
time
.
tv_sec
=
info
.
st_ctime
;
stat
(
found_file
,
&
info
);
time
.
tv_sec
=
info
.
st_ctime
;
CLogFile
*
cf
=
new
CLogFile
(
found_file
,
time
);
file_list
.
push_back
(
*
cf
);
delete
cf
;
CLogFile
*
cf
=
new
CLogFile
(
found_file
,
time
);
file_list
.
push_back
(
*
cf
);
delete
cf
;
sts
=
dcli_search_file
(
file_spec
,
found_file
,
DCLI_DIR_SEARCH_NEXT
);
}
dcli_search_file
(
file_spec
,
found_file
,
DCLI_DIR_SEARCH_END
);
}
dcli_search_file
(
file_spec
,
found_file
,
DCLI_DIR_SEARCH_END
);
}
...
...
xtt/lib/xtt/src/xtt_xnav_command.cpp
View file @
0cf9d9ce
...
...
@@ -1948,7 +1948,7 @@ static int xnav_show_func( void *client_data,
int
cnt
=
0
;
pwr_tObjName
class_str
;
char
title_str
[
80
];
pwr_t
String80
*
names
;
pwr_t
OName
*
names
;
xnav_sObjectList
*
ctx
;
pwr_tCid
cid
;
...
...
@@ -1968,14 +1968,14 @@ static int xnav_show_func( void *client_data,
sts
=
gdh_GetNextAttrRef
(
cid
,
&
aref
,
&
aref
))
{
cnt
++
;
}
names
=
(
pwr_t
String80
*
)
calloc
(
cnt
,
sizeof
(
pwr_tString80
));
names
=
(
pwr_t
OName
*
)
calloc
(
cnt
,
sizeof
(
pwr_tOName
));
int
idx
=
0
;
for
(
sts
=
gdh_GetClassListAttrRef
(
cid
,
&
aref
);
ODD
(
sts
);
sts
=
gdh_GetNextAttrRef
(
cid
,
&
aref
,
&
aref
))
{
sts
=
gdh_AttrrefToName
(
&
aref
,
names
[
idx
],
sizeof
(
names
[
0
]),
cdh_mName_volumeStrict
);
cdh_mNName
/* cdh_mName_volumeStrict */
);
if
(
EVEN
(
sts
))
continue
;
idx
++
;
...
...
@@ -1995,7 +1995,7 @@ static int xnav_show_func( void *client_data,
ctx
->
cid
=
cid
;
ctx
->
xnav
=
xnav
;
xnav
->
wow
->
CreateList
(
title_str
,
(
char
*
)
names
,
xnav_show_objectlist_cb
,
xnav
->
wow
->
CreateList
(
title_str
,
(
char
*
)
names
,
sizeof
(
names
[
0
]),
xnav_show_objectlist_cb
,
xnav_show_objectlist_cancel_cb
,
ctx
);
free
(
names
);
}
...
...
@@ -3089,7 +3089,8 @@ static int xnav_open_func( void *client_data,
ctx
=
(
xnav_sHistList
*
)
calloc
(
1
,
sizeof
(
xnav_sHistList
));
ctx
->
oid
=
oid
;
ctx
->
xnav
=
xnav
;
xnav
->
wow
->
CreateList
(
"History List"
,
(
char
*
)
cname
,
xnav_open_shist_cb
,
xnav_open_shist_cancel_cb
,
ctx
);
xnav
->
wow
->
CreateList
(
"History List"
,
(
char
*
)
cname
,
sizeof
(
cname
[
0
]),
xnav_open_shist_cb
,
xnav_open_shist_cancel_cb
,
ctx
);
}
else
if
(
strncmp
(
arg1_str
,
"HISTORY"
,
strlen
(
arg1_str
))
==
0
)
{
...
...
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