Exemplo n.º 1
0
    def init_gui(self):
        """
        Do changes to the GUI while entering this mode. This includes opening 
        the property manager, updating the command toolbar, connecting widget 
        slots etc. 

        Called once each time the mode is entered; should be called only by code 
        in modes.py

        @see: L{self.restore_gui}
        """
        self.enable_gui_actions(False)
        self.dont_update_gui = True
        self.pastable = None

        if not self.propMgr:
            self.propMgr = PastePropertyManager(self)
            changes.keep_forever(self.propMgr)

        self.propMgr.show()

        self.connect_or_disconnect_signals(True)
        self.updateCommandToolbar(bool_entering=True)

        #Following is required to make sure that the
        #clipboard groupbox in paste mode is updated
        #(This is done by calling depositeMode.update_gui method
        #Not only that, but the above mentioned method also defines
        #self.pastable_list which is needed to paste items! This needs a
        #separate code clean up in depositmode.py -- Ninad 20070827
        self.dont_update_gui = False