Date: Tue, 21 May 2013 13:22:45 GMT From: Arrigo Marchiori <ardovm@yahoo.it> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/178808: devel/wxGlade raises exception when generating XRC code for wxNotebook Message-ID: <201305211322.r4LDMjbd095352@oldred.FreeBSD.org> Resent-Message-ID: <201305211330.r4LDU0fR013091@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 178808 >Category: ports >Synopsis: devel/wxGlade raises exception when generating XRC code for wxNotebook >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue May 21 13:30:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Arrigo Marchiori >Release: 9.1-STABLE >Organization: >Environment: FreeBSD myhost 9.1-STABLE FreeBSD 9.1-STABLE #29 r250823: Mon May 20 09:04:12 CEST 2013 root@myhost:/usr/obj/usr/src/sys/GENERIC i386 Ports tree at SVN revision 318691 >Description: devel/wxGlade throws an exception when generating XRC code that should contain a wxNotebook. The problem is reported on wxGlade's bug tracking system: https://sourceforge.net/p/wxglade/bugs/156/ As the maintainer is probably not going to issue a new release soon, please consider adding the attached patch to the port. >How-To-Repeat: >Fix: The commit that fixes the problem is: https://bitbucket.org/agriggio/wxglade/commits/57e7a7d844ed590fe7b2c65d81ee112ce3ddbe79/raw/ The attached patch applies it if put in the directory devel/wxGlade/files/ Patch attached with submission follows: --- ./widgets/notebook/codegen.py.orig Wed Apr 24 20:11:11 2013 +0200 +++ ./widgets/notebook/codegen.py Fri Apr 26 18:54:13 2013 +0200 @@ -91,11 +91,14 @@ class NotebookXrcObject(xrcgen.DefaultXrcObject): def write(self, outfile, ntabs): + # the "tabs" property contains the pages of a notebook + # be carefully: tabs in context of code generation are white + # spaces used for indenting lines!! if self.properties.has_key('tabs'): - self.tabs = self.properties['tabs'] + self.pages = self.properties['tabs'] del self.properties['tabs'] else: - self.tabs = [] + self.pages = [] self.index = 0 # always use a wxNotebookSizer self.properties['usenotebooksizer'] = '1' @@ -104,11 +107,11 @@ xrcgen.DefaultXrcObject.write(self, outfile, ntabs) def write_child_prologue(self, child, outfile, ntabs): - if self.tabs: + if self.pages: tab_s = ' ' * ntabs outfile.write(tab_s + '<object class="notebookpage">\n') outfile.write(tab_s + '<label>%s</label>\n' % \ - escape(self.tabs[self.index][0])) + escape(self.pages[self.index][0])) self.index += 1 def write_child_epilogue(self, child, outfile, ntabs): >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305211322.r4LDMjbd095352>