]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/tools/XRCed/tools.py
Need to use wizard.GetPageAreaSizer().Add(page) now to get the layout
[wxWidgets.git] / wxPython / wx / tools / XRCed / tools.py
index d6264f22aa6fb55c7954e2c210b1ff5f1128ab6f..00f7103b1eefadf3c363a065fa3e93fab41c4d91 100644 (file)
@@ -15,7 +15,7 @@ GROUPNUM = 4
 GROUP_WINDOWS, GROUP_MENUS, GROUP_SIZERS, GROUP_CONTROLS = range(GROUPNUM)
 
 # States depending on current selection and Control/Shift keys
-STATE_ROOT, STATE_MENUBAR, STATE_TOOLBAR, STATE_MENU, STATE_ELSE = range(5)
+STATE_ROOT, STATE_MENUBAR, STATE_TOOLBAR, STATE_MENU, STATE_STDDLGBTN, STATE_ELSE = range(6)
 
 # Left toolbar for GUI elements
 class Tools(wxPanel):
@@ -210,6 +210,8 @@ class Tools(wxPanel):
                 state = STATE_TOOLBAR
             elif xxx.__class__ in [xxxMenu, xxxMenuItem]:
                 state = STATE_MENU
+            elif xxx.__class__ == xxxStdDialogButtonSizer:
+                state = STATE_STDDLGBTN
             else:
                 state = STATE_ELSE
 
@@ -228,6 +230,8 @@ class Tools(wxPanel):
                                         ID_NEW.MENU_ITEM,
                                         ID_NEW.SEPARATOR ],
                                       False)
+            elif state == STATE_STDDLGBTN:
+                pass                    # nothing can be added from toolbar
             elif state == STATE_MENUBAR:
                 self.EnableGroup(GROUP_MENUS)
                 self.EnableGroupItems(GROUP_MENUS,
@@ -273,9 +277,9 @@ class Tools(wxPanel):
                                       False)
                 self.EnableGroup(GROUP_SIZERS)
                 self.EnableGroup(GROUP_CONTROLS)
-        # Special case for notebook (always executed)
+        # Special case for *book (always executed)
         if state == STATE_ELSE:
-            if xxx.__class__ == xxxNotebook:
+            if xxx.__class__ in [xxxNotebook, xxxChoicebook, xxxListbook]:
                 self.EnableGroup(GROUP_SIZERS, False)
             else:
                 self.EnableGroup(GROUP_SIZERS)