[Zope-Checkins] CVS: Zope3/utilities - unittestgui.py:1.9
Martijn Pieters
mj@zope.com
Mon, 1 Jul 2002 12:03:21 -0400
Update of /cvs-repository/Zope3/utilities
In directory cvs.zope.org:/tmp/cvs-serv7342
Modified Files:
unittestgui.py
Log Message:
Fix the annoying layout problems on X-Win32
=== Zope3/utilities/unittestgui.py 1.8 => 1.9 ===
self.toggleVar = tk.StringVar()
self.toggleVar.set(minimal and '>' or '<')
+ self.root.withdraw()
self.createWidgets()
+ self.root.deiconify()
def createWidgets(self):
"""Creates and packs the various widgets.
@@ -358,6 +360,9 @@
lambda e, self=self: self.showSelectedWarning())
self.warningListbox.configure(yscrollcommand=wListScroll.set)
+ # Necessary for certain X servers; X-Win32 in particular.
+ self.rePack(minimal=0, with_idle_wait=1)
+ self.rePack(minimal=1, with_idle_wait=1)
self.rePack()
def toggleMinimal(self):
@@ -376,7 +381,7 @@
pb.setProgressFraction(pb.fraction, progressText, pb.color)
self.rePack()
- def rePack(self, minimal=None):
+ def rePack(self, minimal=None, with_idle_wait=0):
if minimal is None:
minimal = self.minimal
for widget, layoutattr, do_hide in self.packWidgets:
@@ -386,6 +391,8 @@
if not do_hide:
widget.pack_forget()
apply(widget.pack, (), layoutattr)
+ if with_idle_wait and not minimal:
+ self.top.update_idletasks()
self.root.geometry("")
def getSelectedTestName(self):