X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftags%2Fstable%2Fsrc%2Fgtkmm%2Fdialog_keyframe.cpp;h=9b0c08fba7ae1e0cae4c0d4c4bc471a77457bf1c;hb=a42ee14a3397a3fbb31d14e6eece4236620ae2db;hp=6f2196b83d639370b3e01e6412d27dc30dba9289;hpb=7c6d5426922cb3cda793f688dcd4d534b02765c8;p=synfig.git diff --git a/synfig-studio/tags/stable/src/gtkmm/dialog_keyframe.cpp b/synfig-studio/tags/stable/src/gtkmm/dialog_keyframe.cpp index 6f2196b..9b0c08f 100644 --- a/synfig-studio/tags/stable/src/gtkmm/dialog_keyframe.cpp +++ b/synfig-studio/tags/stable/src/gtkmm/dialog_keyframe.cpp @@ -1,20 +1,21 @@ -/* === S I N F G =========================================================== */ +/* === S Y N F I G ========================================================= */ /*! \file dialog_keyframe.cpp ** \brief Template File ** -** $Id: dialog_keyframe.cpp,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $ +** $Id$ ** ** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. ** \endlegal */ /* ========================================================================= */ @@ -32,8 +33,8 @@ #include #include #include "widget_waypointmodel.h" -#include -#include +#include +#include #endif @@ -41,7 +42,7 @@ using namespace std; using namespace etl; -using namespace sinfg; +using namespace synfig; using namespace studio; /* === M A C R O S ========================================================= */ @@ -52,7 +53,7 @@ using namespace studio; /* === M E T H O D S ======================================================= */ -Dialog_Keyframe::Dialog_Keyframe(Gtk::Window& parent,handle canvas_interface): +Dialog_Keyframe::Dialog_Keyframe(Gtk::Window& parent,handle canvas_interface): Gtk::Dialog(_("Keyframe Dialog"),parent,false,true), canvas_interface(canvas_interface) { @@ -62,17 +63,17 @@ Dialog_Keyframe::Dialog_Keyframe(Gtk::Window& parent,handleshow(); add_action_widget(*ok_button,2); ok_button->signal_clicked().connect(sigc::mem_fun(*this, &Dialog_Keyframe::on_ok_pressed)); - + /* Gtk::Button *apply_button(manage(new class Gtk::Button(Gtk::StockID("gtk-apply")))); apply_button->show(); add_action_widget(*apply_button,1); apply_button->signal_clicked().connect(sigc::mem_fun(*this, &Dialog_Keyframe::on_apply_pressed)); -*/ +*/ Gtk::Button *delete_button(manage(new class Gtk::Button(Gtk::StockID("gtk-delete")))); delete_button->show(); add_action_widget(*delete_button,3); delete_button->signal_clicked().connect(sigc::mem_fun(*this, &Dialog_Keyframe::on_delete_pressed)); - + Gtk::Button *cancel_button(manage(new class Gtk::Button(Gtk::StockID("gtk-close")))); cancel_button->show(); add_action_widget(*cancel_button,0); @@ -84,12 +85,12 @@ Dialog_Keyframe::Dialog_Keyframe(Gtk::Window& parent,handlepack_start(*table); entry_description.set_text("Not yet implemented"); - - //table->attach(*manage(new Gtk::Label(_("Description"))), 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + + //table->attach(*manage(new Gtk::Label(_("Description"))), 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); //table->attach(entry_description, 1, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); table->show_all(); - + widget_waypoint_model=Gtk::manage(new Widget_WaypointModel()); widget_waypoint_model->show(); table->attach(*widget_waypoint_model, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); @@ -100,14 +101,14 @@ Dialog_Keyframe::~Dialog_Keyframe() { } -const sinfg::Keyframe& +const synfig::Keyframe& Dialog_Keyframe::get_keyframe()const { return keyframe_; } void -Dialog_Keyframe::set_keyframe(const sinfg::Keyframe& x) +Dialog_Keyframe::set_keyframe(const synfig::Keyframe& x) { keyframe_=x; } @@ -117,16 +118,16 @@ Dialog_Keyframe::on_ok_pressed() { if(widget_waypoint_model->get_waypoint_model().is_trivial()) return; - - sinfgapp::Action::Handle action(sinfgapp::Action::create("keyframe_waypoint_set")); - + + synfigapp::Action::Handle action(synfigapp::Action::create("keyframe_waypoint_set")); + assert(action); - - action->set_param("canvas",canvas_interface->get_canvas()); - action->set_param("canvas_interface",canvas_interface); + + action->set_param("canvas",canvas_interface->get_canvas()); + action->set_param("canvas_interface",canvas_interface); action->set_param("keyframe",keyframe_); action->set_param("model",widget_waypoint_model->get_waypoint_model()); - + if(!canvas_interface->get_instance()->perform_action(action)) { }