diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp index d8d47d7105390a8622d56a4cb9ae8ddf888c0200..d5b6e208f76bdd32efe640da9e6c4fbc8a30439b 100644 --- a/Common/GmshMessage.cpp +++ b/Common/GmshMessage.cpp @@ -924,7 +924,7 @@ void Msg::ExchangeOnelabParameter(const std::string &key, std::vector<onelab::string> ps; _onelabClient->get(ps, name); - bool noChoices = true, noClosed = true, noMultipleChoice = true; + bool noChoices = true, noClosed = true, noMultipleSelection = true; if(ps.size()){ if(fopt.count("ReadOnly") && fopt["ReadOnly"][0]) ps[0].setValue(val); // use local value @@ -933,7 +933,7 @@ void Msg::ExchangeOnelabParameter(const std::string &key, // keep track of these attributes, which can be changed server-side if(ps[0].getChoices().size()) noChoices = false; if(ps[0].getAttribute("Closed").size()) noClosed = false; - if(ps[0].getAttribute("MultipleChoice").size()) noMultipleChoice = false; + if(ps[0].getAttribute("MultipleSelection").size()) noMultipleSelection = false; } else{ ps.resize(1); @@ -943,8 +943,8 @@ void Msg::ExchangeOnelabParameter(const std::string &key, if(copt.count("Kind")) ps[0].setKind(copt["Kind"][0]); if(noChoices && copt.count("Choices")) ps[0].setChoices(copt["Choices"]); if(noClosed && copt.count("Closed")) ps[0].setAttribute("Closed", copt["Closed"][0]); - if(noMultipleChoice && copt.count("MultipleChoice")) - ps[0].setAttribute("MultipleChoice", copt["MultipleChoice"][0]); + if(noMultipleSelection && copt.count("MultipleSelection")) + ps[0].setAttribute("MultipleSelection", copt["MultipleSelection"][0]); _setStandardOptions(&ps[0], fopt, copt); _onelabClient->set(ps[0]); #endif diff --git a/Fltk/onelabGroup.cpp b/Fltk/onelabGroup.cpp index 55e8ec30ec404871a0dbb53815229c74d9a7ff46..6e683df5677d9b87f35f283ab9d996ece0da612a 100644 --- a/Fltk/onelabGroup.cpp +++ b/Fltk/onelabGroup.cpp @@ -1150,7 +1150,7 @@ static void onelab_string_input_choice_cb(Fl_Widget *w, void *data) } } if(choices.size()) - strings[0].setAttribute("MultipleChoice", choices); + strings[0].setAttribute("MultipleSelection", choices); onelab::server::instance()->set(strings[0]); autoCheck(old, strings[0]); } @@ -1181,7 +1181,7 @@ static void onelab_input_choice_file_merge_cb(Fl_Widget *w, void *data) 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; std::string val; @@ -1239,17 +1239,17 @@ Fl_Widget *onelabGroup::_addParameterWidget(onelab::string &p, Fl_Tree_Item *n, // general string input Fl_Input_Choice *but = new Fl_Input_Choice(1, 1, ww, 1); - std::string multipleChoice = p.getAttribute("MultipleChoice"); - if(multipleChoice.size()) - but->menubutton()->callback(multiple_choice_menu_cb, but); + std::string multipleSelection = p.getAttribute("MultipleSelection"); + if(multipleSelection.size()) + but->menubutton()->callback(multiple_selection_menu_cb, but); std::vector<Fl_Menu_Item> menu; for(unsigned int j = 0; j < p.getChoices().size(); j++){ char *str = strdup(p.getChoices()[j].c_str()); _treeStrings.push_back(str); bool divider = (p.getKind() == "file" && j == p.getChoices().size() - 1); - int choice = multipleChoice.size() ? FL_MENU_TOGGLE : 0; - if(multipleChoice.size() > j && multipleChoice[j] == '1') + int choice = multipleSelection.size() ? FL_MENU_TOGGLE : 0; + if(multipleSelection.size() > j && multipleSelection[j] == '1') choice |= FL_MENU_VALUE; Fl_Menu_Item it = {str, 0, 0, 0, divider ? FL_MENU_DIVIDER : choice}; menu.push_back(it);