summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c266171)
raw | patch | inline | side by side (parent: c266171)
author | joncruz <joncruz@users.sourceforge.net> | |
Sun, 19 Apr 2009 01:01:03 +0000 (01:01 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Sun, 19 Apr 2009 01:01:03 +0000 (01:01 +0000) |
src/ui/widget/dock-item.cpp | patch | blob | history |
index 12a0686f039b2fcd3dd2486557389436df3003af..147bd818d5bda15a1cfbdebc96e1f3779fa37ace 100644 (file)
sp_icon_fetch_pixbuf(sp_icon);
_icon_pixbuf = Glib::wrap(sp_icon->pb, true);
} else if ( GTK_IS_IMAGE(icon->gobj()) ) {
- _icon_pixbuf = Gtk::Invisible().render_icon(Gtk::StockID(icon_name),
- Gtk::ICON_SIZE_MENU);
+ GtkStockItem stock;
+ if ( gtk_stock_lookup( icon_name.c_str(), &stock ) ) {
+ _icon_pixbuf = Gtk::Invisible().render_icon( Gtk::StockID(icon_name),
+ Gtk::ICON_SIZE_MENU );
+ } else {
+ // TODO re-work this properly. Anti-crasher "null" icon for the moment
+ _icon_pixbuf = Gtk::Invisible().render_icon( Gtk::StockID(GTK_STOCK_MISSING_IMAGE),
+ Gtk::ICON_SIZE_MENU );
+ }
}
delete icon;