X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Finputdevice.cpp;h=4169471c2dfce8aa5d40bff45b9d862aceb6f42e;hb=3624aac2a6e2dc3824ae22e99e2608f93f285e61;hp=b6d7f2f8a6f5b2b293a56672cf6de3c4619ffd31;hpb=02252941b29de64037116f4d37991a38d9ff0d94;p=synfig.git diff --git a/synfig-studio/trunk/src/synfigapp/inputdevice.cpp b/synfig-studio/trunk/src/synfigapp/inputdevice.cpp index b6d7f2f..4169471 100644 --- a/synfig-studio/trunk/src/synfigapp/inputdevice.cpp +++ b/synfig-studio/trunk/src/synfigapp/inputdevice.cpp @@ -2,19 +2,20 @@ /*! \file inputdevice.cpp ** \brief Template File ** -** $Id: inputdevice.cpp,v 1.2 2005/01/12 04:08:32 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 */ /* ========================================================================= */ @@ -34,6 +35,8 @@ #include #include "main.h" +#include "general.h" + #endif /* === U S I N G =========================================================== */ @@ -53,7 +56,7 @@ class DeviceSettings : public Settings public: DeviceSettings(InputDevice* input_device): input_device(input_device) { } - + virtual bool get_value(const synfig::String& key, synfig::String& value)const { @@ -84,13 +87,12 @@ public: return true; } - + return Settings::get_value(key, value); } - + virtual bool set_value(const synfig::String& key,const synfig::String& value) { - DEBUGPOINT(); if(key=="state") { input_device->set_state(value); @@ -119,10 +121,10 @@ public: input_device->set_foreground_color(synfig::Color(r,g,b,a)); return true; } - + return Settings::set_value(key, value); } - + virtual KeyList get_key_list()const { KeyList ret(Settings::get_key_list()); @@ -171,14 +173,14 @@ InputDevice::InputDevice(const synfig::String id_, Type type_): state_="normal"; break; } - + device_settings=new DeviceSettings(this); Main::settings().add_domain(device_settings,"input_device."+id_); } InputDevice::~InputDevice() { - Main::settings().remove_domain("input_device."+id_); + Main::settings().remove_domain("input_device."+id_); delete device_settings; }