changeset 205:243d9cda6359 alpha

Traipse Alpha 'OpenRPG' {100427-06} 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 (Patch-2) New Features: New Namespace method with two new syntaxes New Namespace Internal is context sensitive, always! New Namespace External is 'as narrow as you make it' New Namespace FutureCheck helps ensure you don't receive an incorrect node New PluginDB access for URL2Link plugin New to Forms, they now show their content in Design Mode New to Update Manager, checks Repo for updates on software start Fixes: Fix to Server GUI startup errors Fix to Server GUI Rooms tab updating Fix to Chat and Settings if non existant die roller is picked Fix to Dieroller and .open() used with .vs(). Successes are correctly calculated Fix to Alias Lib's Export to Tree, Open, Save features Fix to alias node, now works properly Fix to Splitter node, minor GUI cleanup Fix to Backgrounds not loading through remote loader Fix to Node name errors Fix to rolling dice in chat Whispers Fix to Splitters Sizing issues Fix to URL2Link plugin, modified regex compilation should remove memory leak Fix to mapy.py, a roll back due to zoomed grid issues Fix to whiteboard_handler, Circles work by you clicking the center of the circle Fix to Servers parse_incoming_dom which was outdated and did not respect XML Fix to a broken link in the server welcome message Fix to InterParse and logger requiring traceback Fix to Update Manager Status Bar Fix to failed image and erroneous pop up Daily-0?: I was having problems with Chat tabs. All fixed now. Daily-0?: Chat tabs an a small urgency with the Server, plus I kept working. Daily-05: Cuz I messed up just a little. Daily-06: Copied the wrong file for the Update Manager update.
author sirebral
date Tue, 27 Apr 2010 23:23:53 -0500
parents ff36cdfcf515
children ab271cbd05c8
files orpg/orpg_version.py upmana/updatemana.py
diffstat 2 files changed, 36 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/orpg/orpg_version.py	Tue Apr 27 22:53:48 2010 -0500
+++ b/orpg/orpg_version.py	Tue Apr 27 23:23:53 2010 -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 = "100427-05"
+BUILD = "100427-06"
 
 # This version is for network capability.
 PROTOCOL_VERSION = "1.2"
--- a/upmana/updatemana.py	Tue Apr 27 22:53:48 2010 -0500
+++ b/upmana/updatemana.py	Tue Apr 27 23:23:53 2010 -0500
@@ -12,16 +12,21 @@
 class Term2Win(object):
     # A stdout redirector.  Allows the messages from Mercurial to be seen in the Install Window
     def write(self, text):
+        self.closed = sys.__stdout__.closed
+        self.flush = sys.__stdout__.flush
         statbar.SetStatusText(text)
         wx.Yield()
-        sys.__stdout__.write(text)
+        #sys.__stdout__.write(text)
 
 class Updater(wx.Panel):
     def __init__(self, parent, component):
         wx.Panel.__init__(self, parent)
         ### Status Bar ###
         #statbar.SetStatusText('Select a Package and Update')
-        statbar.SetStatusText('New Status Bar')
+        #statbar.SetStatusText('New Status Bar')
+
+        self.timer = wx.Timer(self, 1)
+        self.count = 0
 
         ### Update Manager
         self.ui = ui.ui()
@@ -76,6 +81,29 @@
         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'])
+        self.Bind(wx.EVT_TIMER, self.OnTimer, self.timer)
+
+    def OnTimer(self, event):
+        self.count = self.count + 1
+        self.buttons['progress_bar'].SetValue(self.count)
+        if self.count == 100:
+            self.timer.Stop()
+            statbar.SetStatusText('Checking For Updates')
+
+    def UpdateCheck(self):
+        self.timer.Start(100)
+        self.count = 3
+        self.buttons['progress_bar'].SetValue(3)
+        doUpdate = commands.incoming(self.ui, self.repo, 
+                    'http://hg.assembla.com/openrpg', force=True, bundle=False)
+        if doUpdate:
+            statbar.SetStatusText('No Updates Available')
+            self.buttons['progress_bar'].SetValue(100)
+            self.timer.Stop()
+        else:
+            statbar.SetStatusText('Refresh Repo For Updated Source')
+            self.buttons['progress_bar'].SetValue(100)
+            self.timer.Stop()
 
     def ToggleAutoUpdate(self, event):
         if self.buttons['auto_check'].GetValue() == True:
@@ -687,17 +715,18 @@
 
         global statbar
         statbar = self.CreateStatusBar()
+        sys.stdout = Term2Win()
         self.Centre()
 
         # create the page windows as children of the notebook
-        page1 = Updater(nb, openrpg)
+        self.page1 = Updater(nb, openrpg)
         page2 = Repos(nb, openrpg)
         page3 = Manifest(nb)
         page4 = Control(nb)
         page5 = Help(nb)
 
         # add the pages to the notebook with the label to show on the tab
-        nb.AddPage(page1, "Updater")
+        nb.AddPage(self.page1, "Updater")
         nb.AddPage(page2, "Repos")
         nb.AddPage(page3, "Manifest")
         nb.AddPage(page4, "Control")
@@ -720,7 +749,7 @@
 class updateApp(wx.App):
     def OnInit(self):
         self.main = False
-        sys.stdout = Term2Win()
+
         logger._set_log_to_console(False)
         logger.note("Updater Start")
         component.add('validate', validate)
@@ -736,6 +765,7 @@
             self.updater.Show()
             self.updater.Fit()
         except: pass
+        if not self.main: self.updater.page1.UpdateCheck()
         return True
 
     def AutoUpdate(self):