# File gtk/sample/gtk-demo/iconview.rb, line 18 def fill_store @store.clear Dir.glob(File.join(@parent, "*")).each do |path| is_dir = FileTest.directory?(path) iter = @store.append # set COL_DISPLAY_NAME first because changing an iter will trigger the # sort function; if we set something else first, the value of # COL_DISPLAY_NAME for this row will be "nil" and the sort function will fail iter[COL_DISPLAY_NAME] = GLib.filename_to_utf8(File.basename(path)) iter[COL_PATH] = path iter[COL_IS_DIR] = is_dir iter[COL_PIXBUF] = is_dir ? @folder_pixbuf : @file_pixbuf end end