/* === 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
*/
/* ========================================================================= */
#include <list>
+#include "general.h"
+
#endif
/* === U S I N G =========================================================== */
/* === 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_)
{
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();
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();
if(interpolation_!=x)
{
interpolation_=x;
-
+
signal_interpolation_changed();
}
}
if(x!=bline_width_)
{
bline_width_=x;
-
+
if(selected_input_device_)
selected_input_device_->set_bline_width(x);
-
+
signal_bline_width_changed()();
}
}
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_background_color(input_device->get_background_color());
+ 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