# File gtk/sample/gtk-demo/stock_browser.rb, line 221 def id_to_const(id) const = '' s = id.id2name if s =~ /^gtk-/ const += 'Gtk::Stock::' s[0,4] = '' end const += s.upcase.gsub(/-/, '_') const end