mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-09 15:14:45 +00:00
only instantiate and run first root widget
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2668 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
39d1b9c34b
commit
d0d8e177b5
1 changed files with 6 additions and 9 deletions
|
|
@ -94,7 +94,6 @@ import gtk
|
|||
import SimpleGladeApp
|
||||
|
||||
glade_dir = ""
|
||||
root_widgets = {}
|
||||
|
||||
# Put your modules and data here
|
||||
|
||||
|
|
@ -144,11 +143,11 @@ def main ():
|
|||
"""
|
||||
|
||||
instance_format = u"""\
|
||||
%(t)sroot_widgets[%(root)r] = %(class)s()
|
||||
%(t)s%(root)s = %(class)s()
|
||||
"""
|
||||
run_format = u"""\
|
||||
|
||||
%(t)sroot_widgets[%(root)r].run()
|
||||
%(t)s%(root)s.run()
|
||||
|
||||
if __name__ == "__main__":
|
||||
%(t)smain()
|
||||
|
|
@ -283,12 +282,10 @@ class SimpleGladeCodeWriter (xml.sax.handler.ContentHandler):
|
|||
return None
|
||||
self.code += main_format % self.data
|
||||
|
||||
for root in self.roots_list:
|
||||
self.data["class"] = self.capitalize_symbol(root)
|
||||
self.data["root"] = self.uncapitalize_symbol(root)
|
||||
self.code += instance_format % self.data
|
||||
|
||||
self.data["root"] = self.uncapitalize_symbol(self.roots_list[0])
|
||||
root = self.roots_list[0]
|
||||
self.data["class"] = self.capitalize_symbol(root)
|
||||
self.data["root"] = self.uncapitalize_symbol(root)
|
||||
self.code += instance_format % self.data
|
||||
self.code += run_format % self.data
|
||||
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in a new issue