|
|
|
@ -38,6 +38,7 @@ Menu::Model::Model() { |
|
|
|
" </menu> " |
|
|
|
" </menu> " |
|
|
|
" <menu action='HelpMenu'> " |
|
|
|
" <menu action='HelpMenu'> " |
|
|
|
" <menuitem action='HelpAbout'/> " |
|
|
|
" <menuitem action='HelpAbout'/> " |
|
|
|
|
|
|
|
" <menuitem action='HelpHide'/> " |
|
|
|
" </menu> " |
|
|
|
" </menu> " |
|
|
|
" </menubar> " |
|
|
|
" </menubar> " |
|
|
|
"</ui> "; |
|
|
|
"</ui> "; |
|
|
|
@ -81,14 +82,12 @@ Menu::Controller::Controller(Keybindings::Controller keybindings) : |
|
|
|
[this]() { |
|
|
|
[this]() { |
|
|
|
OnFileNewEmptyfile(); |
|
|
|
OnFileNewEmptyfile(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
keybindings_.action_group()->add(Gtk::Action::create("FileNewCC", |
|
|
|
keybindings_.action_group()->add(Gtk::Action::create("FileNewCC", "New cc file"), |
|
|
|
Gtk::Stock::NEW, "New cc file", "Create a new cc file"), |
|
|
|
|
|
|
|
Gtk::AccelKey("<control><alt>c"), |
|
|
|
Gtk::AccelKey("<control><alt>c"), |
|
|
|
[this]() { |
|
|
|
[this]() { |
|
|
|
OnFileNewCCFile(); |
|
|
|
OnFileNewCCFile(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
keybindings_.action_group()->add(Gtk::Action::create("FileNewH", |
|
|
|
keybindings_.action_group()->add(Gtk::Action::create("FileNewH","New h file" ), |
|
|
|
Gtk::Stock::NEW, "New h file", "Create a new h file"), |
|
|
|
|
|
|
|
Gtk::AccelKey("<control><alt>h"), |
|
|
|
Gtk::AccelKey("<control><alt>h"), |
|
|
|
[this]() { |
|
|
|
[this]() { |
|
|
|
OnFileNewHeaderFile(); |
|
|
|
OnFileNewHeaderFile(); |
|
|
|
@ -152,6 +151,12 @@ Menu::Controller::Controller(Keybindings::Controller keybindings) : |
|
|
|
[this]() { |
|
|
|
[this]() { |
|
|
|
OnHelpAbout(); |
|
|
|
OnHelpAbout(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
keybindings_.action_group()->add(Gtk::Action::create("HelpHide"), |
|
|
|
|
|
|
|
Gtk::AccelKey("<control><alt>K"), |
|
|
|
|
|
|
|
[this]() { |
|
|
|
|
|
|
|
OnHelpAbout(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* END help menu */ |
|
|
|
/* END help menu */ |
|
|
|
@ -159,6 +164,8 @@ Menu::Controller::Controller(Keybindings::Controller keybindings) : |
|
|
|
|
|
|
|
|
|
|
|
keybindings_.ui_manager()->add_ui_from_string(menu_model_.ui_string()); |
|
|
|
keybindings_.ui_manager()->add_ui_from_string(menu_model_.ui_string()); |
|
|
|
keybindings_.ui_manager()->insert_action_group(keybindings_.action_group()); |
|
|
|
keybindings_.ui_manager()->insert_action_group(keybindings_.action_group()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Menu::Controller::~Controller() { |
|
|
|
Menu::Controller::~Controller() { |
|
|
|
|