**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-** Copyright (c) 2007 Chris Moore
+** Copyright (c) 2007, 2008 Chris Moore
+** Copyright (c) 2008 Paul Wise
+** Copyright (c) 2009 Gerco Ballintijn
+** Copyright (c) 2009 Carlos López
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
std::string path_to_icons;
#ifdef WIN32
- path_to_icons=basepath+"/../"+IMAGE_DIR;
+ path_to_icons=basepath+ETL_DIRECTORY_SEPARATOR+".."+ETL_DIRECTORY_SEPARATOR+IMAGE_DIR;
#else
path_to_icons=IMAGE_DIR;
#endif
if(synfig_root) {
path_to_icons=synfig_root;
path_to_icons+=ETL_DIRECTORY_SEPARATOR;
-
- path_to_icons+="share/pixmaps/synfigstudio";
+ path_to_icons+="share";
+ path_to_icons+=ETL_DIRECTORY_SEPARATOR;
+ path_to_icons+="pixmaps";
+ path_to_icons+=ETL_DIRECTORY_SEPARATOR;
+ path_to_icons+="synfigstudio";
}
path_to_icons+=ETL_DIRECTORY_SEPARATOR;
stock_##name=Gtk::StockItem(Gtk::StockID("synfig-" #name),desc); \
Gtk::Stock::add(stock_##name);
- INIT_STOCK_ICON(swap_colors,"swap_colors_icon."IMAGE_EXT,_("Swap Colors"));
- INIT_STOCK_ICON(canvas,"canvas_icon."IMAGE_EXT,_("Canvas"));
- INIT_STOCK_ICON(value_node,"valuenode_icon."IMAGE_EXT,_("ValueNode"));
- INIT_STOCK_ICON(real,"real_icon."IMAGE_EXT,_("Real"));
+ INIT_STOCK_ICON(bool,"bool_icon."IMAGE_EXT,_("Bool"));
INIT_STOCK_ICON(integer,"integer_icon."IMAGE_EXT,_("Integer"));
+ INIT_STOCK_ICON(angle,"angle_icon."IMAGE_EXT,_("Angle"));
+ INIT_STOCK_ICON(time,"time_icon."IMAGE_EXT,_("Time"));
+ INIT_STOCK_ICON(real,"real_icon."IMAGE_EXT,_("Real"));
INIT_STOCK_ICON(vector,"vector_icon."IMAGE_EXT,_("Vector"));
INIT_STOCK_ICON(color,"color_icon."IMAGE_EXT,_("Color"));
- INIT_STOCK_ICON(angle,"angle_icon."IMAGE_EXT,_("Angle"));
INIT_STOCK_ICON(segment,"segment_icon."IMAGE_EXT,_("Segment"));
+ INIT_STOCK_ICON(blinepoint,"blinepoint_icon."IMAGE_EXT,_("BLine Point"));
+ INIT_STOCK_ICON(list,"list_icon."IMAGE_EXT,_("Rename"));
+ INIT_STOCK_ICON(canvas,"canvas_icon."IMAGE_EXT,_("Canvas"));
+ INIT_STOCK_ICON(string,"string_icon."IMAGE_EXT,_("Rename"));
+
+ 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"));
INIT_STOCK_ICON(rename,"rename_icon."IMAGE_EXT,_("Rename"));
- INIT_STOCK_ICON(list,"list_icon."IMAGE_EXT,_("Rename"));
INIT_STOCK_ICON(canvas_pointer,"canvas_pointer_icon."IMAGE_EXT,_("Rename"));
- INIT_STOCK_ICON(string,"string_icon."IMAGE_EXT,_("Rename"));
INIT_STOCK_ICON(canvas_new,"canvas_icon."IMAGE_EXT,_("New Canvas"));
INIT_STOCK_ICON(saveall,"saveall_icon."IMAGE_EXT,_("Save All"));
- INIT_STOCK_ICON(bool,"bool_icon."IMAGE_EXT,_("Bool"));
INIT_STOCK_ICON(layer,"layer_icon."IMAGE_EXT,_("Layer"));
INIT_STOCK_ICON(layer_pastecanvas,"pastecanvas_icon."IMAGE_EXT,_("Paste Canvas"));
+ INIT_STOCK_ICON(plant,"plant_icon."IMAGE_EXT,"");
INIT_STOCK_ICON(group,"group_icon."IMAGE_EXT,_("Group"));
INIT_STOCK_ICON(grid_enable,"grid_enable_icon."IMAGE_EXT,_("Show Grid"));
INIT_STOCK_ICON(grid_disable,"grid_disable_icon."IMAGE_EXT,_("Hide Grid"));
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(gradient,"gradient_icon."IMAGE_EXT,_("Gradient"));
- INIT_STOCK_ICON(blinepoint,"blinepoint_icon."IMAGE_EXT,_("BLine Point"));
+ 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"));
INIT_STOCK_ICON(keyframe_lock_future,"keyframe_lock_future."IMAGE_EXT,_("Future Keyframes Locked"));
INIT_STOCK_ICON(keyframe_lock_none,"keyframe_lock_none."IMAGE_EXT,_("No Keyframes Locked"));
+ INIT_STOCK_ICON(set_outline_color,"set_outline_color."IMAGE_EXT,_("Set as Outline"));
+ INIT_STOCK_ICON(set_fill_color,"set_fill_color."IMAGE_EXT,_("Set as Fill"));
+
+ INIT_STOCK_ICON(seek_begin,"seek_begin."IMAGE_EXT,_("Seek to Begin"));
+ INIT_STOCK_ICON(seek_prev_frame,"seek_prev_frame."IMAGE_EXT,_("Previous Frame"));
+ INIT_STOCK_ICON(seek_next_frame,"seek_next_frame."IMAGE_EXT,_("Next Frame"));
+ INIT_STOCK_ICON(seek_end,"seek_end."IMAGE_EXT,_("Seek to End"));
+
+ INIT_STOCK_ICON(toggle_duck_position,"duck_position_icon."IMAGE_EXT,_("Toggle position ducks"));
+ INIT_STOCK_ICON(toggle_duck_vertex,"duck_vertex_icon."IMAGE_EXT,_("Toggle vertex ducks"));
+ INIT_STOCK_ICON(toggle_duck_tangent,"duck_tangent_icon."IMAGE_EXT,_("Toggle tangent ducks"));
+ INIT_STOCK_ICON(toggle_duck_radius,"duck_radius_icon."IMAGE_EXT,_("Toggle radius ducks"));
+ INIT_STOCK_ICON(toggle_duck_width,"duck_width_icon."IMAGE_EXT,_("Toggle width ducks"));
+ INIT_STOCK_ICON(toggle_duck_angle,"duck_angle_icon."IMAGE_EXT,_("Toggle angle ducks"));
+
+ INIT_STOCK_ICON(toggle_show_grid,"show_grid_icon."IMAGE_EXT,_("Toggle show grid"));
+ INIT_STOCK_ICON(toggle_snap_grid,"snap_grid_icon."IMAGE_EXT,_("Toggle snap grid"));
+
+ INIT_STOCK_ICON(toggle_onion_skin,"onion_skin_icon."IMAGE_EXT,_("Toggle onion skin"));
+
INIT_STOCK_ICON_CLONE(cvs_add,"gtk-add",_("CVS Add"));
INIT_STOCK_ICON_CLONE(cvs_update,"gtk-open",_("CVS Update"));
INIT_STOCK_ICON_CLONE(cvs_commit,"gtk-save",_("CVS Commit"));
// Tools
INIT_STOCK_ICON(normal,"normal_icon."IMAGE_EXT,_("Normal Tool"));
- INIT_STOCK_ICON(polygon,"polygon_icon."IMAGE_EXT,_("Polygon Tool"));
+ INIT_STOCK_ICON(polygon,"polyline_icon."IMAGE_EXT,_("Polygon Tool"));
INIT_STOCK_ICON(bline,"bline_icon."IMAGE_EXT,_("BLine Tool"));
INIT_STOCK_ICON(eyedrop,"eyedrop_icon."IMAGE_EXT,_("Eyedrop Tool"));
INIT_STOCK_ICON(fill,"fill_icon."IMAGE_EXT,_("Fill Tool"));
INIT_STOCK_ICON(zoom,"zoom_icon."IMAGE_EXT,_("Zoom Tool"));
INIT_STOCK_ICON(info,"info_icon."IMAGE_EXT,_("Info Tool"));
INIT_STOCK_ICON(mirror,"mirror_icon."IMAGE_EXT,_("Mirror Tool"));
+ INIT_STOCK_ICON(text,"text_icon."IMAGE_EXT,"Text Tool");
+ INIT_STOCK_ICON(gradient,"gradient_icon."IMAGE_EXT,_("Gradient Tool"));
+ INIT_STOCK_ICON(star,"star_icon."IMAGE_EXT,_("Star Tool"));
icon_factory->add_default();
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,
0,0 // Dither X,Y
);
*/
- DEBUGPOINT();
Gdk::Color FG("#000000");
Gdk::Color BG("#FF00FF");
- DEBUGPOINT();
return Gdk::Cursor(pixmap, pixmap, FG, BG, 0, 0);
}
{
switch(type)
{
- case ValueBase::TYPE_REAL:
- return Gtk::StockID("synfig-real");
+ case ValueBase::TYPE_BOOL:
+ return Gtk::StockID("synfig-bool");
break;
case ValueBase::TYPE_INTEGER:
return Gtk::StockID("synfig-integer");
break;
- case ValueBase::TYPE_BOOL:
- return Gtk::StockID("synfig-bool");
- break;
case ValueBase::TYPE_ANGLE:
return Gtk::StockID("synfig-angle");
break;
+ case ValueBase::TYPE_TIME:
+ return Gtk::StockID("synfig-time");
+ break;
+ case ValueBase::TYPE_REAL:
+ return Gtk::StockID("synfig-real");
+ break;
case ValueBase::TYPE_VECTOR:
return Gtk::StockID("synfig-vector");
break;
case ValueBase::TYPE_COLOR:
return Gtk::StockID("synfig-color");
break;
- case ValueBase::TYPE_STRING:
- return Gtk::StockID("synfig-string");
+ case ValueBase::TYPE_SEGMENT:
+ return Gtk::StockID("synfig-segment");
break;
- case ValueBase::TYPE_CANVAS:
- return Gtk::StockID("synfig-canvas_pointer");
+ case ValueBase::TYPE_BLINEPOINT:
+ return Gtk::StockID("synfig-blinepoint");
break;
case ValueBase::TYPE_LIST:
return Gtk::StockID("synfig-list");
break;
- case ValueBase::TYPE_SEGMENT:
- return Gtk::StockID("synfig-segment");
+ case ValueBase::TYPE_CANVAS:
+ return Gtk::StockID("synfig-canvas_pointer");
+ break;
+ case ValueBase::TYPE_STRING:
+ return Gtk::StockID("synfig-string");
break;
case ValueBase::TYPE_GRADIENT:
return Gtk::StockID("synfig-gradient");
break;
- case ValueBase::TYPE_BLINEPOINT:
- return Gtk::StockID("synfig-blinepoint");
- break;
case ValueBase::TYPE_NIL:
default:
return Gtk::StockID("synfig-unknown");
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)
{
return stock_id;
}
+#ifdef WIN32
+#define DELETE TEMPORARY_DELETE_MACRO
+#undef TEMPORARY_DELETE_MACRO
+#endif
+
Gtk::StockID
studio::layer_icon(const synfig::String &layer)
{
return Gtk::StockID("synfig-circle");
else if(layer=="rectangle")
return Gtk::StockID("synfig-rectangle");
+ else if(layer=="star")
+ return Gtk::StockID("synfig-star");
+ else if(layer=="plant")
+ return Gtk::StockID("synfig-plant");
+ else if(layer=="text")
+ return Gtk::StockID("synfig-text");
else if(layer.find("gradient")!=String::npos)
return Gtk::StockID("synfig-gradient");
else