X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Fmain.cpp;h=ef9df7214c057001a4ee4ebfb4bbcd706f4b343b;hb=15927373be09b6ef5a53e816ba93862fdcdaf545;hp=9fa861df8be4d380dc3ff677e24ce610c6106782;hpb=02252941b29de64037116f4d37991a38d9ff0d94;p=synfig.git diff --git a/synfig-studio/trunk/src/synfigapp/main.cpp b/synfig-studio/trunk/src/synfigapp/main.cpp index 9fa861d..ef9df72 100644 --- a/synfig-studio/trunk/src/synfigapp/main.cpp +++ b/synfig-studio/trunk/src/synfigapp/main.cpp @@ -1,20 +1,21 @@ /* === S Y N F I G ========================================================= */ -/*! \file main.cpp +/*! \file synfigapp/main.cpp ** \brief Template File ** -** $Id: main.cpp,v 1.1.1.1 2005/01/07 03:34:37 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 */ /* ========================================================================= */ @@ -92,19 +93,19 @@ synfigapp::Main::Main(const synfig::String &basepath,ProgressCallback *cb): synfigapp_ref_count_.reset(); ref_count_=synfigapp_ref_count_; - + // Add initialization after this point action_main=new synfigapp::Action::Main(); settings_.construct(); - + signal_foreground_color_changed_.construct(); signal_background_color_changed_.construct(); signal_gradient_changed_.construct(); signal_opacity_changed_.construct(); signal_blend_method_changed_.construct(); signal_interpolation_changed_.construct(); - + set_foreground_color(Color::black()); set_background_color(Color::white()); set_gradient_default_colors(); @@ -119,14 +120,14 @@ synfigapp::Main::~Main() if(!synfigapp_ref_count_.unique()) return; synfigapp_ref_count_.detach(); - + // Add deinitialization after this point - delete action_main; - + delete action_main; + selected_input_device_=0; input_devices_.clear(); - + settings_.destruct(); signal_foreground_color_changed_.destruct(); signal_background_color_changed_.destruct(); @@ -297,7 +298,7 @@ synfigapp::Main::set_interpolation(synfig::Waypoint::Interpolation x) if(interpolation_!=x) { interpolation_=x; - + signal_interpolation_changed(); } } @@ -315,10 +316,10 @@ synfigapp::Main::set_bline_width(synfig::Distance x) if(x!=bline_width_) { bline_width_=x; - + if(selected_input_device_) selected_input_device_->set_bline_width(x); - + signal_bline_width_changed()(); } } @@ -374,23 +375,23 @@ bool synfigapp::Main::select_input_device(InputDevice::Handle input_device) { assert(input_device); - - synfig::info("Input device changed to \"%s\"",input_device->get_id().c_str()); - + + // synfig::info("Input device changed to \"%s\"",input_device->get_id().c_str()); + selected_input_device_=input_device; - set_bline_width(input_device->get_bline_width()); + set_bline_width(input_device->get_bline_width()); set_foreground_color(input_device->get_foreground_color()); - set_opacity(input_device->get_opacity()); - set_blend_method(input_device->get_blend_method()); - + set_opacity(input_device->get_opacity()); + set_blend_method(input_device->get_blend_method()); + return true; } InputDevice::Handle synfigapp::Main::get_selected_input_device() { - return selected_input_device_; + return selected_input_device_; } void