- elif isinstance(xxx, xxxStatusBar): return None
- elif isinstance(xxx, xxxToolBar):
- # If it's the main toolbar, we can't really select it
+ elif xxx.__class__ in [xxxStatusBar, xxxMenu, xxxMenuItem, xxxSeparator]: return None
+ elif xxx.__class__ in [xxxToolBar, xxxMenuBar]:
+ # If it's the main toolbar or menubar, we can't really select it