# File gtk/sample/gtk-demo/pixbufs.rb, line 87 def load_pixbufs # Loads the images for the demo if @background return # already loaded earlier end # demo_find_file() looks in the the current directory first, # so you can run gtk-demo without installing GTK, then looks # in the location where the file is installed. # filename = Demo.find_file(BACKGROUND_NAME) @background = Gdk::Pixbuf.new(filename) IMAGE_NAMES.each_with_index do |basename, i| filename = Demo.find_file(basename) @images[i] = Gdk::Pixbuf.new(filename) end end