changeset 44:15a76be834dc traipse_dev

Delete button is working ok. Moving on to ignore feature then implementation.
author sirebral
date Wed, 05 Aug 2009 15:15:09 -0500
parents f00b02fbf511
children 50e82d8090cf
files orpg/orpg_version.py upmana/updatemana.py
diffstat 2 files changed, 12 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/orpg/orpg_version.py	Wed Aug 05 10:46:05 2009 -0500
+++ b/orpg/orpg_version.py	Wed Aug 05 15:15:09 2009 -0500
@@ -4,7 +4,7 @@
 #BUILD NUMBER FORMAT: "YYMMDD-##" where ## is the incremental daily build index (if needed)
 DISTRO = "Traipse Dev"
 DIS_VER = "Grumpy Goblin"
-BUILD = "090805-06"
+BUILD = "090805-07"
 
 # This version is for network capability.
 PROTOCOL_VERSION = "1.2"
--- a/upmana/updatemana.py	Wed Aug 05 10:46:05 2009 -0500
+++ b/upmana/updatemana.py	Wed Aug 05 15:15:09 2009 -0500
@@ -254,11 +254,7 @@
         self.sizers["repolist_layout"] = wx.FlexGridSizer(rows=1, cols=1, hgap=2, vgap=5)
         self.manifest = manifest
 
-        self.id = -1; self.box = {}; self.box_name= {}; self.main = {}; self.container = {}; self.layout = {}
-        self.name = {}; self.url = {}; self.url_list = {}; self.pull = {}; self.uri = {}; self.delete = {}
-        self.defaultcheck = {}; self.default = {}; self.repotrac = {}
-        self.pull_list = {}; self.delete_list = {}; self.defchecklist = {}
-
+        self.NewRepoList(None)
         self.BuildRepoList(None)
 
         self.sizers["repolist_layout"].AddGrowableCol(0)
@@ -281,6 +277,12 @@
         self.Fit()
         self.Bind(wx.EVT_BUTTON, self.AddRepo, self.buttons['addrepo'])
 
+    def NewRepoList(self, event):
+        self.id = -1; self.box = {}; self.box_name= {}; self.main = {}; self.container = {}; self.layout = {}
+        self.name = {}; self.url = {}; self.url_list = {}; self.pull = {}; self.uri = {}; self.delete = {}
+        self.defaultcheck = {}; self.default = {}; self.repotrac = {}
+        self.pull_list = {}; self.delete_list = {}; self.defchecklist = {}
+
     def BuildRepoList(self, event):
         self.repolist = self.manifest.GetList('UpdateManifest', 'repolist', '')
         try: self.repolist = self.repo
@@ -335,9 +337,10 @@
 
     def DelRepo(self, event):
         self.id = self.delete_list[event.GetEventObject()]
-        repolist = self.manifest.GetList('UpdateManifest', 'repolist', '')
-        repolist.pop(self.id); self.manifest.SetList('UpdateManifest', 'repolist', repolist)
-        self.sizers["repolist_layout"].Remove(self.container[self.id])
+        self.sizers["repolist_layout"].Hide(self.container[self.id])
+        try: del self.box_name[self.id]
+        except: pass
+        self.manifest.SetList('UpdateManifest', 'repolist', list(self.box_name.values()))
         self.sizers['repolist_layout'].Layout()
 
     def RefreshRepo(self, event):