(self, window)
Class initialiser
Class initialiser
Class initialiser
def __init__(self, window):
        """Class initialiser"""
        if isinstance(window.get_child(), Gtk.Notebook):
            err('There is already a Notebook at the top of this window')
            raise(ValueError)

        Container.__init__(self)
        GObject.GObject.__init__(self)
        self.terminator = Terminator()
        self.window = window
        GObject.type_register(Notebook)
        self.register_signals(Notebook)
        self.connect('switch-page', self.deferred_on_tab_switch)
        self.connect('scroll-event', self.on_scroll_event)
        self.connect('create-window', self.create_window_detach)
        self.configure()

        self.set_can_focus(False)

        child = window.get_child()
        window.remove(child)
        window.add(self)
        window_last_active_term = window.last_active_term
        self.newtab(widget=child)
        if window_last_active_term:
            self.set_last_active_term(window_last_active_term)
            window.last_active_term = None

        self.show_all()
def __init__ ( self , window ) : if isinstance ( window . get_child ( ) , Gtk . Notebook ) : err ( 'There is already a Notebook at the top of this window' ) raise ( ValueError ) Container . __init__ ( self ) GObject . GObject . __init__ ( self ) self . terminator = Terminator ( ) self . window = window GObject . type_register ( Notebook ) self . register_signals ( Notebook ) self . connect ( 'switch-page' , self . deferred_on_tab_switch ) self . connect ( 'scroll-event' , self . on_scroll_event ) self . connect ( 'create-window' , self . create_window_detach ) self . configure ( ) self . set_can_focus ( False ) child = window . get_child ( ) window . remove ( child ) window . add ( self ) window_last_active_term = window . last_active_term self . newtab ( widget = child ) if window_last_active_term : self . set_last_active_term ( window_last_active_term ) window . last_active_term = None self . show_all ( )