]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/MediaCtrl.py
aui docking works well on systems with solid window dragging turned off
[wxWidgets.git] / wxPython / demo / MediaCtrl.py
index 8b2797cf3c5c90f1519cc3b5df31e5b29db8b80e..9f624a3a18026dc6d54a2aa411c23f4dceb40f5b 100644 (file)
@@ -89,13 +89,13 @@ class TestPanel(wx.Panel):
 
     def DoLoadFile(self, path):
         self.playBtn.Disable()
-        noLog = wx.LogNull()
+        #noLog = wx.LogNull()
         if not self.mc.Load(path):
             wx.MessageBox("Unable to load %s: Unsupported format?" % path,
                           "ERROR",
                           wx.ICON_ERROR | wx.OK)
         else:
-            self.mc.SetBestFittingSize()
+            self.mc.SetInitialSize()
             self.GetSizer().Layout()
             self.slider.SetRange(0, self.mc.Length())
 
@@ -108,6 +108,8 @@ class TestPanel(wx.Panel):
                           "ERROR",
                           wx.ICON_ERROR | wx.OK)
         else:
+            self.mc.SetInitialSize()
+            self.GetSizer().Layout()
             self.slider.SetRange(0, self.mc.Length())
 
     def OnPause(self, evt):
@@ -128,6 +130,9 @@ class TestPanel(wx.Panel):
         self.st_len.SetLabel('length: %d seconds' % (self.mc.Length()/1000))
         self.st_pos.SetLabel('position: %d' % offset)
 
+    def ShutdownDemo(self):
+        self.timer.Stop()
+        del self.timer
 
 #----------------------------------------------------------------------