From a2231cafe23c7b675d8a267b5a307b6cf1b289e5 Mon Sep 17 00:00:00 2001 From: oyvang Date: Wed, 4 Feb 2015 15:29:26 +0100 Subject: [PATCH 1/4] BAB-11 #time 3h #comment Finished menu look --- juci/controller.h | 7 ++++ juci/controllers.cc | 95 ++++++++++++++++++++++++++++++++++++++++++--- juci/models.cc | 18 ++++++++- 3 files changed, 112 insertions(+), 8 deletions(-) diff --git a/juci/controller.h b/juci/controller.h index b9e79a9..fcbd074 100644 --- a/juci/controller.h +++ b/juci/controller.h @@ -35,6 +35,13 @@ public: void onFileOpenFolder(); void onSystemQuit(); void onPluginAddSnippet(); + void onWindowCloseTab(); + void onEditCopy(); + void onEditCut(); + void onEditPaste(); + void onEditFind(); + void onWindowSplitWindow(); + void onHelpAbout(); }; }; diff --git a/juci/controllers.cc b/juci/controllers.cc index f6ab2e7..8410e09 100644 --- a/juci/controllers.cc +++ b/juci/controllers.cc @@ -3,10 +3,10 @@ Controller::Menu::Menu() : menu_view_(Gtk::ORIENTATION_VERTICAL), menu_model_() { -/*Add action to menues*/ -/*File menu*/ +/* Add action to menues */ +/* START file menu */ menu_view_.action_group()->add(Gtk::Action::create("FileMenu", Gtk::Stock::FILE)); - /*File->New files*/ + /* File->New files */ menu_view_.action_group()->add(Gtk::Action::create("FileNew", "New")); menu_view_.action_group()->add(Gtk::Action::create("FileNewStandard", @@ -29,23 +29,67 @@ Controller::Menu::Menu() : /* File-> New files end */ menu_view_.action_group()->add(Gtk::Action::create("FileOpenFile", Gtk::Stock::OPEN), [this]() { - onFileNewEmptyfile(); + onFileOpenFile(); }); menu_view_.action_group()->add(Gtk::Action::create("FileOpenFolder", "Open folder"), [this]() { - onFileNewEmptyfile(); + onFileOpenFolder(); }); menu_view_.action_group()->add(Gtk::Action::create("FileQuit", Gtk::Stock::QUIT), [this]() { onSystemQuit(); }); - menu_view_.action_group()->add(Gtk::Action::create("PluginMenu", "Plugins")); +/* END file menu */ +/* START edit menu */ + menu_view_.action_group()->add(Gtk::Action::create("EditMenu", Gtk::Stock::EDIT)); + menu_view_.action_group()->add(Gtk::Action::create("EditCopy", Gtk::Stock::COPY), + [this]() { + onEditCopy(); + }); + menu_view_.action_group()->add(Gtk::Action::create("EditCut", Gtk::Stock::CUT), + [this]() { + onEditCut(); + }); + menu_view_.action_group()->add(Gtk::Action::create("EditPaste", Gtk::Stock::PASTE), + [this]() { + onEditPaste(); + }); + menu_view_.action_group()->add(Gtk::Action::create("EditFind", Gtk::Stock::FIND), + [this]() { + onEditFind(); + }); +/* END edit menu */ +/* START window menu */ + menu_view_.action_group()->add(Gtk::Action::create("WindowMenu", "_Window")); + menu_view_.action_group()->add(Gtk::Action::create("WindowCloseTab", "Close tab"), + Gtk::AccelKey("w"), + [this]() { + onWindowCloseTab(); + }); + menu_view_.action_group()->add(Gtk::Action::create("WindowSplitWindow", "Split window"), + Gtk::AccelKey("S"), + [this]() { + onWindowSplitWindow(); + }); +/* END window menu */ +/* START Plugin menu */ + menu_view_.action_group()->add(Gtk::Action::create("PluginMenu", "_Plugins")); + /*Plugin->snippet*/ menu_view_.action_group()->add(Gtk::Action::create("PluginSnippet", "Snippet")); menu_view_.action_group()->add(Gtk::Action::create("PluginAddSnippet", "Add snippet"), Gtk::AccelKey("space"), [this]() { onPluginAddSnippet(); }); + /* End snippet */ +/* END plugin menu */ +/* START help menu */ + menu_view_.action_group()->add(Gtk::Action::create("HelpMenu", Gtk::Stock::HELP)); + menu_view_.action_group()->add(Gtk::Action::create("HelpAbout", Gtk::Stock::ABOUT), + [this]() { + onHelpAbout(); + }); +/* END help menu */ menu_view_.set_ui_manager_action_group(menu_view_.action_group()); @@ -62,13 +106,16 @@ Gtk::Box &Controller::Menu::view() { void Controller::Menu::onFileNewEmptyfile() { std::cout << "New file clicked" << std::endl; + //TODO(Oyvang) Legg til funksjon } void Controller::Menu::onFileNewCCFile() { std::cout << "New cc file clicked" << std::endl; + //TODO(Oyvang) Legg til funksjon } void Controller::Menu::onFileNewHeaderFile() { std::cout << "New cc file clicked" << std::endl; + //TODO(Oyvang) Legg til funksjon } void Controller::Menu::onSystemQuit(){ //TODO(Oyvang, Zalox, Forgie) Add everything that needs to be done before quiting @@ -78,3 +125,39 @@ void Controller::Menu::onSystemQuit(){ void Controller::Menu::onPluginAddSnippet() { std::cout << "Add snipper" << std::endl; //TODO(Forgi add you snippet magic code) } +void Controller::Menu::onFileOpenFile() { + std::cout << "Open file clicked" << std::endl; + //TODO(Oyvang) Legg til funksjon +} +void Controller::Menu::onFileOpenFolder() { + std::cout << "Open folder clicked" << std::endl; + //TODO(Oyvang) Legg til funksjon +} +void Controller::Menu::onWindowCloseTab() { + std::cout << "Closing tab clicked" << std::endl; + //TODO(Oyvang) Legg til funksjon +} +void Controller::Menu::onEditCopy() { + std::cout << "Clicked copy" << std::endl; + //TODO(Oyvang) Legg til funksjon +} +void Controller::Menu::onEditCut() { + std::cout << "Clicked cut" << std::endl; + //TODO(Oyvang) Legg til funksjon +} +void Controller::Menu::onEditPaste() { + std::cout << "Clicked paste" << std::endl; + //TODO(Oyvang) Legg til funksjon +} +void Controller::Menu::onEditFind() { + std::cout << "Clicked find" << std::endl; + //TODO(Oyvang) Legg til funksjon +} +void Controller::Menu::onWindowSplitWindow() { + std::cout << "Clicked split window" << std::endl; + //TODO(Oyvang) Legg til funksjon +} +void Controller::Menu::onHelpAbout() { + std::cout << "Clicked about" << std::endl; + //TODO(Oyvang) Legg til funksjon +} diff --git a/juci/models.cc b/juci/models.cc index 4b7f70a..d262574 100644 --- a/juci/models.cc +++ b/juci/models.cc @@ -10,16 +10,30 @@ Model::Menu::Menu() { " " " " " " - // " " - //" " + " " + " " " " " " " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " " " " " " " " " " " + " " + " " + " " " " " "; From 4e58b48f4fb7a7c0b3080cb341ccef5045de0b4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lien=20Sell=C3=A6g?= Date: Mon, 9 Feb 2015 03:48:56 +0100 Subject: [PATCH 2/4] Fix Cmakelists --- .gitignore | 3 +- juci/CMakeLists.txt | 71 ++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 66 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index def795e..36c3170 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,8 @@ !*/ + #Whitelist !*.cc !*.h -!*.txt +!CMakeLists.txt diff --git a/juci/CMakeLists.txt b/juci/CMakeLists.txt index 2ac0a08..d5a35a3 100644 --- a/juci/CMakeLists.txt +++ b/juci/CMakeLists.txt @@ -1,11 +1,67 @@ cmake_minimum_required (VERSION 2.8.4) -project (juci) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +set(project_name juci) + +project (${project_name}) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") INCLUDE(FindPkgConfig) +#### Finding boost, the variables below is set ##### +#PYTHONLIBS_FOUND - True if headers and requested libraries were found +#PYTHON_INCLUDE_DIRS - Boost include directories +#PYTHON_LIBRARIES - Boost component libraries to be linked +find_package(PythonLibs 2.7) + +#If python is found +if(${PYTHONLIBS_FOUND}) + message("Python libraries found. Continuing") +else() + message("Please install python libraries. The libraries where not found.") + message("Boost include dirs: ${PYTHON_INCLUDE_DIRS}") + message("Boost link dirs ${PYTHON_LIBRARIES}") + message(FATAL_ERROR "The boost libraries are required. Quiting.") +endif() + +#### Finding boost, the variables below is set ##### +#Boost_FOUND - True if headers and requested libraries were found +#Boost_INCLUDE_DIRS - Boost include directories +#Boost_LIBRARY_DIRS - Link directories for Boost libraries +#Boost_LIBRARIES - Boost component libraries to be linked +find_package(Boost 1.5 REQUIRED) + +#If boost is not found +if(${Boost_FOUND}) + message("Boost libraries found. Continuing") +else() + message("Please install boost libraries. The libraries where not found.") + message("Boost library dirs: ${Boost_LIBRARY_DIRS}") + message("Boost include dirs: ${Boost_INCLUDE_DIRS}") + message("Boost link dirs ${Boost_LIBRARIES}") + message(FATAL_ERROR "The boost libraries are required. Quiting.") +endif() + +#### Finding gtkmm, the variables below is set ##### +#GTKMM_FOUND - True if headers and requested libraries were found +#GTKMM_INCLUDE_DIRS - GTKMM include directories +#GTKMM_LIBRARY_DIRS - Link directories for GTKMM libraries +#GTKMM_LIBRARIES - GTKMM libraries to be linked +pkg_check_modules(GTKMM gtkmm-3.0) # The name GTKMM is set here for the variables abouve + +#If gtkmm is not found +if(${GTKMM_FOUND}) + message("Gtkmm libraries found. Continuing") +else() + message("Please install gtkmm libraries. The libraries where not found.") + message("Gtkmm library dirs ${GTKMM_LIBRARY_DIRS}") + message("Gtkmm include dirs ${GTKMM_INCLUDE_DIRS}") + message("Gtkmm link dirs ${GTKMM_LIBRARIES}") + message(FATAL_ERROR "The gtkmm libraries are required. Quiting.") +endif() + + # name of the executable on Windows will be example.exe -add_executable(juci +add_executable(${project_name} # list of every needed file to create the executable model.h models.cc @@ -21,7 +77,8 @@ add_executable(juci ) # dependencies - pkg_check_modules(GTKMM REQUIRED gtkmm-3.0) - include_directories(${GTKMM_INCLUDE_DIRS} ) - link_directories(${GTKMM_LIBRARY_DIRS}) - target_link_libraries(juci ${GTKMM_LIBRARIES}) \ No newline at end of file + +include_directories(${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS}) +link_directories(${GTKMM_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS}) +target_link_libraries(${project_name} ${GTKMM_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) + From 4f83c9539d68bd48cbb4776ea1af6a6f81d1ca6a Mon Sep 17 00:00:00 2001 From: oyvang Date: Mon, 9 Feb 2015 10:51:48 +0100 Subject: [PATCH 3/4] reformated code to new standard --- juci/CMakeLists.txt | 9 +-- juci/controller.h | 50 ------------- juci/juci.h | 6 +- juci/{controllers.cc => menu.cc} | 122 ++++++++++++++++++++++++++----- juci/menu.h | 90 +++++++++++++++++++++++ juci/model.h | 28 ------- juci/models.cc | 44 ----------- juci/view.h | 43 ----------- juci/views.cc | 36 --------- 9 files changed, 197 insertions(+), 231 deletions(-) delete mode 100644 juci/controller.h rename juci/{controllers.cc => menu.cc} (53%) create mode 100644 juci/menu.h delete mode 100644 juci/model.h delete mode 100644 juci/models.cc delete mode 100644 juci/view.h delete mode 100644 juci/views.cc diff --git a/juci/CMakeLists.txt b/juci/CMakeLists.txt index 2ac0a08..acc6b01 100644 --- a/juci/CMakeLists.txt +++ b/juci/CMakeLists.txt @@ -7,14 +7,9 @@ INCLUDE(FindPkgConfig) # name of the executable on Windows will be example.exe add_executable(juci # list of every needed file to create the executable - model.h - models.cc + menu.h - view.h - views.cc - - controller.h - controllers.cc + menu.cc window.cc juci.cc diff --git a/juci/controller.h b/juci/controller.h deleted file mode 100644 index fcbd074..0000000 --- a/juci/controller.h +++ /dev/null @@ -1,50 +0,0 @@ -/*juCi++ controller header file*/ -#ifndef CONTROLLER_H -#define CONTROLLER_H - -#include "view.h" -#include "model.h" - -/* -------------------------- HOW TO ----------------------------- */ -/* Controll classes under Controller->public */ -/* Model object under Controller::class->private name:class_model */ -/* View object under Controller::class->private name:class_view */ -/* ------------------ Remove these comments ---------------------- */ - -class Controller { -public: - class Menu { - public: - Menu(); - - virtual ~Menu(); - Gtk::Box &view(); - - Glib::RefPtr ui_manager() { - return menu_view_.ui_manager(); - }; - - private: - View::Menu menu_view_; - Model::Menu menu_model_; - /*Signal handlers*/ - void onFileNewEmptyfile(); - void onFileNewCCFile(); - void onFileNewHeaderFile(); - void onFileOpenFile(); - void onFileOpenFolder(); - void onSystemQuit(); - void onPluginAddSnippet(); - void onWindowCloseTab(); - void onEditCopy(); - void onEditCut(); - void onEditPaste(); - void onEditFind(); - void onWindowSplitWindow(); - void onHelpAbout(); - - }; -}; - - -#endif //CONTROLLER_H \ No newline at end of file diff --git a/juci/juci.h b/juci/juci.h index 7df1832..37dc1ef 100644 --- a/juci/juci.h +++ b/juci/juci.h @@ -4,9 +4,7 @@ #include #include "gtkmm.h" -#include "view.h" -#include "model.h" -#include "controller.h" +#include "menu.h" class Window : public Gtk::Window { @@ -18,7 +16,7 @@ public: Gtk::Box window_box_; private: - Controller::Menu menu; + Menu::Controller menu; /*signal handler*/ void onSystemQuit(); diff --git a/juci/controllers.cc b/juci/menu.cc similarity index 53% rename from juci/controllers.cc rename to juci/menu.cc index 8410e09..bdd00f7 100644 --- a/juci/controllers.cc +++ b/juci/menu.cc @@ -1,6 +1,90 @@ -#include "controller.h" +#include "menu.h" -Controller::Menu::Menu() : +/***********************************/ +/* MODEL */ +/***********************************/ + + +Menu::Model::Model() { + ui_string_ = + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " "; + +} + +Menu::Model::~Model() { +} + +/***********************************/ +/* VIEW */ +/***********************************/ +Menu::View::View(Gtk::Orientation orientation) : + view_(orientation) { + + action_group_ = Gtk::ActionGroup::create(); + ui_manager_ = Gtk::UIManager::create(); + + +} + +void Menu::View::set_ui_manger_string(std::string ui_string) { + try { + ui_manager_->add_ui_from_string(ui_string); + } + catch (const Glib::Error &ex) { + std::cerr << "building menus failed: " << ex.what(); + } +} + +void Menu::View::set_ui_manager_action_group(Glib::RefPtr action_group) { + ui_manager_->insert_action_group(action_group); +} + +Gtk::Box &Menu::View::view() { + view_.pack_start(*ui_manager_->get_widget("/MenuBar"), Gtk::PACK_SHRINK); + return view_; +} + + +Menu::View::~View() { +} + +/***********************************/ +/* CONTROLLER */ +/***********************************/ +Menu::Controller::Controller() : menu_view_(Gtk::ORIENTATION_VERTICAL), menu_model_() { /* Add action to menues */ @@ -96,68 +180,68 @@ Controller::Menu::Menu() : menu_view_.set_ui_manger_string(menu_model_.ui_string()); } -Controller::Menu::~Menu() { +Menu::Controller::~Controller() { } -Gtk::Box &Controller::Menu::view() { +Gtk::Box &Menu::Controller::view() { return menu_view_.view(); } -void Controller::Menu::onFileNewEmptyfile() { +void Menu::Controller::onFileNewEmptyfile() { std::cout << "New file clicked" << std::endl; //TODO(Oyvang) Legg til funksjon } -void Controller::Menu::onFileNewCCFile() { +void Menu::Controller::onFileNewCCFile() { std::cout << "New cc file clicked" << std::endl; //TODO(Oyvang) Legg til funksjon } -void Controller::Menu::onFileNewHeaderFile() { +void Menu::Controller::onFileNewHeaderFile() { std::cout << "New cc file clicked" << std::endl; //TODO(Oyvang) Legg til funksjon } -void Controller::Menu::onSystemQuit(){ +void Menu::Controller::onSystemQuit(){ //TODO(Oyvang, Zalox, Forgie) Add everything that needs to be done before quiting /*Quit the system*/ Gtk::Main::quit(); //TODO(Oyvang, Zalox, Forgie) methode is depricated, find a better solution. } -void Controller::Menu::onPluginAddSnippet() { +void Menu::Controller::onPluginAddSnippet() { std::cout << "Add snipper" << std::endl; //TODO(Forgi add you snippet magic code) } -void Controller::Menu::onFileOpenFile() { +void Menu::Controller::onFileOpenFile() { std::cout << "Open file clicked" << std::endl; //TODO(Oyvang) Legg til funksjon } -void Controller::Menu::onFileOpenFolder() { +void Menu::Controller::onFileOpenFolder() { std::cout << "Open folder clicked" << std::endl; //TODO(Oyvang) Legg til funksjon } -void Controller::Menu::onWindowCloseTab() { +void Menu::Controller::onWindowCloseTab() { std::cout << "Closing tab clicked" << std::endl; //TODO(Oyvang) Legg til funksjon } -void Controller::Menu::onEditCopy() { +void Menu::Controller::onEditCopy() { std::cout << "Clicked copy" << std::endl; //TODO(Oyvang) Legg til funksjon } -void Controller::Menu::onEditCut() { +void Menu::Controller::onEditCut() { std::cout << "Clicked cut" << std::endl; //TODO(Oyvang) Legg til funksjon } -void Controller::Menu::onEditPaste() { +void Menu::Controller::onEditPaste() { std::cout << "Clicked paste" << std::endl; //TODO(Oyvang) Legg til funksjon } -void Controller::Menu::onEditFind() { +void Menu::Controller::onEditFind() { std::cout << "Clicked find" << std::endl; //TODO(Oyvang) Legg til funksjon } -void Controller::Menu::onWindowSplitWindow() { +void Menu::Controller::onWindowSplitWindow() { std::cout << "Clicked split window" << std::endl; //TODO(Oyvang) Legg til funksjon } -void Controller::Menu::onHelpAbout() { +void Menu::Controller::onHelpAbout() { std::cout << "Clicked about" << std::endl; //TODO(Oyvang) Legg til funksjon -} +} \ No newline at end of file diff --git a/juci/menu.h b/juci/menu.h new file mode 100644 index 0000000..e7d3437 --- /dev/null +++ b/juci/menu.h @@ -0,0 +1,90 @@ +#include +#include "gtkmm.h" +namespace Menu { + class Model { + public: + Model(); + + virtual~Model(); + + std::string ui_string() { + return ui_string_; + }; + private: + std::string ui_string_; + }; + + + class View { + public: + View(Gtk::Orientation orient); + + virtual ~View(); + + Gtk::Box &view(); + + Glib::RefPtr action_group() { + return action_group_; + }; + + Glib::RefPtr ui_manager() { + return ui_manager_; + }; + + void set_ui_manger_string(std::string ui_string); + + void set_ui_manager_action_group(Glib::RefPtr action_group); + + protected: + Gtk::Box view_; + Glib::RefPtr ui_manager_; + Glib::RefPtr action_group_; + }; + + class Controller { + public: + Controller(); + + virtual ~Controller(); + + Gtk::Box &view(); + + Glib::RefPtr ui_manager() { + return menu_view_.ui_manager(); + }; + + private: + Menu::View menu_view_; + Menu::Model menu_model_; + + /*Signal handlers*/ + void onFileNewEmptyfile(); + + void onFileNewCCFile(); + + void onFileNewHeaderFile(); + + void onFileOpenFile(); + + void onFileOpenFolder(); + + void onSystemQuit(); + + void onPluginAddSnippet(); + + void onWindowCloseTab(); + + void onEditCopy(); + + void onEditCut(); + + void onEditPaste(); + + void onEditFind(); + + void onWindowSplitWindow(); + + void onHelpAbout(); + + }; +} \ No newline at end of file diff --git a/juci/model.h b/juci/model.h deleted file mode 100644 index d244cdf..0000000 --- a/juci/model.h +++ /dev/null @@ -1,28 +0,0 @@ -/*juCi++ model header file*/ -#ifndef MODEL_H -#define MODEL_H - -#include "gtkmm.h" - -/* -------------------------- HOW TO -------------------------- */ -/* Model classes under Model if possible */ -/* ------------------ Remove these comments ------------------- */ - -class Model { -public: - class Menu { - public: - Menu(); - - virtual~Menu(); - - std::string ui_string() { - return ui_string_; - }; - private: - std::string ui_string_; - }; - -}; - -#endif //MODEL_H \ No newline at end of file diff --git a/juci/models.cc b/juci/models.cc deleted file mode 100644 index d262574..0000000 --- a/juci/models.cc +++ /dev/null @@ -1,44 +0,0 @@ -#include "model.h" - -Model::Menu::Menu() { - ui_string_ = - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " "; - - // TODO(oyvang) legg til under en meny Window -} - -Model::Menu::~Menu() { -} \ No newline at end of file diff --git a/juci/view.h b/juci/view.h deleted file mode 100644 index 50316c0..0000000 --- a/juci/view.h +++ /dev/null @@ -1,43 +0,0 @@ -/*juCi++ view header file*/ -#ifndef VIEW_H -#define VIEW_H - -#include "gtkmm.h" -#include "iostream" - -/* -------------------------- HOW TO -------------------------- */ -/* All view shall be under View if possible */ -/* ------------------ Remove these comments ------------------- */ - - -class View { -public: - class Menu { - public: - Menu(Gtk::Orientation orient); - - virtual ~Menu(); - - Gtk::Box &view(); - Glib::RefPtr action_group() { - return action_group_; - }; - - Glib::RefPtr ui_manager() { - return ui_manager_; - }; - - void set_ui_manger_string(std::string ui_string); - - void set_ui_manager_action_group(Glib::RefPtr action_group); - - protected: - Gtk::Box view_; - Glib::RefPtr ui_manager_; - Glib::RefPtr action_group_; - }; - - -}; - -#endif // VIEW_H \ No newline at end of file diff --git a/juci/views.cc b/juci/views.cc deleted file mode 100644 index cfb63c3..0000000 --- a/juci/views.cc +++ /dev/null @@ -1,36 +0,0 @@ -#include "view.h" - - -/***********************************/ -/* MENU */ -/***********************************/ -View::Menu::Menu(Gtk::Orientation orientation) : - view_(orientation) { - - action_group_ = Gtk::ActionGroup::create(); - ui_manager_ = Gtk::UIManager::create(); - - -} - -void View::Menu::set_ui_manger_string(std::string ui_string) { - try { - ui_manager_->add_ui_from_string(ui_string); - } - catch (const Glib::Error &ex) { - std::cerr << "building menus failed: " << ex.what(); - } -} - -void View::Menu::set_ui_manager_action_group(Glib::RefPtr action_group) { - ui_manager_->insert_action_group(action_group); -} - -Gtk::Box &View::Menu::view() { - view_.pack_start(*ui_manager_->get_widget("/MenuBar"), Gtk::PACK_SHRINK); - return view_; -} - - -View::Menu::~Menu() { -} \ No newline at end of file From e2414e0e164105b8e6d1c416851b2cfc232464d6 Mon Sep 17 00:00:00 2001 From: oyvang Date: Mon, 9 Feb 2015 11:31:41 +0100 Subject: [PATCH 4/4] Updated spelling issues and set c++ standard to 11 form 14 --- juci/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/juci/CMakeLists.txt b/juci/CMakeLists.txt index 3e4cf3b..17febd9 100644 --- a/juci/CMakeLists.txt +++ b/juci/CMakeLists.txt @@ -3,7 +3,7 @@ set(project_name juci) project (${project_name}) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") INCLUDE(FindPkgConfig) @@ -18,9 +18,9 @@ if(${PYTHONLIBS_FOUND}) message("Python libraries found. Continuing") else() message("Please install python libraries. The libraries where not found.") - message("Boost include dirs: ${PYTHON_INCLUDE_DIRS}") - message("Boost link dirs ${PYTHON_LIBRARIES}") - message(FATAL_ERROR "The boost libraries are required. Quiting.") + message("Python include dirs: ${PYTHON_INCLUDE_DIRS}") + message("Python link dirs ${PYTHON_LIBRARIES}") + message(FATAL_ERROR "The python libraries are required. Quitting.") endif() #### Finding boost, the variables below is set ##### @@ -38,7 +38,7 @@ else() message("Boost library dirs: ${Boost_LIBRARY_DIRS}") message("Boost include dirs: ${Boost_INCLUDE_DIRS}") message("Boost link dirs ${Boost_LIBRARIES}") - message(FATAL_ERROR "The boost libraries are required. Quiting.") + message(FATAL_ERROR "The boost libraries are required. Quitting.") endif() #### Finding gtkmm, the variables below is set ##### @@ -56,7 +56,7 @@ else() message("Gtkmm library dirs ${GTKMM_LIBRARY_DIRS}") message("Gtkmm include dirs ${GTKMM_INCLUDE_DIRS}") message("Gtkmm link dirs ${GTKMM_LIBRARIES}") - message(FATAL_ERROR "The gtkmm libraries are required. Quiting.") + message(FATAL_ERROR "The gtkmm libraries are required. Quitting.") endif()