Sha256: f4b0ae9e7e18b0aee6700189946564bfa32e1d2613ae41d6261c3fde424d136b
Contents?: true
Size: 715 Bytes
Versions: 3
Compression:
Stored size: 715 Bytes
Contents
require 'gtk2' require 'rabbit/rabbit' module Rabbit module Stock include GetText RABBIT = :rabbit_rabbit @@loaded = false module_function def init(canvas) return if @@loaded @@loaded = true Gtk::Stock.add(RABBIT, N_("Rabbit")) begin image_theme = Theme::Searcher.find_theme("rabbit-images", true) file = Theme::Searcher.find_file("lavie-icon.png", [image_theme]) loader = ImageLoader.new(file) loader.resize(32, 32) factory = Gtk::IconFactory.new factory.add(RABBIT.to_s, Gtk::IconSet.new(loader.pixbuf)) factory.add_default rescue LoadError canvas.logger.warn($!) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rabbit-2.1.4 | lib/rabbit/stock.rb |
rabbit-2.1.3 | lib/rabbit/stock.rb |
rabbit-2.1.2 | lib/rabbit/stock.rb |