]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/wxFileHistory.py
In GetPath(), don't append separator if there's already one at the end
[wxWidgets.git] / wxPython / demo / wxFileHistory.py
index bb90041bf789ab036d6cd739f3e463c4edda6bcd..7cf5ca35d2b70d86ec407f32da17855edef0fc7c 100644 (file)
@@ -21,8 +21,9 @@ class TestPanel(wxPanel):
         box = wxBoxSizer(wxVERTICAL)
 
         # Make and layout the controls
-        bf = wxFont(14, wxSWISS, wxNORMAL, wxBOLD)
-        nf = wxFont(11, wxSWISS, wxNORMAL, wxNORMAL)
+        fs = self.GetFont().GetPointSize()
+        bf = wxFont(fs+4, wxSWISS, wxNORMAL, wxBOLD)
+        nf = wxFont(fs+2, wxSWISS, wxNORMAL, wxNORMAL)
 
         t = wxStaticText(self, -1, "wxFileHistory")
         t.SetFont(bf)
@@ -58,10 +59,10 @@ class TestPanel(wxPanel):
         EVT_RIGHT_UP(self, self.OnRightClick)
         EVT_MENU(self, wxID_OPEN, self.OnFileOpenDialog)
         EVT_MENU_RANGE(self, wxID_FILE1, wxID_FILE9, self.OnFileHistory)
+        EVT_WINDOW_DESTROY(self, self.Cleanup)
 
 
-
-    def __del__(self):
+    def Cleanup(self, *args):
         del self.filehistory
         self.menu.Destroy()