# HG changeset patch # User sirebral # Date 1249481440 18000 # Node ID 95db4430caed81eeb0292c6815c9d2dbc4c6b3c5 # Parent 93a27aea09ce9254728db7c111b57443b3c70a67 If you have nothing in the list, New button works now. Adds duplicates though and screen updates incorrectly. diff -r 93a27aea09ce -r 95db4430caed orpg/orpg_version.py --- a/orpg/orpg_version.py Wed Aug 05 08:16:32 2009 -0500 +++ b/orpg/orpg_version.py Wed Aug 05 09:10:40 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-03" +BUILD = "090805-04" # This version is for network capability. PROTOCOL_VERSION = "1.2" diff -r 93a27aea09ce -r 95db4430caed upmana/updatemana.py --- a/upmana/updatemana.py Wed Aug 05 08:16:32 2009 -0500 +++ b/upmana/updatemana.py Wed Aug 05 09:10:40 2009 -0500 @@ -243,27 +243,24 @@ self.sizers["newrepo_layout"].Add(self.texts["reponame"], -1, wx.EXPAND) self.sizers["newrepo_layout"].AddGrowableCol(1) self.sizers["newbutton"].Add(self.sizers["newrepo_layout"], -1, wx.EXPAND) - + #Repo List Panel self.repopanel = wx.ScrolledWindow(self) self.repopanel.SetScrollbars(20,20,55,40) self.repopanel.Scroll(50,10) - self.box_sizers["repolist"] = wx.StaticBox(self.repopanel, -1, "Current Repo List") self.sizers["repolist"] = wx.StaticBoxSizer(self.box_sizers["repolist"], wx.VERTICAL) - self.sizers["repo"] = wx.GridBagSizer(hgap=2, vgap=2) self.sizers["repolist_layout"] = wx.FlexGridSizer(rows=1, cols=1, hgap=2, vgap=5) self.manifest = manifest self.BuildRepoList(None) - self.sizers["repolist_layout"].AddGrowableCol(0) self.sizers["repolist"].Add(self.sizers["repolist_layout"], -1, wx.EXPAND) - self.sizers["repo"].Add(self.sizers["repolist"], (0,0), flag=wx.EXPAND) self.sizers["repo"].AddGrowableCol(0) self.sizers['repo'].AddGrowableRow(0) + self.sizers['repo'].AddGrowableRow(1) self.repopanel.SetSizer(self.sizers['repo']) self.repopanel.SetAutoLayout(True) @@ -274,15 +271,12 @@ self.sizers["main"].AddGrowableCol(1) self.sizers["main"].AddGrowableRow(1) self.SetSizer(self.sizers["main"]) - self.SetAutoLayout(True) self.Fit() - self.Bind(wx.EVT_BUTTON, self.AddRepo, self.buttons['addrepo']) def BuildRepoList(self, event): - self.repolist = [] - for v in self.manifest.GetList('UpdateManifest', 'repolist', ''): self.repolist.append(v) + self.repolist = self.manifest.GetList('UpdateManifest', 'repolist', '') self.id = 0; self.box = {}; self.main = {}; self.container = {}; self.layout = {} self.name = {}; self.url = {}; self.pull = {}; self.uri = {}; self.delete = {} @@ -291,7 +285,6 @@ #wx.Yeild() For future refrence. - #Repo Name; Static Text; URL; Button. for repo in self.repolist: self.id += 1 self.box[self.id] = wx.StaticBox(self.repopanel, -1, str(repo)) @@ -320,12 +313,15 @@ self.sizers["repolist_layout"].Insert(0, self.container[self.id], -1, wx.EXPAND) self.sizers['repolist_layout'].Layout() - def AddRepo(self, event): repo = self.texts['reponame'].GetValue(); repo = repo.replace(' ', '_'); repo = 'repo-' + repo self.manifest.SetString('updaterepo', repo, ''); repo = repo.split(',') - repolist = self.manifest.GetList('UpdateManifest', 'repolist', ''); repo = repolist + repo - self.manifest.SetList('UpdateManifest', 'repolist', repo) + repolist = self.manifest.GetList('UpdateManifest', 'repolist', '') + if repolist == '': + pass + else: + repo = repolist + repo + self.manifest.SetList('UpdateManifest', 'repolist', repo); print repo self.BuildRepoList(None) def RefreshRepo(self, event):