Fix 1677632: newly drawn lines are joined on to existing lines and ducks wherever...
[synfig.git] / synfig-studio / trunk / src / gtkmm / state_width.cpp
index fcf20e1..d9d7697 100644 (file)
@@ -1,20 +1,21 @@
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
 /*!    \file state_gradient.cpp
 **     \brief Template File
 **
 **     $Id: state_width.cpp,v 1.1.1.1 2005/01/07 03:34:37 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
 */
 /* ========================================================================= */
 
 #include <ETL/bezier>
 
-#include <sinfg/valuenode_dynamiclist.h>
-#include <sinfgapp/action_system.h>
+#include <synfig/valuenode_dynamiclist.h>
+#include <synfigapp/action_system.h>
 
 #include "state_width.h"
 #include "canvasview.h"
 #include "workarea.h"
 #include "app.h"
 
-#include <sinfgapp/action.h>
+#include <synfigapp/action.h>
 #include "event_mouse.h"
 #include "event_layerclick.h"
 #include "toolbox.h"
@@ -49,8 +50,8 @@
 #include <gtkmm/optionmenu.h>
 #include "duck.h"
 
-//#include <sinfgapp/value_desc.h>
-#include <sinfgapp/main.h>
+//#include <synfigapp/value_desc.h>
+#include <synfigapp/main.h>
 
 #include <ETL/clock>
 
@@ -60,8 +61,8 @@
 
 using namespace std;
 using namespace etl;
-using namespace sinfg;
-using namespace sinfgapp;
+using namespace synfig;
+using namespace synfigapp;
 using namespace studio;
 
 /* === M A C R O S ========================================================= */
@@ -97,7 +98,7 @@ class studio::StateWidth_Context : public sigc::trackable
        Duckmatic::Type old_duckmask;
                
        //Toolbox settings
-       sinfgapp::Settings& settings;
+       synfigapp::Settings& settings;
        
        //Toolbox display
        Gtk::Table options_table;
@@ -139,8 +140,8 @@ public:
 
        //Canvas interaction
        const etl::handle<CanvasView>& get_canvas_view()const{return canvas_view_;}
-       etl::handle<sinfgapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
-       sinfg::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
+       etl::handle<synfigapp::CanvasInterface> get_canvas_interface()const{return canvas_view_->canvas_interface();}
+       synfig::Canvas::Handle get_canvas()const{return canvas_view_->get_canvas();}
        WorkArea * get_work_area()const{return canvas_view_->get_work_area();}
        
        //Modifying settings etc.
@@ -211,7 +212,7 @@ StateWidth_Context::StateWidth_Context(CanvasView* canvas_view):
        prev_workarea_duck_clicking(get_work_area()->allow_duck_clicks),
        old_duckmask(get_work_area()->get_type_mask()),
 
-       settings(sinfgapp::Main::get_selected_input_device()->settings()),
+       settings(synfigapp::Main::get_selected_input_device()->settings()),
        
        adj_delta(6,0,1,0.001,0.01),
        spin_delta(adj_delta,0.01,3),
@@ -557,7 +558,7 @@ StateWidth_Context::event_mouse_handler(const Smach::event& x)
                //Affect the width changes here...
                map<handle<Duck>,Real>::iterator i = changetable.begin();
 
-               sinfgapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("Sketch Width")); 
+               synfigapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("Sketch Width")); 
                for(; i != changetable.end(); ++i)
                {
                        //for each duck modify IT!!!
@@ -578,7 +579,7 @@ StateWidth_Context::event_mouse_handler(const Smach::event& x)
                                if(!action->is_ready() || !get_canvas_view()->get_instance()->perform_action(action))
                                {
                                        group.cancel();
-                                       sinfg::warning("Changing the width action has failed");
+                                       synfig::warning("Changing the width action has failed");
                                        return Smach::RESULT_ERROR;
                                }
                        }