def _set_wstype(self, wstype):
        if wstype in ('tabs', 'nb', 'ws'):
            wstype = 'tabs'
            self.nb = Widgets.TabWidget(detachable=self.detachable,
                                            group=self.group)
        elif wstype == 'mdi':
            self.nb = Widgets.MDIWidget(mode='mdi')

        elif wstype == 'stack':
            self.nb = Widgets.StackWidget()

        elif wstype == 'grid':
            self.nb = SymmetricGridWidget()

        if self.nb.has_callback('page-switch'):
            self.nb.add_callback('page-switch', self._switch_page_cb)
        if self.nb.has_callback('page-detach'):
            self.nb.add_callback('page-detach', self._detach_page_cb)

        self.wstype = wstype
dataset/ETHPy150Open ejeschke/ginga/ginga/gw/Desktop.py/Workspace._set_wstype/original