Example #1
0
def loadRealm(self,fn):
  global config
  global worldList
  status.push(0,"Destroying menus...")
  clearMenus()
  status.push(0,"Clearing worldList...")
  worldList = {} # clear worldList
  status.push(0,"Reloading config...")
  backends.killRealmOpts()
  status.push(0,"Loading realm...")
  config.update(backends.loadRealm(fn))
  status.push(0,"Populating realm...")
  common.updateTitle()
  backends.populateWorld()
  status.push(0,"Building menus...")
  doMenus(self)
  pass
Example #2
0
    r.append(itemRQ)
    itemRQ.connect("activate", backends.storeWindowExit,self.window)
# Person
#    if config['realmloaded']:
    menu.doMenus(self)

  def delete_event(self,widget,event,data=None):
    if config['debug'] > 3: print self.window.get_size()
#    print "delete event occurred"
    return False

  def destroy(self,widget,data=None):
    gtk.main_quit()

if __name__ == "__main__":
  print "Minette v%s loading..." % version
  fn = None
  if len(sys.argv) > 1:
    print "%s" % sys.argv
    fn = sys.argv[1] # for now, config must be first argument
  if fn is None:
    fn = "default.cfg" # using 3-letter extension for MSWin compatibility, I hope.
  backends.loadConfig(fn)
  backends.populateWorld()
  fn = path.join(config['realmdir'],"myrealm.cfg")
  if config['uselistfile'] and not path.exists(fn):
    print " writing list file so you won't have to walk the directory again..."
    backends.writeListFile()
  base = Base(fn)
  base.main()