'Put group on this screen'

def setGroup(self, new_group, save_prev=True):

    if (new_group.screen == self):
        return
    if save_prev:
        self.previous_group = self.group
    if (new_group is None):
        return
    if new_group.screen:
        g1 = self.group
        s1 = self
        g2 = new_group
        s2 = new_group.screen
        s2.group = g1
        g1._setScreen(s2)
        s1.group = g2
        g2._setScreen(s1)
    else:
        old_group = self.group
        self.group = new_group
        new_group._setScreen(self)
        if (old_group is not None):
            old_group._setScreen(None)
    hook.fire('setgroup')
    hook.fire('focus_change')
    hook.fire('layout_change', self.group.layouts[self.group.currentLayout], self.group)
