changeset 117:0f18d16f3fe7 alpha

Traipse Alpha 'OpenRPG' {091012-02} Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc's main goal is to offer more advanced features and enhance the productivity of the user. Update Summary: Adds Bookmarks (Alpha) with cool Smiley Star and Plus Symbol images! Changes made to the map for increased portability. SnowDog has changes planned in Core, though. Added an initial push to the BCG. Not much to see, just shows off how it is re-writing Main code. Fix to remote admin commands Minor fix to texted based server, works in /System/ folder Some Core changes to gametree to correctly disply Pretty Print, thanks David! Fix to Splitter Nodes not being created. Added images to Plugin Control panel for Autostart feature Fix to massive amounts of images loading; from Core {091011} fix to gsclient so with_statement imports Added 'boot' command to remote admin Prep work in Pass tool for remote admin rankings and different passwords, ei, Server, Admin, Moderator, etc. {091012} 00: Remote Admin Commands more organized, more prep work. Added Confirmation window for sent nodes. 01: Un remarks Update Manager from main.py 02: Minor changes to allow for portability to an OpenSUSE linux OS (hopefully without breaking) Added remark that should have have been removed.
author sirebral
date Mon, 12 Oct 2009 23:24:10 -0500
parents d078a8cdc1e4
children 217fb049bd00
files orpg/main.py orpg/networking/gsclient.py orpg/orpg_version.py upmana/updatemana.py
diffstat 4 files changed, 108 insertions(+), 108 deletions(-) [+]
line wrap: on
line diff
--- a/orpg/main.py	Mon Oct 12 22:48:57 2009 -0500
+++ b/orpg/main.py	Mon Oct 12 23:24:10 2009 -0500
@@ -50,8 +50,8 @@
 import orpg.mapper.images
 
 #Update Manager# Un remark if you have Mercurial installed
-#import upmana.updatemana
-#import upmana.manifest as manifest
+import upmana.updatemana
+import upmana.manifest as manifest
 
 from orpg.dirpath import dir_struct
 from orpg.dieroller.utils import DiceManager
@@ -1230,7 +1230,7 @@
         logger._set_log_level = int(settings.get_setting('LoggingLevel'))
         logger._set_log_to_console(False)
 
-	Update Manager
+	#Update Manager
         self.manifest = manifest.ManifestChanges()
 
         self.called = False
--- a/orpg/networking/gsclient.py	Mon Oct 12 22:48:57 2009 -0500
+++ b/orpg/networking/gsclient.py	Mon Oct 12 23:24:10 2009 -0500
@@ -246,8 +246,8 @@
         x = 0
         for server in self.bookmarks.findall('server'):
             for svr in self.svrList:
-                name = svr.name
-                if server.get('name') == name: self.server_list.SetItemImage(x, 1)
+                address = svr.addy
+                if server.get('address') == address: self.server_list.SetItemImage(x, 1)
                 x += 1
             item = wx.MenuItem(self.bookmarks_menu, wx.ID_ANY,
                                server.get('name'), server.get('name'))
--- a/orpg/orpg_version.py	Mon Oct 12 22:48:57 2009 -0500
+++ b/orpg/orpg_version.py	Mon Oct 12 23:24:10 2009 -0500
@@ -4,7 +4,7 @@
 #BUILD NUMBER FORMAT: "YYMMDD-##" where ## is the incremental daily build index (if needed)
 DISTRO = "Traipse Alpha"
 DIS_VER = "Ornery Orc"
-BUILD = "091012-01"
+BUILD = "091012-02"
 
 # This version is for network capability.
 PROTOCOL_VERSION = "1.2"
--- a/upmana/updatemana.py	Mon Oct 12 22:48:57 2009 -0500
+++ b/upmana/updatemana.py	Mon Oct 12 23:24:10 2009 -0500
@@ -1,15 +1,15 @@
 import wx
 import sys
-import os #just .sep maybe
+import os #just .sep maybe
 import manifest
 import shutil
 
 from orpg.orpgCore import component
-from orpg.dirpath import dir_struct
+from orpg.dirpath import dir_struct
 from orpg.tools.orpg_log import logger, crash
 from orpg.tools.decorators import debugging
-from upmana.validate import validate
-from orpg.dirpath import dir_struct
+from upmana.validate import validate
+from orpg.dirpath import dir_struct
 from mercurial import ui, hg, commands, repo, revlog, cmdutil, util
 
 
@@ -24,35 +24,35 @@
         self.c = self.repo.changectx('tip')
         self.manifest = manifest
         self.parent = parent
-        self.SetBackgroundColour(wx.WHITE)
+        self.SetBackgroundColour(wx.WHITE)
         self.sizer = wx.GridBagSizer(hgap=1, vgap=1)
         self.changelog = wx.TextCtrl(self, wx.ID_ANY, size=(300, -1), style=wx.TE_MULTILINE | wx.TE_READONLY)
         self.filelist = wx.TextCtrl(self, wx.ID_ANY, size=(275, 300), style=wx.TE_MULTILINE | wx.TE_READONLY)
-        self.buttons = {}
-        self.buttons['progress_bar'] = wx.Gauge(self, wx.ID_ANY, 100)
-        self.buttons['auto_text'] = wx.StaticText(self, wx.ID_ANY, "Auto Update")
+        self.buttons = {}
+        self.buttons['progress_bar'] = wx.Gauge(self, wx.ID_ANY, 100)
+        self.buttons['auto_text'] = wx.StaticText(self, wx.ID_ANY, "Auto Update")
         self.buttons['auto_check'] = wx.CheckBox(self, wx.ID_ANY)
-        self.buttons['no_text'] = wx.StaticText(self, wx.ID_ANY, "No Update")
+        self.buttons['no_text'] = wx.StaticText(self, wx.ID_ANY, "No Update")
         self.buttons['no_check'] = wx.CheckBox(self, wx.ID_ANY)
-        self.buttons['advanced'] = wx.Button(self, wx.ID_ANY, "Package Select")
-        self.buttons['update'] = wx.Button(self, wx.ID_ANY, "Update Now")
+        self.buttons['advanced'] = wx.Button(self, wx.ID_ANY, "Package Select")
+        self.buttons['update'] = wx.Button(self, wx.ID_ANY, "Update Now")
         self.buttons['finish'] = wx.Button(self, wx.ID_ANY, "Finish")
 
-        self.sizer.Add(self.changelog, (0,0), span=(4,1), flag=wx.EXPAND)
+        self.sizer.Add(self.changelog, (0,0), span=(4,1), flag=wx.EXPAND)
         self.sizer.Add(self.filelist, (0,1), span=(1,3), flag=wx.EXPAND)
-
+
         self.sizer.Add(self.buttons['progress_bar'], (1,1), span=(1,3), flag=wx.EXPAND)
-        self.sizer.Add(self.buttons['auto_text'], (2,1))
+        self.sizer.Add(self.buttons['auto_text'], (2,1))
         self.sizer.Add(self.buttons['auto_check'], (2,2), flag=wx.EXPAND)
-        self.sizer.Add(self.buttons['no_text'], (3,1))
+        self.sizer.Add(self.buttons['no_text'], (3,1))
         self.sizer.Add(self.buttons['no_check'], (3,2), flag=wx.EXPAND)
-        self.sizer.Add(self.buttons['advanced'], (2,3), flag=wx.EXPAND)
-        self.sizer.Add(self.buttons['update'], (3,3), flag=wx.EXPAND)
+        self.sizer.Add(self.buttons['advanced'], (2,3), flag=wx.EXPAND)
+        self.sizer.Add(self.buttons['update'], (3,3), flag=wx.EXPAND)
         self.sizer.Add(self.buttons['finish'], (4,3), flag=wx.EXPAND)
-        self.buttons['finish'].Disable()
-        self.sizer.AddGrowableCol(0)
-        self.sizer.AddGrowableRow(0)
-        self.SetSizer(self.sizer)
+        self.buttons['finish'].Disable()
+        self.sizer.AddGrowableCol(0)
+        self.sizer.AddGrowableRow(0)
+        self.SetSizer(self.sizer)
         self.SetAutoLayout(True)
         self.get_package
 
@@ -60,33 +60,33 @@
         self.BranchInfo(self.current)
 
         if self.manifest.GetString("updatemana", "no_update", "") == 'on': self.buttons['no_check'].SetValue(True)
-        else: self.buttons['no_check'].SetValue(False)
+        else: self.buttons['no_check'].SetValue(False)
         if self.manifest.GetString("updatemana", "auto_update", "") == 'on': self.buttons['auto_check'].SetValue(True)
-        else: self.buttons['auto_check'].SetValue(False)
-
-        ## Event Handlers
-        self.Bind(wx.EVT_BUTTON, self.Update, self.buttons['update'])
-        self.Bind(wx.EVT_BUTTON, self.Finish, self.buttons['finish'])
-        self.Bind(wx.EVT_BUTTON, self.ChooseBranch, self.buttons['advanced'])
+        else: self.buttons['auto_check'].SetValue(False)
+
+        ## Event Handlers
+        self.Bind(wx.EVT_BUTTON, self.Update, self.buttons['update'])
+        self.Bind(wx.EVT_BUTTON, self.Finish, self.buttons['finish'])
+        self.Bind(wx.EVT_BUTTON, self.ChooseBranch, self.buttons['advanced'])
         self.Bind(wx.EVT_CHECKBOX, self.ToggleAutoUpdate, self.buttons['auto_check'])
         self.Bind(wx.EVT_CHECKBOX, self.ToggleNoUpdate, self.buttons['no_check'])
 
-    def ToggleAutoUpdate(self, event):
+    def ToggleAutoUpdate(self, event):
         if self.buttons['auto_check'].GetValue() == True:
             if self.buttons['no_check'].GetValue() == True: 
                 self.buttons['no_check'].SetValue(False)
-                self.manifest.SetString("updatemana", "no_update", "off")
-            self.manifest.SetString("updatemana", "auto_update", "on")
+                self.manifest.SetString("updatemana", "no_update", "off")
+            self.manifest.SetString("updatemana", "auto_update", "on")
         else: self.manifest.SetString("updatemana", "auto_update", "off")
 
-    def ToggleNoUpdate(self, event):
+    def ToggleNoUpdate(self, event):
         if self.buttons['no_check'].GetValue() == True:
             if self.buttons['auto_check'].GetValue() == True: 
                 self.buttons['auto_check'].SetValue(False)
-                self.manifest.SetString("updatemana", "auto_update", "off")
-            self.manifest.SetString("updatemana", "no_update", "on")
-        else: self.manifest.SetString("updatemana", "no_update", "off")
-
+                self.manifest.SetString("updatemana", "auto_update", "off")
+            self.manifest.SetString("updatemana", "no_update", "on")
+        else: self.manifest.SetString("updatemana", "no_update", "off")
+
     def Update(self, evt=None):
         self.ui = ui.ui()
         self.repo = hg.repository(self.ui, ".")
@@ -109,56 +109,56 @@
         for i in ignore: self.ignorelist.append(str(i [:len(i)-1]))
         manifest = ignore.readlines()
         ignore.close()
-
-    def Finish(self, evt=None):
+
+    def Finish(self, evt=None):
         try: self.parent.Destroy()
         except:
-            print 'Fail'; exit()
-
+            print 'Fail'; exit()
+
     def ChooseBranch(self, evt=None):
-        dlg = wx.Dialog(self, wx.ID_ANY, "Package Selector", style=wx.DEFAULT_DIALOG_STYLE)
-        if wx.Platform == '__WXMSW__': icon = wx.Icon(dir_struct["icon"]+'d20.ico', wx.BITMAP_TYPE_ICO)
-        else: icon = wx.Icon(dir_struct["icon"]+"d20.xpm", wx.BITMAP_TYPE_XPM )
+        dlg = wx.Dialog(self, wx.ID_ANY, "Package Selector", style=wx.DEFAULT_DIALOG_STYLE)
+        if wx.Platform == '__WXMSW__': icon = wx.Icon(dir_struct["icon"]+'d20.ico', wx.BITMAP_TYPE_ICO)
+        else: icon = wx.Icon(dir_struct["icon"]+"d20.xpm", wx.BITMAP_TYPE_XPM )
         dlg.SetIcon(icon)
 
         self.ui = ui.ui()
         self.repo = hg.repository(self.ui, ".")
-        self.c = self.repo.changectx('tip')
-
+        self.c = self.repo.changectx('tip')
+
         dlgsizer = wx.GridBagSizer(hgap=1, vgap=1)
-        Yes = wx.Button( dlg, wx.ID_OK, "Ok" )
-        Yes.SetDefault()
-        rgroup = wx.RadioButton(dlg, wx.ID_ANY, "group_start", style=wx.RB_GROUP)
-        rgroup.Hide()
-
+        Yes = wx.Button( dlg, wx.ID_OK, "Ok" )
+        Yes.SetDefault()
+        rgroup = wx.RadioButton(dlg, wx.ID_ANY, "group_start", style=wx.RB_GROUP)
+        rgroup.Hide()
+
         self.get_packages()
         if self.package_list == None: return
-        types = self.package_list
-        row=0; col=0
+        types = self.package_list
+        row=0; col=0
         self.current = self.repo.dirstate.branch()
         self.package_type = self.current
         self.btnlist = {}; self.btn = {}
         self.id = 1
 
-        for t in types:
-            self.btnName = str(t)
-            self.btn[self.id] = wx.RadioButton(dlg, wx.ID_ANY, str(t), name=self.btnName)
+        for t in types:
+            self.btnName = str(t)
+            self.btn[self.id] = wx.RadioButton(dlg, wx.ID_ANY, str(t), name=self.btnName)
             if self.btnName == self.current: self.btn[self.id].SetValue(True)
             self.btnlist[self.id] = self.btnName
-            dlgsizer.Add(self.btn[self.id], (row, col))
+            dlgsizer.Add(self.btn[self.id], (row, col))
             col += 1; self.id += 1
             if col == 3: row += 1; col = 0
-
+
         dlgsizer.Add(Yes, (row+1,col/2))
         dlgsizer.AddGrowableCol(0)
         dlgsizer.AddGrowableRow(0)
-        dlg.SetAutoLayout( True )
+        dlg.SetAutoLayout( True )
         dlg.SetSizer( dlgsizer )
-        dlgsizer.Fit( dlg )
-        dlg.Centre()
-        dlg.Bind(wx.EVT_RADIOBUTTON, self.PackageSet)
-        if dlg.ShowModal(): dlg.Destroy()
-
+        dlgsizer.Fit( dlg )
+        dlg.Centre()
+        dlg.Bind(wx.EVT_RADIOBUTTON, self.PackageSet)
+        if dlg.ShowModal(): dlg.Destroy()
+
     def PackageSet(self, event):
         for btn in self.btn:
             if self.btn[btn].GetValue() == True: self.current = self.btnlist[btn]
@@ -181,7 +181,7 @@
         self.filelist.AppendText("Currently selected branch: " + branch + "\n\nAuthor: "+cs[1]+"\n\n")
         self.filelist.AppendText("Files Modified (in update): \n")
         for f in cs[3]: self.filelist.AppendText(f+"\n")
-
+
     def get_packages(self, type=None):
         #Fixed and ready for Test. Can be cleaner
         self.package_list = []
@@ -191,11 +191,11 @@
         l.sort()
         l.reverse()
         for ishead, r, n, t in l: self.package_list.append(t)
-
+
     def get_package(self):
-        self.get_packages()
+        self.get_packages()
         if self.package_list == None: return None
-        return None
+        return None
 
 class Repos(wx.Panel):
     def __init__(self, parent, openrpg, manifest):
@@ -267,7 +267,7 @@
         self.sizers["main"].AddGrowableRow(1)
         self.SetSizer(self.sizers["main"])
         self.SetAutoLayout(True)
-        self.Fit()
+        #self.Fit()
         self.Bind(wx.EVT_BUTTON, self.AddRepo, self.buttons['addrepo'])
 
     def NewRepoList(self, event):
@@ -366,7 +366,7 @@
         self.manifestlist = self.c.manifest().keys()
         for mana in self.manifestlist: mana = os.sep + 'orpg' + os.sep + mana
         self.manifestlist.sort()
-        self.SetBackgroundColour(wx.WHITE)
+        self.SetBackgroundColour(wx.WHITE)
         self.sizer = wx.GridBagSizer(hgap=1, vgap=1)
         self.manifestlog = wx.CheckListBox( self, -1, wx.DefaultPosition, wx.DefaultSize, 
                                             self.manifestlist, wx.LC_REPORT|wx.SUNKEN_BORDER|wx.EXPAND|wx.LC_HRULES)
@@ -376,9 +376,9 @@
         self.mana = self.LoadDoc()
         self.manifestlog.Bind(wx.EVT_CHECKLISTBOX, self.GetChecked)
         self.sizer.Add(self.manifestlog, (0,0), flag=wx.EXPAND)
-        self.sizer.AddGrowableCol(0)
+        self.sizer.AddGrowableCol(0)
         self.sizer.AddGrowableRow(0)
-        self.SetSizer(self.sizer)
+        self.SetSizer(self.sizer)
         self.SetAutoLayout(True)
 
     def GetChecked(self, event):
@@ -413,14 +413,14 @@
         self.repo = hg.repository(self.ui, ".")
         self.c = self.repo.changectx('tip')
         self.manifest = manifest
-        self.parent = parent
+        self.parent = parent
         #logger.debug("Enter updaterFrame") #Need to set logging level
 
         self.get_packages()
-        self.SetBackgroundColour(wx.WHITE)
+        self.SetBackgroundColour(wx.WHITE)
         self.sizer = wx.GridBagSizer(hgap=1, vgap=1)
         self.buttons = {}
-
+
         ## Changelog / File List
         changelogcp = wx.Panel(self)
         self.changelogcp = wx.GridBagSizer(hgap=1, vgap=1)
@@ -467,21 +467,21 @@
         self.cp = wx.GridBagSizer(hgap=1, vgap=1)
         self.buttons['update'] = wx.Button(cp, wx.ID_ANY, "Revision Update")
         self.buttons['delete'] = wx.Button(cp, wx.ID_ANY, "Delete Branch")
-        self.cp.Add(self.buttons['update'], (0,0))
+        self.cp.Add(self.buttons['update'], (0,0))
         self.cp.Add(self.buttons['delete'], (0,1))
         cp.SetSizer(self.cp)
         cp.SetAutoLayout(True)
-
+
         self.sizer.Add(changelogcp, (0,0), span=(3,1), flag=wx.EXPAND)
         self.sizer.Add(branchcp, (0,1), span=(1,1))
         self.sizer.Add(revlistcp, (2,1), span=(1,1), flag=wx.EXPAND)
-        self.sizer.Add(cp, (1,1), span=(1,1))
+        self.sizer.Add(cp, (1,1), span=(1,1))
 
-        self.buttons['delete'].Disable()
+        self.buttons['delete'].Disable()
         self.sizer.AddGrowableCol(0)
-        self.sizer.AddGrowableCol(1)
-        self.sizer.AddGrowableRow(2)
-        self.SetSizer(self.sizer)
+        self.sizer.AddGrowableCol(1)
+        self.sizer.AddGrowableRow(2)
+        self.SetSizer(self.sizer)
         self.SetAutoLayout(True)
 
         self.currev = self.repo.changelog.rev(self.repo.branchtags()[self.current])
@@ -491,8 +491,8 @@
         self.Bind(wx.EVT_CHOICE, self.PackageSet)
         self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.RevSet)
         self.Bind(wx.EVT_BUTTON, self.RevUpdate, self.buttons['update'])
-
-
+
+
     def PackageSet(self, event):
         self.current = self.branches.GetStringSelection()
         branches = self.repo.branchtags()
@@ -575,17 +575,17 @@
         l.sort()
         l.reverse()
         for ishead, r, n, t in l: self.package_list.append(t)
-
+
     def get_package(self):
-        self.get_packages()
+        self.get_packages()
         if self.package_list == None: return None
-        return None
-
-class updaterFrame(wx.Frame):
+        return None
+
+class updaterFrame(wx.Frame):
     def __init__(self, parent, title, openrpg, manifest, main):
 
         wx.Frame.__init__(self, None, wx.ID_ANY, title, size=(600,480), style=wx.DEFAULT_FRAME_STYLE)
-        if wx.Platform == '__WXMSW__': icon = wx.Icon(dir_struct["icon"]+'d20.ico', wx.BITMAP_TYPE_ICO)
+        if wx.Platform == '__WXMSW__': icon = wx.Icon(dir_struct["icon"]+'d20.ico', wx.BITMAP_TYPE_ICO)
         else: icon = wx.Icon(dir_struct["icon"]+"d20.xpm", wx.BITMAP_TYPE_XPM )
 
         self.SetIcon(icon)
@@ -617,14 +617,14 @@
     def OnClose(self, event):
         if self.main == False: self.Destroy()
         if self.main == True: self.Hide()
-
+
 class updateApp(wx.App):
     def OnInit(self):
-        self.main = False
-        logger._set_log_to_console(False)
-        logger.note("Updater Start")
-        self.manifest = manifest.ManifestChanges()
-        component.add('validate', validate)
+        self.main = False
+        logger._set_log_to_console(False)
+        logger.note("Updater Start")
+        self.manifest = manifest.ManifestChanges()
+        component.add('validate', validate)
         self.updater = updaterFrame(self, "OpenRPG Update Manager 0.8 (open beta)", 
                                 component, self.manifest, self.main)
         if self.manifest.GetString("updatemana", "auto_update", "") == 'on' and self.main == False:
@@ -633,10 +633,10 @@
         if self.manifest.GetString('updatemana', 'no_update', '') == 'on' and self.main == False: 
             self.OnExit()
         else: pass
-        try:
-            self.updater.Show()
-            self.updater.Fit()
-        except: pass
+        try:
+            self.updater.Show()
+            self.updater.Fit()
+        except: pass
         return True
 
     def AutoUpdate(self):
@@ -667,13 +667,13 @@
         for i in ignore: self.ignorelist.append(str(i [:len(i)-1]))
         manifest = ignore.readlines()
         ignore.close()
-
+
     def OnExit(self):
         imported = ['manifest', 'orpg.dirpath', 'orpg.orpgCore', 'orpg.orpg_version', 
                     'orpg.tools.orpg_log', 'orpg.tools.orpg_log', 'orpg.orpg_xml', 'orpg.dirpath', 
                     'orpg.dirpath', 'upmana.validate', 'mercurial.ui', 'mercurial.hg', 
-                    'mercurial.commands', 'mercurial.repo', 'mercurial.revlog', 'mercurial.cmdutil', 'shutil']
-        for name in imported:
+                    'mercurial.commands', 'mercurial.repo', 'mercurial.revlog', 'mercurial.cmdutil', 'shutil']
+        for name in imported:
             if name in sys.modules: del sys.modules[name]
 
         try: self.updater.Destroy()