X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Fmain.cpp;h=081d5f7242f255fdca6b76573fcdf8556891fbfb;hb=b8b7bf129a4d7218e570102ee3c5cd7e584f0bcb;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..081d5f7 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 */ /* ========================================================================= */ @@ -38,6 +39,8 @@ #include +#include "general.h" + #endif /* === U S I N G =========================================================== */ @@ -83,7 +86,7 @@ static synfig::Waypoint::Interpolation interpolation_; /* === M E T H O D S ======================================================= */ -synfigapp::Main::Main(const synfig::String &basepath,ProgressCallback *cb): +synfigapp::Main::Main(const synfig::String &basepath, synfig::ProgressCallback *cb): synfig::Main(basepath,cb), ref_count_(synfigapp_ref_count_) { @@ -92,19 +95,24 @@ synfigapp::Main::Main(const synfig::String &basepath,ProgressCallback *cb): synfigapp_ref_count_.reset(); ref_count_=synfigapp_ref_count_; - + // Add initialization after this point + +#ifdef ENABLE_NLS + bindtextdomain("synfigstudio", LOCALEDIR); +#endif + 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 +127,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 +305,7 @@ synfigapp::Main::set_interpolation(synfig::Waypoint::Interpolation x) if(interpolation_!=x) { interpolation_=x; - + signal_interpolation_changed(); } } @@ -315,10 +323,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 +382,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