On Mon, 2004-11-15 at 10:14 +0100, Jean-Marc Lasgouttes wrote: > + // Choose an icon from the funcrequest > + Gtk::BuiltinStockID stockID = > getGTKStockIcon(i->func()); > + Glib::ustring xpmName = > + > Glib::locale_to_utf8(toolbarbackend.getIcon(i->func())); > + Gtk::Image * image = NULL; > + // Prefer stock graphics > + if (stockID != Gtk::Stock::MISSING_IMAGE) { > + image = Gtk::manage(new > Gtk::Image(stockID, Gtk::ICON_SIZE_MENU)); > + } else if (xpmName.find("unknown.xpm") == -1) { > + // Load icon and shrink it for menu size > > I would expect that xpmName is computed only in the 'else' branch of > the test. Computing it unconditionnally is a bit strange. The same > kind of code occurs again later in the patch.
Ah yes, it was computed earlier as a vestige from when the logic was a bit different. Fixed. John