Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
a0a01c0e
Commit
a0a01c0e
authored
12 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
MultipleChoice -> MultipleSelection
parent
f8bfa5d8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Common/GmshMessage.cpp
+4
-4
4 additions, 4 deletions
Common/GmshMessage.cpp
Fltk/onelabGroup.cpp
+7
-7
7 additions, 7 deletions
Fltk/onelabGroup.cpp
with
11 additions
and
11 deletions
Common/GmshMessage.cpp
+
4
−
4
View file @
a0a01c0e
...
@@ -924,7 +924,7 @@ void Msg::ExchangeOnelabParameter(const std::string &key,
...
@@ -924,7 +924,7 @@ void Msg::ExchangeOnelabParameter(const std::string &key,
std
::
vector
<
onelab
::
string
>
ps
;
std
::
vector
<
onelab
::
string
>
ps
;
_onelabClient
->
get
(
ps
,
name
);
_onelabClient
->
get
(
ps
,
name
);
bool
noChoices
=
true
,
noClosed
=
true
,
noMultiple
Choice
=
true
;
bool
noChoices
=
true
,
noClosed
=
true
,
noMultiple
Selection
=
true
;
if
(
ps
.
size
()){
if
(
ps
.
size
()){
if
(
fopt
.
count
(
"ReadOnly"
)
&&
fopt
[
"ReadOnly"
][
0
])
if
(
fopt
.
count
(
"ReadOnly"
)
&&
fopt
[
"ReadOnly"
][
0
])
ps
[
0
].
setValue
(
val
);
// use local value
ps
[
0
].
setValue
(
val
);
// use local value
...
@@ -933,7 +933,7 @@ void Msg::ExchangeOnelabParameter(const std::string &key,
...
@@ -933,7 +933,7 @@ void Msg::ExchangeOnelabParameter(const std::string &key,
// keep track of these attributes, which can be changed server-side
// keep track of these attributes, which can be changed server-side
if
(
ps
[
0
].
getChoices
().
size
())
noChoices
=
false
;
if
(
ps
[
0
].
getChoices
().
size
())
noChoices
=
false
;
if
(
ps
[
0
].
getAttribute
(
"Closed"
).
size
())
noClosed
=
false
;
if
(
ps
[
0
].
getAttribute
(
"Closed"
).
size
())
noClosed
=
false
;
if
(
ps
[
0
].
getAttribute
(
"Multiple
Choice
"
).
size
())
noMultiple
Choice
=
false
;
if
(
ps
[
0
].
getAttribute
(
"Multiple
Selection
"
).
size
())
noMultiple
Selection
=
false
;
}
}
else
{
else
{
ps
.
resize
(
1
);
ps
.
resize
(
1
);
...
@@ -943,8 +943,8 @@ void Msg::ExchangeOnelabParameter(const std::string &key,
...
@@ -943,8 +943,8 @@ void Msg::ExchangeOnelabParameter(const std::string &key,
if
(
copt
.
count
(
"Kind"
))
ps
[
0
].
setKind
(
copt
[
"Kind"
][
0
]);
if
(
copt
.
count
(
"Kind"
))
ps
[
0
].
setKind
(
copt
[
"Kind"
][
0
]);
if
(
noChoices
&&
copt
.
count
(
"Choices"
))
ps
[
0
].
setChoices
(
copt
[
"Choices"
]);
if
(
noChoices
&&
copt
.
count
(
"Choices"
))
ps
[
0
].
setChoices
(
copt
[
"Choices"
]);
if
(
noClosed
&&
copt
.
count
(
"Closed"
))
ps
[
0
].
setAttribute
(
"Closed"
,
copt
[
"Closed"
][
0
]);
if
(
noClosed
&&
copt
.
count
(
"Closed"
))
ps
[
0
].
setAttribute
(
"Closed"
,
copt
[
"Closed"
][
0
]);
if
(
noMultiple
Choice
&&
copt
.
count
(
"Multiple
Choice
"
))
if
(
noMultiple
Selection
&&
copt
.
count
(
"Multiple
Selection
"
))
ps
[
0
].
setAttribute
(
"Multiple
Choice
"
,
copt
[
"Multiple
Choice
"
][
0
]);
ps
[
0
].
setAttribute
(
"Multiple
Selection
"
,
copt
[
"Multiple
Selection
"
][
0
]);
_setStandardOptions
(
&
ps
[
0
],
fopt
,
copt
);
_setStandardOptions
(
&
ps
[
0
],
fopt
,
copt
);
_onelabClient
->
set
(
ps
[
0
]);
_onelabClient
->
set
(
ps
[
0
]);
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
Fltk/onelabGroup.cpp
+
7
−
7
View file @
a0a01c0e
...
@@ -1150,7 +1150,7 @@ static void onelab_string_input_choice_cb(Fl_Widget *w, void *data)
...
@@ -1150,7 +1150,7 @@ static void onelab_string_input_choice_cb(Fl_Widget *w, void *data)
}
}
}
}
if
(
choices
.
size
())
if
(
choices
.
size
())
strings
[
0
].
setAttribute
(
"Multiple
Choice
"
,
choices
);
strings
[
0
].
setAttribute
(
"Multiple
Selection
"
,
choices
);
onelab
::
server
::
instance
()
->
set
(
strings
[
0
]);
onelab
::
server
::
instance
()
->
set
(
strings
[
0
]);
autoCheck
(
old
,
strings
[
0
]);
autoCheck
(
old
,
strings
[
0
]);
}
}
...
@@ -1181,7 +1181,7 @@ static void onelab_input_choice_file_merge_cb(Fl_Widget *w, void *data)
...
@@ -1181,7 +1181,7 @@ static void onelab_input_choice_file_merge_cb(Fl_Widget *w, void *data)
drawContext
::
global
()
->
draw
();
drawContext
::
global
()
->
draw
();
}
}
static
void
multiple_
choice
_menu_cb
(
Fl_Widget
*
w
,
void
*
data
)
static
void
multiple_
selection
_menu_cb
(
Fl_Widget
*
w
,
void
*
data
)
{
{
Fl_Menu_Button
*
menu
=
(
Fl_Menu_Button
*
)
w
;
Fl_Menu_Button
*
menu
=
(
Fl_Menu_Button
*
)
w
;
std
::
string
val
;
std
::
string
val
;
...
@@ -1239,17 +1239,17 @@ Fl_Widget *onelabGroup::_addParameterWidget(onelab::string &p, Fl_Tree_Item *n,
...
@@ -1239,17 +1239,17 @@ Fl_Widget *onelabGroup::_addParameterWidget(onelab::string &p, Fl_Tree_Item *n,
// general string input
// general string input
Fl_Input_Choice
*
but
=
new
Fl_Input_Choice
(
1
,
1
,
ww
,
1
);
Fl_Input_Choice
*
but
=
new
Fl_Input_Choice
(
1
,
1
,
ww
,
1
);
std
::
string
multiple
Choice
=
p
.
getAttribute
(
"Multiple
Choice
"
);
std
::
string
multiple
Selection
=
p
.
getAttribute
(
"Multiple
Selection
"
);
if
(
multiple
Choice
.
size
())
if
(
multiple
Selection
.
size
())
but
->
menubutton
()
->
callback
(
multiple_
choice
_menu_cb
,
but
);
but
->
menubutton
()
->
callback
(
multiple_
selection
_menu_cb
,
but
);
std
::
vector
<
Fl_Menu_Item
>
menu
;
std
::
vector
<
Fl_Menu_Item
>
menu
;
for
(
unsigned
int
j
=
0
;
j
<
p
.
getChoices
().
size
();
j
++
){
for
(
unsigned
int
j
=
0
;
j
<
p
.
getChoices
().
size
();
j
++
){
char
*
str
=
strdup
(
p
.
getChoices
()[
j
].
c_str
());
char
*
str
=
strdup
(
p
.
getChoices
()[
j
].
c_str
());
_treeStrings
.
push_back
(
str
);
_treeStrings
.
push_back
(
str
);
bool
divider
=
(
p
.
getKind
()
==
"file"
&&
bool
divider
=
(
p
.
getKind
()
==
"file"
&&
j
==
p
.
getChoices
().
size
()
-
1
);
j
==
p
.
getChoices
().
size
()
-
1
);
int
choice
=
multiple
Choice
.
size
()
?
FL_MENU_TOGGLE
:
0
;
int
choice
=
multiple
Selection
.
size
()
?
FL_MENU_TOGGLE
:
0
;
if
(
multiple
Choice
.
size
()
>
j
&&
multiple
Choice
[
j
]
==
'1'
)
if
(
multiple
Selection
.
size
()
>
j
&&
multiple
Selection
[
j
]
==
'1'
)
choice
|=
FL_MENU_VALUE
;
choice
|=
FL_MENU_VALUE
;
Fl_Menu_Item
it
=
{
str
,
0
,
0
,
0
,
divider
?
FL_MENU_DIVIDER
:
choice
};
Fl_Menu_Item
it
=
{
str
,
0
,
0
,
0
,
divider
?
FL_MENU_DIVIDER
:
choice
};
menu
.
push_back
(
it
);
menu
.
push_back
(
it
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment