Sha256: e84bfc6a57dba7de638038f205ba1aee350ac85c28efa9159bec3f68a15914b0

Contents?: true

Size: 761 Bytes

Versions: 32

Compression:

Stored size: 761 Bytes

Contents


#
# A simple class to show a filerequester that remembers the
# last directory visited.
#
class FXMapFileDialog < FXFileDialog
  @@last_path = nil

  KNOWN_LOAD_EXTENSIONS = [
    "#{EXT_MAP_FILES} (*.map,*.gmp,*.ifm,*.inf,*.t,*.t3m,*.trizbort)",
    EXT_ALL_FILES,
  ]

  KNOWN_SAVE_EXTENSIONS = [
    "#{EXT_MAP_FILES} (*.map,*.gmp,*.ifm,*.inf,*.inform,*.t,*.t3m,*.trizbort)",
    EXT_ALL_FILES,
  ]


  def initialize(parent, title, patterns = KNOWN_LOAD_EXTENSIONS)
    opts = 0
    if RUBY_PLATFORM =~ /mswin/
      opts |= FILEMATCH_NOESCAPE
    end
    super(parent, title, opts)
    setPatternList(patterns)
    self.directory = @@last_path if @@last_path
    if execute != 0
      @@last_path = filename.sub(/[\\\/][^\\\/]+$/, '')
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
ifmapper-2.3.0 lib/IFMapper/FXMapFileDialog.rb
ifmapper-2.2.9 lib/IFMapper/FXMapFileDialog.rb
ifmapper-2.2.8 lib/IFMapper/FXMapFileDialog.rb
ifmapper-2.2.7 lib/IFMapper/FXMapFileDialog.rb
ifmapper-2.2.5 lib/IFMapper/FXMapFileDialog.rb
ifmapper-2.2.4 lib/IFMapper/FXMapFileDialog.rb
ifmapper-2.2.3 lib/IFMapper/FXMapFileDialog.rb
ifmapper-2.2.2 lib/IFMapper/FXMapFileDialog.rb
ifmapper-2.2.1 lib/IFMapper/FXMapFileDialog.rb
ifmapper-2.2.0 lib/IFMapper/FXMapFileDialog.rb
ifmapper-2.0.9 lib/IFMapper/FXMapFileDialog.rb
ifmapper-2.0.8 lib/IFMapper/FXMapFileDialog.rb
ifmapper-2.0.7 lib/IFMapper/FXMapFileDialog.rb
ifmapper-2.0.6 lib/IFMapper/FXMapFileDialog.rb
ifmapper-2.0.4 lib/IFMapper/FXMapFileDialog.rb
ifmapper-1.3.1 lib/IFMapper/FXMapFileDialog.rb
ifmapper-1.3.0 lib/IFMapper/FXMapFileDialog.rb
ifmapper-1.2.9 lib/IFMapper/FXMapFileDialog.rb
ifmapper-1.2.8 lib/IFMapper/FXMapFileDialog.rb
ifmapper-1.2.6 lib/IFMapper/FXMapFileDialog.rb