>>>>> "John" == John Spray <[EMAIL PROTECTED]> writes:
John> This patch does two things: -Add getGTKStockIcon function for John> using gtk stock icons where available in menus and toolbars. John> -Put icons next to command items in menus. John> Note that GMenubar.C now includes ToolbarBackend.h for the John> getIcon function. Perhaps this function should be moved John> somewhere more general? I do not think that including the header really hurts... A small remark: + // 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. JMarc