X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fwidget_waypointmodel.cpp;h=28dacd54cc7bc48d6834ff4cae59c96a7c0e0984;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=4d8ba2ac2fa0ce01dedff040cb0e263b90cfc5e6;hpb=ce408de81ca266b1f334ee9bc6c8fb7ba1492ed4;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/widget_waypointmodel.cpp b/synfig-studio/trunk/src/gtkmm/widget_waypointmodel.cpp index 4d8ba2a..28dacd5 100644 --- a/synfig-studio/trunk/src/gtkmm/widget_waypointmodel.cpp +++ b/synfig-studio/trunk/src/gtkmm/widget_waypointmodel.cpp @@ -1,11 +1,12 @@ /* === S Y N F I G ========================================================= */ -/*! \file dialog_waypointmodel.cpp +/*! \file widget_waypointmodel.cpp ** \brief Template Header ** -** $Id: widget_waypointmodel.cpp,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $ +** $Id$ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Paul Wise ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -38,6 +39,8 @@ #include #include "widget_time.h" #include "widget_waypointmodel.h" +#include "general.h" + #endif using namespace synfig; @@ -67,18 +70,18 @@ Widget_WaypointModel::Widget_WaypointModel(): checkbutton_temporal_tension(_("Temporal Tension:")) { before_options=manage(new class Gtk::Menu()); - before_options->items().push_back(Gtk::Menu_Helpers::MenuElem("TCB Smooth")); - before_options->items().push_back(Gtk::Menu_Helpers::MenuElem("Constant")); - before_options->items().push_back(Gtk::Menu_Helpers::MenuElem("Linear")); - before_options->items().push_back(Gtk::Menu_Helpers::MenuElem("Ease In")); - before_options->items().push_back(Gtk::Menu_Helpers::MenuElem("Manual")); + before_options->items().push_back(Gtk::Menu_Helpers::MenuElem(_("TCB Smooth"))); + before_options->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Constant"))); + before_options->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Linear"))); + before_options->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Ease In"))); + // before_options->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Manual"))); after_options=manage(new class Gtk::Menu()); - after_options->items().push_back(Gtk::Menu_Helpers::MenuElem("TCB Smooth")); - after_options->items().push_back(Gtk::Menu_Helpers::MenuElem("Constant")); - after_options->items().push_back(Gtk::Menu_Helpers::MenuElem("Linear")); - after_options->items().push_back(Gtk::Menu_Helpers::MenuElem("Ease Out")); - after_options->items().push_back(Gtk::Menu_Helpers::MenuElem("Manual")); + after_options->items().push_back(Gtk::Menu_Helpers::MenuElem(_("TCB Smooth"))); + after_options->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Constant"))); + after_options->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Linear"))); + after_options->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Ease Out"))); + // after_options->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Manual"))); before=manage(new class Gtk::OptionMenu()); before->show(); @@ -103,7 +106,7 @@ Widget_WaypointModel::Widget_WaypointModel(): checkbutton_continuity.signal_toggled().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change)); checkbutton_bias.signal_toggled().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change)); checkbutton_temporal_tension.signal_toggled().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change)); - + adj_tension.signal_value_changed().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change)); adj_continuity.signal_value_changed().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change)); adj_bias.signal_value_changed().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change)); @@ -111,19 +114,19 @@ Widget_WaypointModel::Widget_WaypointModel(): before->signal_changed().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change)); after->signal_changed().connect(sigc::mem_fun(*this,&Widget_WaypointModel::on_change)); - - attach(checkbutton_before, 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + + attach(checkbutton_before, 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); attach(*before, 1, 2, 0,1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); - attach(checkbutton_after, 2, 3, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + attach(checkbutton_after, 2, 3, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); attach(*after, 3, 4, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); - attach(checkbutton_tension, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + attach(checkbutton_tension, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); attach(*spin_tension, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); - attach(checkbutton_continuity, 2, 3, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + attach(checkbutton_continuity, 2, 3, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); attach(*spin_continuity, 3, 4, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); - attach(checkbutton_bias, 0, 1, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + attach(checkbutton_bias, 0, 1, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); attach(*spin_bias, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); - attach(checkbutton_temporal_tension, 2, 3, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + attach(checkbutton_temporal_tension, 2, 3, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); attach(*spin_temporal_tension, 3, 4, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); show_all(); @@ -137,7 +140,7 @@ Widget_WaypointModel::on_change() { if(updating) return; - + waypoint_model.set_before((Waypoint::Interpolation)before->get_history()); waypoint_model.set_after((Waypoint::Interpolation)after->get_history()); @@ -152,7 +155,7 @@ Widget_WaypointModel::on_change() waypoint_model.set_continuity_flag(checkbutton_continuity.get_active()); waypoint_model.set_bias_flag(checkbutton_bias.get_active()); waypoint_model.set_temporal_tension_flag(checkbutton_temporal_tension.get_active()); - + before->set_sensitive(checkbutton_before.get_active()); after->set_sensitive(checkbutton_after.get_active()); spin_tension->set_sensitive(checkbutton_tension.get_active()); @@ -166,7 +169,7 @@ Widget_WaypointModel::set_waypoint_model(synfig::Waypoint::Model &x) { waypoint_model=x; updating=true; - + before->set_history((int)waypoint_model.get_before()); after->set_history((int)waypoint_model.get_after()); @@ -174,15 +177,15 @@ Widget_WaypointModel::set_waypoint_model(synfig::Waypoint::Model &x) adj_continuity.set_value(waypoint_model.get_continuity()); adj_bias.set_value(waypoint_model.get_bias()); adj_temporal_tension.set_value(waypoint_model.get_temporal_tension()); - + checkbutton_before.set_active(waypoint_model.get_before_flag()); checkbutton_after.set_active(waypoint_model.get_after_flag()); checkbutton_tension.set_active(waypoint_model.get_tension_flag()); checkbutton_continuity.set_active(waypoint_model.get_continuity_flag()); checkbutton_bias.set_active(waypoint_model.get_bias_flag()); checkbutton_temporal_tension.set_active(waypoint_model.get_temporal_tension_flag()); - + updating=false; - + on_change(); }