Exemplo n.º 1
0
  def handle_load_srfld(self) :
      # show the field in the viewer
      fld_id = sr_py.load_field(self.file_)
      if fld_id == 0 :
	print "Error loading file: %s" % self.file_
	return
      sr_py.show_field(fld_id)
      fstr = self.file_
      mo = path_exp.match(fstr)
      if mo != None :
        fstr = mo.group(2)

      ls = self.list_view_.get_model()
      ls.insert(0, (gtk.STOCK_YES, fstr, fld_id))
Exemplo n.º 2
0
  def handle_open_proj(self) :
    self.proj_dir_ = self.file_
    ent = self.xml_.get_widget("proj_dir_ent")
    ent.set_text(self.proj_dir_)
    #also load all the surfaces from this dir that have been generated.
    
    files = glob.glob("%s/mat*.ts.fld" % self.proj_dir_)
    for f in files :
      fld_id = sr_py.load_field(f)
      if fld_id == 0 :
	print "Error loading file: %s" % f
	return
      sr_py.show_field(fld_id)
      ls = self.list_view_.get_model()
      ls.insert(0, (gtk.STOCK_YES, f, fld_id))