# File gtk/sample/gtk-demo/stock_browser.rb, line 117
    def create_model
      store = Gtk::ListStore.new(ItemInfo, String, String, String)

      list_ids = Gtk::Stock.ids
      list_ids.sort! do |a, b|
        a.to_s <=> b.to_s
      end
      list_ids.each do |stock_id|
        info = ItemInfo.new

        info.id = stock_id

        begin
          info.item = Item.new(*Gtk::Stock.lookup(stock_id))
        rescue ArgumentError
          info.item = Item.new
        end

        # only show icons for stock IDs that have default icons
        icon_set = Gtk::IconFactory.lookup_default(info.id.to_s)
        if icon_set
          # See what sizes this stock icon really exists at
          sizes = icon_set.sizes

          # Use menu size if it exists, otherwise first size found
          size = sizes.find do |s| s == Gtk::IconSize::MENU end || sizes.first

          info.small_icon = render_icon(info.id, size, '')

          unless size == Gtk::IconSize::MENU
            # Make the result the proper size for our thumbnail
            w, h = Gtk::IconSize.lookup(size)

            scaled = info.small_icon.scale(w, h, Gdk::Pixbuf::INTERP_BILINEAR)
            info.small_icon = scaled
          end

        else
          info.small_icon = nil
        end

        if info.item.keyval
          info.accel_str = Gtk::Accelerator.to_name(info.item.keyval,
                                                    info.item.modifier)
        else
          info.accel_str = ''
        end

        info.const = id_to_const(info.id)

        iter = store.append
        iter[0] = info
        iter[1] = info.id
      end

      return store
    end