]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/tools/XRCed/tools.py
implemented locating objects in gridbag sizer,
[wxWidgets.git] / wxPython / wx / tools / XRCed / tools.py
index 6f5c9a0f8b7c8778b734fb655302c101d2eac7eb..f13a9cbb57dc1d31e0184759800838d5f0bd37a7 100644 (file)
@@ -230,7 +230,7 @@ class Tools(wxPanel):
                                         ID_NEW.MENU_ITEM,
                                         ID_NEW.SEPARATOR ],
                                       False)
-            if state == STATE_STDDLGBTN:
+            elif state == STATE_STDDLGBTN:
                 pass                    # nothing can be added from toolbar
             elif state == STATE_MENUBAR:
                 self.EnableGroup(GROUP_MENUS)
@@ -277,13 +277,15 @@ 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)
                 if not (xxx.isSizer or xxx.parent and xxx.parent.isSizer):
                     self.EnableGroupItem(GROUP_SIZERS, ID_NEW.SPACER, False)
+            if xxx.__class__ == xxxFrame:
+                self.EnableGroupItem(GROUP_MENUS, ID_NEW.MENU_BAR)
         # Save state
         self.state = state