]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/demo/Main.py
Damn broken pipes.
[wxWidgets.git] / utils / wxPython / demo / Main.py
index f5292d51f0ed06f39a200a1574815ca26eddfe77..aa3d1776daf58d1b91864ba7fd055203924df105 100644 (file)
@@ -21,7 +21,8 @@ _useSplitter       = true
 _useNestedSplitter = true
 
 _treeList = [
 _useNestedSplitter = true
 
 _treeList = [
-    ('New since last release', ['wxMVCTree', 'wxVTKRenderWindow']),
+    ('New since last release', ['wxMVCTree', 'wxVTKRenderWindow',
+                                'FileBrowseButton']),
 
     ('Managed Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame']),
 
 
     ('Managed Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame']),
 
@@ -49,7 +50,8 @@ _treeList = [
 
     ('wxPython Library', ['Layoutf', 'wxScrolledMessageDialog',
                           'wxMultipleChoiceDialog', 'wxPlotCanvas', 'wxFloatBar',
 
     ('wxPython Library', ['Layoutf', 'wxScrolledMessageDialog',
                           'wxMultipleChoiceDialog', 'wxPlotCanvas', 'wxFloatBar',
-                          'PyShell', 'wxCalendar', 'wxMVCTree', 'wxVTKRenderWindow']),
+                          'PyShell', 'wxCalendar', 'wxMVCTree', 'wxVTKRenderWindow',
+                          'FileBrowseButton',]),
 
     ('Cool Contribs', ['pyTree', 'hangman', 'SlashDot', 'XMLtreeview']),
 
 
     ('Cool Contribs', ['pyTree', 'hangman', 'SlashDot', 'XMLtreeview']),
 
@@ -61,6 +63,8 @@ class wxPythonDemo(wxFrame):
     def __init__(self, parent, id, title):
         wxFrame.__init__(self, parent, -1, title, size = (725, 550))
 
     def __init__(self, parent, id, title):
         wxFrame.__init__(self, parent, -1, title, size = (725, 550))
 
+        self.cwd = os.getcwd()
+
         if wxPlatform == '__WXMSW__':
             self.icon = wxIcon('bitmaps/mondrian.ico', wxBITMAP_TYPE_ICO)
             self.SetIcon(self.icon)
         if wxPlatform == '__WXMSW__':
             self.icon = wxIcon('bitmaps/mondrian.ico', wxBITMAP_TYPE_ICO)
             self.SetIcon(self.icon)
@@ -238,6 +242,7 @@ class wxPythonDemo(wxFrame):
 
     #---------------------------------------------
     def RunDemo(self, itemText):
 
     #---------------------------------------------
     def RunDemo(self, itemText):
+        os.chdir(self.cwd)
         if self.nb.GetPageCount() == 3:
             if self.nb.GetSelection() == 2:
                 self.nb.SetSelection(0)
         if self.nb.GetPageCount() == 3:
             if self.nb.GetSelection() == 2:
                 self.nb.SetSelection(0)