<commit_before>import QtQuick 2.0

ListItemBase {
    label: ClientName + ": " + Name
    icon: {
        if (ClientProperties['application.icon_name']) {
            return ClientProperties['application.icon_name'].toLowerCase();
        } else if (ClientProperties['application.process.binary']) {
            if (ClientProperties['application.process.binary'].toLowerCase() === 'chrome') {
                return 'google-chrome';
            }
            return ClientProperties['application.process.binary'].toLowerCase();
        }
        return 'unknown';
    }

    function setVolume(volume) {
        pulseContext.setSinkInputVolume(Index, volume);
    }
}<commit_msg>add a sink switch comobobox<commit_after>import QtQuick 2.0

import org.kde.plasma.components 2.0 as PlasmaComponents

import org.kde.plasma.volume 0.1

ListItemBase {
    label: ClientName + ": " + Name
    icon: {
        if (ClientProperties['application.icon_name']) {
            return ClientProperties['application.icon_name'].toLowerCase();
        } else if (ClientProperties['application.process.binary']) {
            if (ClientProperties['application.process.binary'].toLowerCase() === 'chrome') {
                return 'google-chrome';
            }
            return ClientProperties['application.process.binary'].toLowerCase();
        }
        return 'unknown';
    }
    // FIXME: all of this needs to be dependent on how many sinks we have...
    expanderIconVisible: false;
    enabled: true;
    subCount: 0;
    subComponent: PlasmaComponents.ComboBox {
        property int sinkIndex: SinkIndex;
        property int sinkInputIndex: Index;
        model: SinkModel {
            Component.onCompleted: setContext(pulseContext);
        }
        textRole: "Description";
        currentIndex: sinkIndex;
        onCurrentIndexChanged: {
            if (currentIndex != sinkIndex) {
                pulseContext.setSinkInputSink(sinkInputIndex, currentIndex);
            }
        }
    }

    function setVolume(volume) {
        pulseContext.setSinkInputVolume(Index, volume);
    }
}
{'fraction_non_alphanumeric': 0.10999521759923482, 'fraction_numerical': 0.00430416068866571, 'mean_word_length': 2.5278246205733557, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '809820', 'n_tokens_mistral': 544, 'n_tokens_neox': 544, 'n_words': 112}