(self, item_name)
Set a layout item
Set a layout item
Set a layout item
def set_layout_item(self, item_name):
        """Set a layout item"""
        layout = self.config.layout_get_config(self.layout_name)
        layout_item = layout[self.layout_item]
        command = self.builder.get_object('layout_profile_command')
        chooser = self.builder.get_object('layout_profile_chooser')
        workdir = self.builder.get_object('layout_profile_workingdir')

        if layout_item['type'] != 'Terminal':
            command.set_sensitive(False)
            chooser.set_sensitive(False)
            workdir.set_sensitive(False)
            return

        command.set_sensitive(True)
        chooser.set_sensitive(True)
        workdir.set_sensitive(True)
        if 'command' in layout_item and layout_item['command'] != '':
            command.set_text(layout_item['command'])
        else:
            command.set_text('')

        if 'profile' in layout_item and layout_item['profile'] != '':
            chooser.set_active(self.profile_profile_to_ids[layout_item['profile']])
        else:
            chooser.set_active(0)

        if 'directory' in layout_item and layout_item['directory'] != '':
            workdir.set_text(layout_item['directory'])
        else:
            workdir.set_text('')
def set_layout_item ( self , item_name ) : layout = self . config . layout_get_config ( self . layout_name ) layout_item = layout [ self . layout_item ] command = self . builder . get_object ( 'layout_profile_command' ) chooser = self . builder . get_object ( 'layout_profile_chooser' ) workdir = self . builder . get_object ( 'layout_profile_workingdir' ) if layout_item [ 'type' ] != 'Terminal' : command . set_sensitive ( False ) chooser . set_sensitive ( False ) workdir . set_sensitive ( False ) return command . set_sensitive ( True ) chooser . set_sensitive ( True ) workdir . set_sensitive ( True ) if 'command' in layout_item and layout_item [ 'command' ] != '' : command . set_text ( layout_item [ 'command' ] ) else : command . set_text ( '' ) if 'profile' in layout_item and layout_item [ 'profile' ] != '' : chooser . set_active ( self . profile_profile_to_ids [ layout_item [ 'profile' ] ] ) else : chooser . set_active ( 0 ) if 'directory' in layout_item and layout_item [ 'directory' ] != '' : workdir . set_text ( layout_item [ 'directory' ] ) else : workdir . set_text ( '' )