added forgotten [macrocmd] to menuitems
This commit is contained in:
parent
1d355a9192
commit
e11fb1b473
1 changed files with 11 additions and 1 deletions
|
@ -20,7 +20,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// $Id: MenuCreator.cc,v 1.13 2004/08/29 21:11:24 akir Exp $
|
// $Id: MenuCreator.cc,v 1.14 2004/09/09 14:32:56 akir Exp $
|
||||||
|
|
||||||
#include "MenuCreator.hh"
|
#include "MenuCreator.hh"
|
||||||
|
|
||||||
|
@ -202,6 +202,16 @@ static void translateMenuItem(Parser &parse, ParseItem &pitem) {
|
||||||
exec_and_hide->add(exec_cmd);
|
exec_and_hide->add(exec_cmd);
|
||||||
RefCount<Command> exec_and_hide_cmd(exec_and_hide);
|
RefCount<Command> exec_and_hide_cmd(exec_and_hide);
|
||||||
menu.insert(str_label.c_str(), exec_and_hide_cmd);
|
menu.insert(str_label.c_str(), exec_and_hide_cmd);
|
||||||
|
} else if (str_key == "macrocmd") {
|
||||||
|
using namespace FbTk;
|
||||||
|
RefCount<Command> macro_cmd(CommandParser::instance().parseLine("macrocmd " + str_cmd));
|
||||||
|
RefCount<Command> hide_menu(new SimpleCommand<FbTk::Menu>(menu,
|
||||||
|
&Menu::hide));
|
||||||
|
MacroCommand *exec_and_hide = new FbTk::MacroCommand();
|
||||||
|
exec_and_hide->add(hide_menu);
|
||||||
|
exec_and_hide->add(macro_cmd);
|
||||||
|
RefCount<Command> exec_and_hide_cmd(exec_and_hide);
|
||||||
|
menu.insert(str_label.c_str(), exec_and_hide_cmd);
|
||||||
} else if (str_key == "style") { // style
|
} else if (str_key == "style") { // style
|
||||||
menu.insert(new StyleMenuItem(str_label, str_cmd));
|
menu.insert(new StyleMenuItem(str_label, str_cmd));
|
||||||
} else if (str_key == "config") {
|
} else if (str_key == "config") {
|
||||||
|
|
Loading…
Reference in a new issue