Add new icon for the reset colors button and change the code to use it. Icon by genete.
[synfig.git] / synfig-studio / trunk / src / gtkmm / iconcontroller.cpp
index 4d90c55..8521c5a 100644 (file)
@@ -6,7 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-**     Copyright (c) 2007 Chris Moore
+**     Copyright (c) 2007, 2008 Chris Moore
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -147,6 +147,7 @@ IconController::IconController(const synfig::String& /*basepath*/)
        INIT_STOCK_ICON(string,"string_icon."IMAGE_EXT,_("Rename"));
        INIT_STOCK_ICON(gradient,"gradient_icon."IMAGE_EXT,_("Gradient"));
 
+       INIT_STOCK_ICON(reset_colors,"reset_colors_icon."IMAGE_EXT,_("Reset Colors"));
        INIT_STOCK_ICON(swap_colors,"swap_colors_icon."IMAGE_EXT,_("Swap Colors"));
        INIT_STOCK_ICON(value_node,"valuenode_icon."IMAGE_EXT,_("ValueNode"));
        INIT_STOCK_ICON(about,"about_icon."IMAGE_EXT,_("About"));
@@ -162,6 +163,8 @@ IconController::IconController(const synfig::String& /*basepath*/)
        INIT_STOCK_ICON(grid_snap_enable,"grid_snap_enable_icon."IMAGE_EXT,_("Enable Grid Snap"));
        INIT_STOCK_ICON(grid_snap_disable,"grid_snap_disable_icon."IMAGE_EXT,_("Disable Grid Snap"));
        INIT_STOCK_ICON(duplicate,"duplicate_icon."IMAGE_EXT,_("Duplicate"));
+       INIT_STOCK_ICON(encapsulate,"encapsulate_icon."IMAGE_EXT,_("Encapsulate"));
+       INIT_STOCK_ICON(select_all_child_layers,"select_all_child_layers_icon."IMAGE_EXT,_("Select All Child Layers"));
 
        INIT_STOCK_ICON(clear_undo,"clear_undo_icon."IMAGE_EXT,_("Clear Undo Stack"));
        INIT_STOCK_ICON(clear_redo,"clear_redo_icon."IMAGE_EXT,_("Clear Redo Stack"));
@@ -227,16 +230,11 @@ Gdk::Cursor
 IconController::get_tool_cursor(const Glib::ustring& name,const Glib::RefPtr<Gdk::Window>& window)
 {
        Glib::RefPtr<Gdk::Pixmap> pixmap;
-       DEBUGPOINT();
        pixmap=Gdk::Pixmap::create(window, 64, 64, 8);
-       DEBUGPOINT();
        pixmap->set_colormap(window->get_colormap());
        //pixmap->set_colormap(Gdk::Colormap::create(pixmap->get_visual(),false));
-       DEBUGPOINT();
        Glib::RefPtr<Gdk::Pixbuf> pixbuf;
-       DEBUGPOINT();
        pixbuf=Gtk::Button().render_icon(Gtk::StockID("synfig-"+name),Gtk::ICON_SIZE_SMALL_TOOLBAR);
-       DEBUGPOINT();
 
        pixbuf->render_to_drawable_alpha(
                pixmap,
@@ -259,12 +257,10 @@ IconController::get_tool_cursor(const Glib::ustring& name,const Glib::RefPtr<Gdk
                0,0 // Dither X,Y
        );
 */
-       DEBUGPOINT();
 
        Gdk::Color FG("#000000");
        Gdk::Color BG("#FF00FF");
 
-       DEBUGPOINT();
        return Gdk::Cursor(pixmap, pixmap, FG, BG, 0, 0);
 }
 
@@ -339,6 +335,11 @@ studio::get_tree_pixbuf(synfig::ValueBase::Type type)
        return _tree_pixbuf_table_value_type[int(type)];
 }
 
+#ifdef WIN32
+#define TEMPORARY_DELETE_MACRO DELETE
+#undef DELETE
+#endif
+
 Gtk::StockID
 studio::get_action_stock_id(const synfigapp::Action::BookEntry& action)
 {
@@ -359,6 +360,11 @@ studio::get_action_stock_id(const synfigapp::Action::BookEntry& action)
        return stock_id;
 }
 
+#ifdef WIN32
+#define DELETE TEMPORARY_DELETE_MACRO
+#undef TEMPORARY_DELETE_MACRO
+#endif
+
 Gtk::StockID
 studio::layer_icon(const synfig::String &layer)
 {