'Setup list widget content for file list display.'

def setup_file_list(self, filter_text, current_path):

    short_paths = shorten_paths(self.paths, self.save_status)
    paths = self.paths
    icons = self.icons
    results = []
    trying_for_line_number = (':' in filter_text)
    if trying_for_line_number:
        (filter_text, line_number) = filter_text.split(':')
    else:
        line_number = None
    scores = get_search_scores(filter_text, self.filenames, template='<b>{0}</b>')
    max_width = self.get_item_size(paths)[0]
    self.fix_size(paths)
    for (index, score) in enumerate(scores):
        (text, rich_text, score_value) = score
        if (score_value != (-1)):
            text_item = (('<big>' + rich_text.replace('&', '')) + '</big>')
            if trying_for_line_number:
                text_item += '    [{0:}    {1:}]'.format(self.line_count[index], _('lines'))
            if (max_width > self.list.width()):
                text_item += u'<br><i>{0:}</i>'.format(short_paths[index])
            else:
                text_item += u'<br><i>{0:}</i>'.format(paths[index])
            results.append((score_value, index, text_item))
    self.filtered_path = []
    plugin = None
    for result in sorted(results):
        index = result[1]
        path = paths[index]
        icon = icons[index]
        text = ''
        try:
            title = self.widgets[index][1].get_plugin_title().split('    -    ')
            if (plugin != title[0]):
                plugin = title[0]
                text += (('<br><big><b>' + plugin) + '</b></big><br>')
                item = QListWidgetItem(text)
                item.setToolTip(path)
                item.setSizeHint(QSize(0, 25))
                item.setFlags(Qt.ItemIsEditable)
                self.list.addItem(item)
                self.filtered_path.append(path)
        except:
            pass
        text = ''
        text += result[(-1)]
        item = QListWidgetItem(icon, text)
        item.setToolTip(path)
        item.setSizeHint(QSize(0, 25))
        self.list.addItem(item)
        self.filtered_path.append(path)
    self.list.files_list = True
    if (current_path in self.filtered_path):
        self.set_current_row(self.filtered_path.index(current_path))
    elif self.filtered_path:
        self.set_current_row(0)
    self.line_number = line_number
    self.goto_line(line_number)
