Add 'new', 'open' and 'quit' to the caret>file menu.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 16 Jan 2008 21:50:21 +0000 (21:50 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 16 Jan 2008 21:50:21 +0000 (21:50 +0000)
git-svn-id: http://svn.voria.com/code@1386 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/app.cpp
synfig-studio/trunk/src/gtkmm/canvasview.cpp

index 504d0a0..aeb07c2 100644 (file)
@@ -591,6 +591,7 @@ init_ui_manager()
 
        DEFINE_ACTION2("keyframe-properties", Gtk::StockID("gtk-properties"), _("Keyframe Properties"));
        DEFINE_ACTION("about", Gtk::StockID("synfig-about"));
+       DEFINE_ACTION("new", Gtk::Stock::NEW);
        DEFINE_ACTION("open", Gtk::Stock::OPEN);
        DEFINE_ACTION("save", Gtk::Stock::SAVE);
        DEFINE_ACTION("save-as", Gtk::Stock::SAVE_AS);
@@ -607,6 +608,7 @@ init_ui_manager()
        DEFINE_ACTION("options", _("Options"));
        DEFINE_ACTION("close", _("Close View"));
        DEFINE_ACTION("close-document", _("Close Document"));
+       DEFINE_ACTION("quit", Gtk::Stock::QUIT);
 
 
        DEFINE_ACTION("undo", Gtk::StockID("gtk-undo"));
@@ -709,6 +711,8 @@ init_ui_manager()
 "      </popup>"
 "      <popup name='menu-main' action='menu-main'>"
 "      <menu action='menu-file'>"
+"              <menuitem action='new' />"
+"              <menuitem action='open' />"
 "              <menuitem action='save' />"
 "              <menuitem action='save-as' />"
 "              <menuitem action='revert' />"
@@ -727,6 +731,7 @@ init_ui_manager()
 "              <menuitem action='options' />"
 "              <menuitem action='close' />"
 "              <menuitem action='close-document' />"
+"              <menuitem action='quit' />"
 "      </menu>"
 "      <menu action='menu-edit'>"
 "              <menuitem action='undo'/>"
index dcc436b..4f6dec9 100644 (file)
@@ -1180,6 +1180,12 @@ CanvasView::init_menus()
        action_group = Gtk::ActionGroup::create();
 
        //action_group->add( Gtk::Action::create("MenuFile", _("_File")) );
+       action_group->add( Gtk::Action::create("new", Gtk::Stock::NEW),
+               sigc::hide_return(sigc::ptr_fun(&studio::App::new_instance))
+       );
+       action_group->add( Gtk::Action::create("open", Gtk::Stock::OPEN),
+               sigc::hide_return(sigc::ptr_fun(&studio::App::dialog_open))
+       );
        action_group->add( Gtk::Action::create("save", Gtk::Stock::SAVE),
                hide_return(sigc::mem_fun(*get_instance().get(), &studio::Instance::save))
        );
@@ -1222,6 +1228,9 @@ CanvasView::init_menus()
        action_group->add( Gtk::Action::create("close-document", Gtk::StockID("gtk-close"), _("Close Document")),
                sigc::hide_return(sigc::mem_fun(*this,&studio::CanvasView::close_instance))
        );
+       action_group->add( Gtk::Action::create("quit", Gtk::StockID("gtk-quit"), _("Quit")),
+               sigc::hide_return(sigc::ptr_fun(&studio::App::quit))
+       );
 
        //action_group->add( Gtk::Action::create("undo", Gtk::StockID("gtk-undo")),
        //      SLOT_EVENT(EVENT_UNDO)