X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fstate_width.cpp;h=1c7ef4ff2824cb4b00f5d867f9e5fee36e3d7142;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=468377fd006a6e0dd07374f375d7e65124ce8eec;hpb=5726d46f40700c68355465b757d93ef0e47c914e;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/state_width.cpp b/synfig-studio/trunk/src/gtkmm/state_width.cpp index 468377f..1c7ef4f 100644 --- a/synfig-studio/trunk/src/gtkmm/state_width.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_width.cpp @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -55,6 +56,8 @@ #include +#include "general.h" + #endif /* === U S I N G =========================================================== */ @@ -103,8 +106,6 @@ class studio::StateWidth_Context : public sigc::trackable //Toolbox display Gtk::Table options_table; - //Gtk::Entry entry_id; //what to name the layer - Gtk::Adjustment adj_delta; Gtk::SpinButton spin_delta; @@ -149,7 +150,7 @@ public: void save_settings(); void reset(); -}; // END of class StateGradient_Context +}; // END of class StateWidth_Context /* === M E T H O D S ======================================================= */ @@ -184,11 +185,11 @@ StateWidth_Context::load_settings() else set_radius(15); - //defaults to true - if(settings.get_value("width.relative",value) && value == "0") - set_relative(false); - else + //defaults to false + if(settings.get_value("width.relative",value) && value == "1") set_relative(true); + else + set_relative(false); } void @@ -214,10 +215,10 @@ StateWidth_Context::StateWidth_Context(CanvasView* canvas_view): settings(synfigapp::Main::get_selected_input_device()->settings()), - adj_delta(6,0,1,0.001,0.01), + adj_delta(6,0,20,0.01,0.1), spin_delta(adj_delta,0.01,3), - adj_radius(0,0,1e50,1,10), + adj_radius(200,0,1e50,1,10), spin_radius(adj_radius,1,1), check_relative(_("Relative Growth")) @@ -225,17 +226,16 @@ StateWidth_Context::StateWidth_Context(CanvasView* canvas_view): load_settings(); // Set up the tool options dialog - //options_table.attach(*manage(new Gtk::Label(_("Width Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); - //options_table.attach(entry_id, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); + options_table.attach(*manage(new Gtk::Label(_("Width Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); //expand stuff - options_table.attach(*manage(new Gtk::Label(_("Growth:"))), 0, 1, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); - options_table.attach(spin_delta, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); + options_table.attach(*manage(new Gtk::Label(_("Growth:"))), 0, 1, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); + options_table.attach(spin_delta, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); - options_table.attach(*manage(new Gtk::Label(_("Radius:"))), 0, 1, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); - options_table.attach(spin_radius, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); + options_table.attach(*manage(new Gtk::Label(_("Radius:"))), 0, 1, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); + options_table.attach(spin_radius, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); - options_table.attach(check_relative, 0, 2, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); + options_table.attach(check_relative, 0, 2, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); options_table.show_all(); @@ -565,7 +565,7 @@ StateWidth_Context::event_mouse_handler(const Smach::event& x) if( desc.get_value_type() == ValueBase::TYPE_REAL ) { - Action::Handle action(Action::create("value_desc_set")); + Action::Handle action(Action::create("ValueDescSet")); assert(action); action->set_param("canvas",get_canvas());