X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fdock_layers.cpp;h=03d9d5963ab413702206a35cfc606306f18969ac;hb=e94afbea92edb78826bff981ddc84b0757b2550f;hp=0c596b286eef2e0a481c65b2b8b2fb0acc6e68dd;hpb=02252941b29de64037116f4d37991a38d9ff0d94;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/dock_layers.cpp b/synfig-studio/trunk/src/gtkmm/dock_layers.cpp index 0c596b2..03d9d59 100644 --- a/synfig-studio/trunk/src/gtkmm/dock_layers.cpp +++ b/synfig-studio/trunk/src/gtkmm/dock_layers.cpp @@ -2,19 +2,20 @@ /*! \file dock_layers.cpp ** \brief Template File ** -** $Id: dock_layers.cpp,v 1.2 2005/01/12 07:03:42 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 */ /* ========================================================================= */ @@ -75,7 +76,7 @@ Dock_Layers::Dock_Layers(): action_group_new_layers=Gtk::ActionGroup::create(); action_group_layer_ops=Gtk::ActionGroup::create(); - + std::map category_map; // Build layer creation actions @@ -83,10 +84,10 @@ Dock_Layers::Dock_Layers(): for(iter=synfig::Layer::book().begin();iter!=synfig::Layer::book().end();++iter) { synfig::Layer::Book::value_type lyr(*iter); - + if(lyr.second.category==_("Do Not Use")) continue; - + action_group_new_layers->add(Gtk::Action::create( strprintf("layer-new-%s",lyr.first.c_str()), layer_icon(lyr.first.c_str()), @@ -101,15 +102,15 @@ Dock_Layers::Dock_Layers(): ); category_map[lyr.second.category]+=strprintf("",lyr.first.c_str()); - + //(*category_map)[lyr.second.category]->items().push_back(Gtk::Menu_Helpers::MenuElem(lyr.second.local_name, //)); } - + { Glib::RefPtr action_group_categories(Gtk::ActionGroup::create("layer-category")); synfig::String layer_ui_info; - + layer_ui_info+=""; std::map::iterator iter; @@ -120,13 +121,13 @@ Dock_Layers::Dock_Layers(): } layer_ui_info+=""; - + App::ui_manager()->insert_action_group(action_group_categories); App::ui_manager()->insert_action_group(action_group_new_layers); App::ui_manager()->add_ui_from_string(layer_ui_info); } - - + + action_group_layer_ops->add( Gtk::Action::create("toolbar-layer", "Layer Ops") ); App::ui_manager()->insert_action_group(action_group_layer_ops); @@ -149,7 +150,7 @@ Dock_Layers::Dock_Layers(): action_group_new_layers->set_sensitive(false); - set_toolbar(*dynamic_cast(App::ui_manager()->get_widget("/toolbar-layer"))); + set_toolbar(*dynamic_cast(App::ui_manager()->get_widget("/toolbar-layer"))); @@ -161,21 +162,21 @@ Dock_Layers::Dock_Layers(): { sigc::signal tmp_signal; - + tmp_signal.connect( sigc::bind( sigc::ptr_fun(do_nothing), ref_count ) ); - + synfig::info(__FILE__":%d:ref_count.count()=%d",__LINE__,ref_count.count()); tmp_signal(); synfig::info(__FILE__":%d:ref_count.count()=%d",__LINE__,ref_count.count()); - + tmp_signal.clear(); synfig::info(__FILE__":%d:ref_count.count()=%d",__LINE__,ref_count.count()); - + tmp_signal(); synfig::info(__FILE__":%d:ref_count.count()=%d",__LINE__,ref_count.count()); tmp_signal.connect( @@ -187,7 +188,7 @@ Dock_Layers::Dock_Layers(): synfig::info(__FILE__":%d:ref_count.count()=%d",__LINE__,ref_count.count()); } synfig::info(__FILE__":%d:ref_count.count()=%d",__LINE__,ref_count.count()); - assert(ref_count.count()==1); + assert(ref_count.count()==1); */ } @@ -239,7 +240,7 @@ Dock_Layers::changed_canvas_view_vfunc(etl::loose_handle canvas_view if(canvas_view) { Gtk::Widget* tree_view(canvas_view->get_ext_widget(get_name())); - + add(*tree_view); tree_view->show(); action_group_new_layers->set_sensitive(true); @@ -259,8 +260,8 @@ Dock_Layers::changed_canvas_view_vfunc(etl::loose_handle canvas_view layer_action_manager->set_canvas_interface(0); layer_action_manager->set_layer_tree(0); } - - clear_previous(); + + clear_previous(); } }