#NEWLINE# def setGroup( self , new_group , save_prev = True ) : #NEWLINE# #INDENT# 'Put group on this screen' #NEWLINE# if ( new_group . screen == self ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if save_prev : #NEWLINE# #INDENT# self . previous_group = self . group #NEWLINE# #UNINDENT# if ( new_group is None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if new_group . screen : #NEWLINE# #INDENT# g1 = self . group #NEWLINE# s1 = self #NEWLINE# g2 = new_group #NEWLINE# s2 = new_group . screen #NEWLINE# s2 . group = g1 #NEWLINE# g1 . _setScreen ( s2 ) #NEWLINE# s1 . group = g2 #NEWLINE# g2 . _setScreen ( s1 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# old_group = self . group #NEWLINE# self . group = new_group #NEWLINE# new_group . _setScreen ( self ) #NEWLINE# if ( old_group is not None ) : #NEWLINE# #INDENT# old_group . _setScreen ( None ) #NEWLINE# #UNINDENT# #UNINDENT# hook . fire ( 'setgroup' ) #NEWLINE# hook . fire ( 'focus_change' ) #NEWLINE# hook . fire ( 'layout_change' , self . group . layouts [ self . group . currentLayout ] , self . group )