Correcting revision 251. We should include <gtkmm/tooltips.h> into preview.h, not...
[synfig.git] / synfig-studio / trunk / src / gtkmm / keyframetreestore.cpp
index 4e17af4..24d980d 100644 (file)
@@ -5,16 +5,17 @@
 **     $Id: keyframetreestore.cpp,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $
 **
 **     \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
 */
 /* ========================================================================= */
@@ -222,7 +223,7 @@ KeyframeTreeStore::create(etl::loose_handle<synfigapp::CanvasInterface> canvas_i
 void
 KeyframeTreeStore::reset_stamp()
 {
-       stamp_=time(0)+reinterpret_cast<int>(this);
+       stamp_=time(0)+reinterpret_cast<long>(this);
 }
 
 /*
@@ -356,7 +357,6 @@ KeyframeTreeStore::set_value_impl(const Gtk::TreeModel::iterator& row, int colum
                                return;
                        }
                        
-                       // New Method
                        {
                                Keyframe keyframe((*row)[model.keyframe]);
                                synfigapp::Action::Handle action(synfigapp::Action::create("keyframe_set_delta"));
@@ -371,68 +371,6 @@ KeyframeTreeStore::set_value_impl(const Gtk::TreeModel::iterator& row, int colum
                                canvas_interface()->get_instance()->perform_action(action);
                        }
                        
-                       
-                       if(0)
-                       {       // Old Method The slowest method EVER!!!
-                               OneMoment one_moment;
-                               
-                               // Create the action group
-                               synfigapp::Action::PassiveGrouper group(canvas_interface()->get_instance().get(),_("Adjust Time"));
-                               synfigapp::PushMode push_mode(canvas_interface(), synfigapp::MODE_NORMAL);
-                               
-                               Gtk::TreeModel::iterator iter(row);
-                               if(change_delta<0)
-                               {
-                                       //DEBUGPOINT();
-                                       KeyframeList keyframe_list(get_canvas()->keyframe_list());
-                                       synfig::KeyframeList::iterator iter(keyframe_list.find((*row)[model.keyframe]));
-                                       //DEBUGPOINT();
-                                       for(;iter!=keyframe_list.end();++iter)
-                                       {
-                                       //DEBUGPOINT();
-                                               synfig::Keyframe keyframe(*iter);
-
-                                               keyframe.set_time(keyframe.get_time()+change_delta);
-                       
-                                               synfigapp::Action::Handle action(synfigapp::Action::create("keyframe_set"));
-                       
-                                               if(!action)return;
-                                               
-                                               action->set_param("canvas",canvas_interface()->get_canvas());
-                                               action->set_param("canvas_interface",canvas_interface());
-                                               action->set_param("keyframe",keyframe);
-                                               
-                                               canvas_interface()->get_instance()->perform_action(action);
-                                       }
-                               }
-                               else
-                               {
-                                       //DEBUGPOINT();
-                                       KeyframeList keyframe_list(get_canvas()->keyframe_list());
-                                       synfig::KeyframeList::reverse_iterator end(keyframe_list.find((*row)[model.keyframe]));
-                                       synfig::KeyframeList::reverse_iterator iter(keyframe_list.rbegin());
-                                       //end++;
-                                       //DEBUGPOINT();
-                                       for(;iter!=end;++iter)
-                                       {
-                                       //DEBUGPOINT();
-                                               synfig::Keyframe keyframe(*iter);
-
-                                               keyframe.set_time(keyframe.get_time()+change_delta);
-                       
-                                               synfigapp::Action::Handle action(synfigapp::Action::create("keyframe_set"));
-                       
-                                               if(!action)return;
-                                               
-                                               action->set_param("canvas",canvas_interface()->get_canvas());
-                                               action->set_param("canvas_interface",canvas_interface());
-                                               action->set_param("keyframe",keyframe);
-                                               
-                                               canvas_interface()->get_instance()->perform_action(action);
-                                       }
-                               }
-                       }
-                       
                        return;
                }
                else