diff --git a/gui/src/workspace/actions.cpp b/gui/src/workspace/actions.cpp index fc7b70fde..e91ab9ff1 100644 --- a/gui/src/workspace/actions.cpp +++ b/gui/src/workspace/actions.cpp @@ -36,48 +36,24 @@ namespace workspace { { actionGroup = Gtk::ActionGroup::create(); - // File|New sub menu: - actionGroup->add(Gtk::Action::create("FileNewStandard", - Gtk::Stock::NEW, "_New", "Create a new file"), - sigc::mem_fun(*this, &Actions::on_menu_file_new_generic)); - - actionGroup->add(Gtk::Action::create("FileNewFoo", - Gtk::Stock::NEW, "New Foo", "Create a new foo"), - sigc::mem_fun(*this, &Actions::on_menu_file_new_generic)); - - actionGroup->add(Gtk::Action::create("FileNewGoo", - Gtk::Stock::NEW, "_New Goo", "Create a new goo"), - sigc::mem_fun(*this, &Actions::on_menu_file_new_generic)); - // File menu: - actionGroup->add(Gtk::Action::create("FileMenu", "File")); - // Sub-menu. - actionGroup->add(Gtk::Action::create("FileNew", Gtk::Stock::NEW)); - actionGroup->add(Gtk::Action::create("FileRender", _("Render...")), + actionGroup->add(Gtk::Action::create("FileMenu", _("File"))); + actionGroup->add(Gtk::Action::create("FileNewProject", Gtk::Stock::NEW, _("_New Project...")), + sigc::mem_fun(*this, &Actions::on_menu_file_new_project)); + actionGroup->add(Gtk::Action::create("FileOpenProject", Gtk::Stock::OPEN, _("_Open Project...")), + sigc::mem_fun(*this, &Actions::on_menu_file_new_project)); + actionGroup->add(Gtk::Action::create("FileRender", _("_Render...")), Gtk::AccelKey("R"), sigc::mem_fun(*this, &Actions::on_menu_file_render)); actionGroup->add(Gtk::Action::create("FileQuit", Gtk::Stock::QUIT), sigc::mem_fun(*this, &Actions::on_menu_file_quit)); // Edit menu: - actionGroup->add(Gtk::Action::create("EditMenu", "Edit")); + actionGroup->add(Gtk::Action::create("EditMenu", _("Edit"))); actionGroup->add(Gtk::Action::create("EditCopy", Gtk::Stock::COPY), - sigc::mem_fun(*this, &Actions::on_menu_others)); - actionGroup->add(Gtk::Action::create("EditPaste", Gtk::Stock::PASTE), - sigc::mem_fun(*this, &Actions::on_menu_others)); - actionGroup->add(Gtk::Action::create("EditSomething", "Something"), - Gtk::AccelKey("S"), sigc::mem_fun(*this, &Actions::on_menu_others)); - - // Choices menu, to demonstrate Radio items - actionGroup->add( Gtk::Action::create("ChoicesMenu", "Choices") ); - Gtk::RadioAction::Group group_userlevel; - m_refChoiceOne = Gtk::RadioAction::create(group_userlevel, "ChoiceOne", "One"); - actionGroup->add(m_refChoiceOne, - sigc::mem_fun(*this, &Actions::on_menu_choices_one) ); - m_refChoiceTwo = Gtk::RadioAction::create(group_userlevel, "ChoiceTwo", "Two"); - actionGroup->add(m_refChoiceTwo, - sigc::mem_fun(*this, &Actions::on_menu_choices_two) ); + actionGroup->add(Gtk::Action::create("EditPaste", Gtk::Stock::PASTE), + sigc::mem_fun(*this, &Actions::on_menu_others)); // Help menu: actionGroup->add( Gtk::Action::create("HelpMenu", "Help") ); @@ -85,6 +61,18 @@ namespace workspace { sigc::mem_fun(*this, &Actions::on_menu_help_about) ); } + void + Actions::on_menu_file_new_project() + { + g_message("A File|New menu item was selecteda."); + } + + void + Actions::on_menu_file_open_project() + { + g_message("A File|Open menu item was selecteda."); + } + void Actions::on_menu_file_render() { @@ -121,43 +109,12 @@ namespace workspace { //----- Temporary junk - - void - Actions::on_menu_file_new_generic() - { - g_message("A File|New menu item was selecteda."); - } - void Actions::on_menu_others() { g_message("A menu item was selected."); } - void - Actions::on_menu_choices_one() - { - Glib::ustring message; - //if(m_refChoiceOne->get_active()) - // message = "Choice 1 was selected."; - //else - message = "Choice 1 was deselected"; - - g_message(message.c_str()); - } - - void - Actions::on_menu_choices_two() - { - Glib::ustring message; - //if(_main_window.m_refChoiceTwo->get_active()) - // message = "Choice 2 was selected."; - //else - message = "Choice 2 was deselected"; - - g_message(message.c_str()); - } - } // namespace workspace } // namespace gui } // namespace lumiera diff --git a/gui/src/workspace/actions.hpp b/gui/src/workspace/actions.hpp index 7c8c1d89e..2f24517c9 100644 --- a/gui/src/workspace/actions.hpp +++ b/gui/src/workspace/actions.hpp @@ -52,7 +52,8 @@ class MainWindow; MainWindow &mainWindow; /* ===== Event Handlers ===== */ - void on_menu_file_new_generic(); + void on_menu_file_new_project(); + void on_menu_file_open_project(); void on_menu_file_render(); void on_menu_file_quit(); @@ -60,8 +61,6 @@ class MainWindow; // Temporary Junk void on_menu_others(); - void on_menu_choices_one(); - void on_menu_choices_two(); /* ===== Actions ===== */ Glib::RefPtr actionGroup; diff --git a/gui/src/workspace/main-window.cpp b/gui/src/workspace/main-window.cpp index 658057bcc..1a57934e6 100644 --- a/gui/src/workspace/main-window.cpp +++ b/gui/src/workspace/main-window.cpp @@ -75,11 +75,8 @@ namespace workspace { "" " " " " - " " - " " - " " - " " - " " + " " + " " " " " " " " @@ -88,18 +85,13 @@ namespace workspace { " " " " " " - " " - " " - " " - " " - " " " " " " " " " " " " " " - " " + " " " " "";