From: dooglus Date: Sat, 16 Feb 2008 11:17:47 +0000 (+0000) Subject: Reorder the waypoint menus. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=27fd021972098030939c8c811a3c529f5d3c7209;p=synfig.git Reorder the waypoint menus. git-svn-id: http://svn.voria.com/code@1714 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 67cd63f..d0b1026 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -3202,56 +3202,51 @@ CanvasView::on_waypoint_clicked_canvasview(synfigapp::ValueDesc value_desc, Gtk::Menu* interp_menu_out(manage(new Gtk::Menu())); Gtk::Menu* interp_menu_both(manage(new Gtk::Menu())); - waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_In"), *interp_menu_in)); - waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Out"), *interp_menu_out)); - waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Both"), *interp_menu_both)); - - // ------------------------------------------------------------------------ - Waypoint::Model model; - - model.reset(); model.set_before(INTERPOLATION_TCB); - interp_menu_in->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_TCB"), - sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); - model.reset(); model.set_after(INTERPOLATION_TCB); - interp_menu_out->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_TCB"), - sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); - model.set_before(INTERPOLATION_TCB); - interp_menu_both->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_TCB"), - sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); - - model.reset(); model.set_before(INTERPOLATION_LINEAR); - interp_menu_in->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Linear"), - sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); - model.reset(); model.set_after(INTERPOLATION_LINEAR); - interp_menu_out->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Linear"), - sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); - model.set_before(INTERPOLATION_LINEAR); - interp_menu_both->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Linear"), - sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); - - model.reset(); model.set_before(INTERPOLATION_HALT); - interp_menu_in->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Ease In"), - sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); - model.reset(); model.set_after(INTERPOLATION_HALT); - interp_menu_out->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Ease Out"), - sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); - model.set_before(INTERPOLATION_HALT); - interp_menu_both->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Ease In/Out"), - sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); - - model.reset(); model.set_before(INTERPOLATION_CONSTANT); - interp_menu_in->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Constant"), - sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); - model.reset(); model.set_after(INTERPOLATION_CONSTANT); - interp_menu_out->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Constant"), - sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); - model.set_before(INTERPOLATION_CONSTANT); - interp_menu_both->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Constant"), - sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + { + Waypoint::Model model; + + model.reset(); model.set_before(INTERPOLATION_TCB); + interp_menu_in->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_TCB"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + model.reset(); model.set_after(INTERPOLATION_TCB); + interp_menu_out->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_TCB"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + model.set_before(INTERPOLATION_TCB); + interp_menu_both->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_TCB"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + + model.reset(); model.set_before(INTERPOLATION_LINEAR); + interp_menu_in->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Linear"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + model.reset(); model.set_after(INTERPOLATION_LINEAR); + interp_menu_out->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Linear"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + model.set_before(INTERPOLATION_LINEAR); + interp_menu_both->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Linear"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + + model.reset(); model.set_before(INTERPOLATION_HALT); + interp_menu_in->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Ease In"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + model.reset(); model.set_after(INTERPOLATION_HALT); + interp_menu_out->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Ease Out"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + model.set_before(INTERPOLATION_HALT); + interp_menu_both->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Ease In/Out"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + + model.reset(); model.set_before(INTERPOLATION_CONSTANT); + interp_menu_in->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Constant"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + model.reset(); model.set_after(INTERPOLATION_CONSTANT); + interp_menu_out->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Constant"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + model.set_before(INTERPOLATION_CONSTANT); + interp_menu_both->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Constant"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + } // ------------------------------------------------------------------------ - waypoint_menu->items().push_back(Gtk::Menu_Helpers::SeparatorElem()); - waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Jump To"), sigc::bind(sigc::mem_fun(*canvas_interface(), &synfigapp::CanvasInterface::set_time), time))); @@ -3265,6 +3260,15 @@ CanvasView::on_waypoint_clicked_canvasview(synfigapp::ValueDesc value_desc, waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Edit"), sigc::mem_fun(waypoint_dialog,&Gtk::Widget::show))); + // ------------------------------------------------------------------------ + waypoint_menu->items().push_back(Gtk::Menu_Helpers::SeparatorElem()); + + // ------------------------------------------------------------------------ + waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Both"), *interp_menu_both)); + waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_In"), *interp_menu_in)); + waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Out"), *interp_menu_out)); + + // ------------------------------------------------------------------------ waypoint_menu->popup(button+1,gtk_get_current_event_time()); } break;