Added "--with-userdir" to configure script to change the default user settings directory
[synfig.git] / synfig-studio / trunk / src / gtkmm / mod_palette / dock_paledit.cpp
index 6b5e0a0..94a3dcb 100644 (file)
@@ -1,20 +1,21 @@
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
 /*!    \file dialog_palette.cpp
 **     \brief Template File
 **
 **     $Id: dock_paledit.cpp,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $
 **
 **     \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 <gtkmm/frame.h>
 #include <gtkmm/table.h>
 #include <gtkmm/label.h>
-#include <sinfg/general.h>
-#include <sinfgapp/canvasinterface.h>
-#include <sinfgapp/value_desc.h>
+#include <synfig/general.h>
+#include <synfigapp/canvasinterface.h>
+#include <synfigapp/value_desc.h>
 #include "../widget_color.h"
 #include <gtkmm/spinbutton.h>
 #include <gtkmm/menu.h>
-#include <sinfgapp/main.h>
+#include <synfigapp/main.h>
 #include "../app.h"
 #include "../dialog_color.h"
 
 
 using namespace std;
 using namespace etl;
-using namespace sinfg;
+using namespace synfig;
 using namespace studio;
 
 /* === M A C R O S ========================================================= */
 
 /* === G L O B A L S ======================================================= */
 /*
-class studio::PaletteSettings : public sinfgapp::Settings
+class studio::PaletteSettings : public synfigapp::Settings
 {
        Dock_PalEdit* dialog_palette;
-       sinfg::String name;
+       synfig::String name;
 public:
-       PaletteSettings(Dock_PalEdit* window,const sinfg::String& name):
+       PaletteSettings(Dock_PalEdit* window,const synfig::String& name):
                dialog_palette(window),
                name(name)
        {
@@ -73,7 +74,7 @@ public:
                dialog_palette->dialog_settings.remove_domain(name);
        }
 
-       virtual bool get_value(const sinfg::String& key, sinfg::String& value)const
+       virtual bool get_value(const synfig::String& key, synfig::String& value)const
        {
                int i(atoi(key.c_str()));
                if(i<0 || i>=dialog_palette->size())
@@ -83,7 +84,7 @@ public:
                return true;
        }
        
-       virtual bool set_value(const sinfg::String& key,const sinfg::String& value)
+       virtual bool set_value(const synfig::String& key,const synfig::String& value)
        {
                int i(atoi(key.c_str()));
                if(i<0)
@@ -99,7 +100,7 @@ public:
        
        virtual KeyList get_key_list()const
        {
-               sinfgapp::Settings::KeyList ret(sinfgapp::Settings::get_key_list());
+               synfigapp::Settings::KeyList ret(synfigapp::Settings::get_key_list());
        
                int i;
                for(i=0;i<dialog_palette->size();i++)
@@ -171,7 +172,7 @@ Dock_PalEdit::~Dock_PalEdit()
 }
 
 void
-Dock_PalEdit::set_palette(const sinfg::Palette& x)
+Dock_PalEdit::set_palette(const synfig::Palette& x)
 {
        palette_=x;
        refresh();
@@ -180,7 +181,7 @@ Dock_PalEdit::set_palette(const sinfg::Palette& x)
 void
 Dock_PalEdit::on_add_pressed()
 {
-       add_color(sinfgapp::Main::get_foreground_color());
+       add_color(synfigapp::Main::get_foreground_color());
 }
 
 void
@@ -212,7 +213,7 @@ Dock_PalEdit::show_menu(int i)
 }
 
 int
-Dock_PalEdit::add_color(const sinfg::Color& x)
+Dock_PalEdit::add_color(const synfig::Color& x)
 {
        palette_.push_back(x);
        signal_changed()();
@@ -221,7 +222,7 @@ Dock_PalEdit::add_color(const sinfg::Color& x)
 }
 
 void
-Dock_PalEdit::set_color(sinfg::Color x, int i)
+Dock_PalEdit::set_color(synfig::Color x, int i)
 {
        palette_[i].color=x;
        signal_changed()();
@@ -292,7 +293,7 @@ Dock_PalEdit::edit_color(int i)
 void
 Dock_PalEdit::select_color(int i)
 {
-       sinfgapp::Main::set_foreground_color(get_color(i));
+       synfigapp::Main::set_foreground_color(get_color(i));
 }
                
 void