X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fmod_palette%2Fdock_paledit.cpp;h=ee0a975152d7479699e6c3f6a229ec4e9dd57a9f;hb=d07cf2aeaf95ac90d7eca16ab39a4c4bda9743e6;hp=a7167dbe39691dc7b607b2e2b280646478fac19a;hpb=02252941b29de64037116f4d37991a38d9ff0d94;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/mod_palette/dock_paledit.cpp b/synfig-studio/trunk/src/gtkmm/mod_palette/dock_paledit.cpp index a7167db..ee0a975 100644 --- a/synfig-studio/trunk/src/gtkmm/mod_palette/dock_paledit.cpp +++ b/synfig-studio/trunk/src/gtkmm/mod_palette/dock_paledit.cpp @@ -1,20 +1,21 @@ /* === S Y N F I G ========================================================= */ -/*! \file dialog_palette.cpp +/*! \file dock_paledit.cpp ** \brief Template File ** -** $Id: dock_paledit.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 */ /* ========================================================================= */ @@ -67,7 +68,7 @@ public: { dialog_palette->dialog_settings.add_domain(this,name); } - + virtual ~PaletteSettings() { dialog_palette->dialog_settings.remove_domain(name); @@ -82,7 +83,7 @@ public: value=strprintf("%f %f %f %f",c.get_r(),c.get_g(),c.get_b(),c.get_a()); return true; } - + virtual bool set_value(const synfig::String& key,const synfig::String& value) { int i(atoi(key.c_str())); @@ -96,11 +97,11 @@ public: dialog_palette->set_color(Color(r,g,b,a),i); return true; } - + virtual KeyList get_key_list()const { synfigapp::Settings::KeyList ret(synfigapp::Settings::get_key_list()); - + int i; for(i=0;isize();i++) ret.push_back(strprintf("%03d",i)); @@ -116,7 +117,7 @@ Dock_PalEdit::Dock_PalEdit(): Dockable("pal_edit",_("Palette Editor"),Gtk::StockID("gtk-select-color")), //palette_settings(new PaletteSettings(this,"colors")), table(2,2,false) -{ +{ action_group=Gtk::ActionGroup::create(); DEBUGPOINT(); action_group->add(Gtk::Action::create( @@ -130,7 +131,7 @@ Dock_PalEdit::Dock_PalEdit(): &Dock_PalEdit::on_add_pressed ) ); - + App::ui_manager()->insert_action_group(action_group); Glib::ustring ui_info = @@ -144,7 +145,7 @@ Dock_PalEdit::Dock_PalEdit(): App::ui_manager()->add_ui_from_string(ui_info); set_toolbar(*dynamic_cast(App::ui_manager()->get_widget("/toolbar-palette"))); - + /* add_button( Gtk::StockID("gtk-add"), @@ -156,12 +157,12 @@ Dock_PalEdit::Dock_PalEdit(): ) ); */ - + add(table); table.set_homogeneous(true); - + set_default_palette(); - + show_all_children(); } @@ -246,10 +247,10 @@ void Dock_PalEdit::refresh() { const int width(12); - + // Clear the table table.foreach(sigc::mem_fun(table,&Gtk::Table::remove)); - + for(int i=0;i