Changeset View
Changeset View
Standalone View
Standalone View
src/kcm/package/contents/ui/Applications.qml
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | Copyright 2014-2015 Harald Sitter <sitter@kde.org> | 2 | Copyright 2014-2015 Harald Sitter <sitter@kde.org> | ||
3 | Copyright 2016 David Rosca <nowrep@gmail.com> | 3 | Copyright 2016 David Rosca <nowrep@gmail.com> | ||
4 | Copyright 2019 Sefa Eyeoglu <contact@scrumplex.net> | ||||
4 | 5 | | |||
5 | This program is free software; you can redistribute it and/or | 6 | This program is free software; you can redistribute it and/or | ||
6 | modify it under the terms of the GNU General Public License as | 7 | modify it under the terms of the GNU General Public License as | ||
7 | published by the Free Software Foundation; either version 2 of | 8 | published by the Free Software Foundation; either version 2 of | ||
8 | the License or (at your option) version 3 or any later version | 9 | the License or (at your option) version 3 or any later version | ||
9 | accepted by the membership of KDE e.V. (or its successor approved | 10 | accepted by the membership of KDE e.V. (or its successor approved | ||
10 | by the membership of KDE e.V.), which shall act as a proxy | 11 | by the membership of KDE e.V.), which shall act as a proxy | ||
11 | defined in Section 14 of version 3 of the license. | 12 | defined in Section 14 of version 3 of the license. | ||
Show All 28 Lines | 39 | Component.onCompleted: { | |||
40 | width = Qt.binding(function() { | 41 | width = Qt.binding(function() { | ||
41 | return scrollView.width; | 42 | return scrollView.width; | ||
42 | }); | 43 | }); | ||
43 | } | 44 | } | ||
44 | 45 | | |||
45 | Header { | 46 | Header { | ||
46 | Layout.fillWidth: true | 47 | Layout.fillWidth: true | ||
47 | enabled: eventStreamView.count || sinkInputView.count | 48 | enabled: eventStreamView.count || sinkInputView.count | ||
48 | text: i18nd("kcm_pulseaudio", "Playback") | 49 | text: i18nd("kcm_pulseaudio", "Playback Streams") | ||
ngraham: I don't think the addition of the word "Streams" adds useful information here. | |||||
sefaeyeoglu: The applet already says Streams here. | |||||
49 | disabledText: i18ndc("kcm_pulseaudio", "@label", "No Applications Playing Audio") | 50 | disabledText: i18ndc("kcm_pulseaudio", "@label", "No Applications Playing Audio") | ||
50 | } | 51 | } | ||
51 | 52 | | |||
52 | ListView { | 53 | ListView { | ||
53 | id: eventStreamView | 54 | id: eventStreamView | ||
54 | Layout.fillWidth: true | 55 | Layout.fillWidth: true | ||
55 | Layout.preferredHeight: contentHeight | 56 | Layout.preferredHeight: contentHeight | ||
56 | Layout.margins: units.gridUnit / 2 | 57 | Layout.margins: units.gridUnit / 2 | ||
57 | interactive: false | 58 | interactive: false | ||
58 | spacing: units.largeSpacing | 59 | spacing: units.largeSpacing | ||
59 | model: PulseObjectFilterModel { | 60 | model: PulseObjectFilterModel { | ||
60 | filters: [ { role: "Name", value: "sink-input-by-media-role:event" } ] | 61 | filters: [ { role: "Name", value: "sink-input-by-media-role:event" } ] | ||
61 | sourceModel: StreamRestoreModel {} | 62 | sourceModel: StreamRestoreModel {} | ||
62 | } | 63 | } | ||
63 | delegate: StreamListItem { | 64 | delegate: StreamListItem { | ||
64 | deviceModel: sinkModel | 65 | deviceModel: sinkModel | ||
66 | isPlayback: true | ||||
65 | } | 67 | } | ||
66 | } | 68 | } | ||
67 | 69 | | |||
68 | ListView { | 70 | ListView { | ||
69 | id: sinkInputView | 71 | id: sinkInputView | ||
70 | Layout.fillWidth: true | 72 | Layout.fillWidth: true | ||
71 | Layout.preferredHeight: contentHeight | 73 | Layout.preferredHeight: contentHeight | ||
72 | Layout.margins: units.gridUnit / 2 | 74 | Layout.margins: units.gridUnit / 2 | ||
73 | interactive: false | 75 | interactive: false | ||
74 | spacing: units.largeSpacing | 76 | spacing: units.largeSpacing | ||
75 | model: PulseObjectFilterModel { | 77 | model: PulseObjectFilterModel { | ||
76 | filters: [ { role: "VirtualStream", value: false } ] | 78 | filters: [ { role: "VirtualStream", value: false } ] | ||
77 | sourceModel: SinkInputModel {} | 79 | sourceModel: SinkInputModel {} | ||
78 | } | 80 | } | ||
79 | delegate: StreamListItem { | 81 | delegate: StreamListItem { | ||
80 | deviceModel: sinkModel | 82 | deviceModel: sinkModel | ||
83 | isPlayback: true | ||||
81 | } | 84 | } | ||
82 | } | 85 | } | ||
83 | 86 | | |||
84 | Header { | 87 | Header { | ||
85 | Layout.fillWidth: true | 88 | Layout.fillWidth: true | ||
86 | enabled: sourceOutputView.count > 0 | 89 | enabled: sourceOutputView.count > 0 | ||
87 | text: i18nd("kcm_pulseaudio", "Recording") | 90 | text: i18nd("kcm_pulseaudio", "Recording Streams") | ||
please don't remove the i18nd you'll break translations if the kcm is loaded within the applet davidedmundson: please don't remove the i18nd
you'll break translations if the kcm is loaded within the applet | |||||
ngraham: ditto | |||||
88 | disabledText: i18ndc("kcm_pulseaudio", "@label", "No Applications Recording Audio") | 91 | disabledText: i18ndc("kcm_pulseaudio", "@label", "No Applications Recording Audio") | ||
89 | } | 92 | } | ||
90 | 93 | | |||
91 | ListView { | 94 | ListView { | ||
92 | id: sourceOutputView | 95 | id: sourceOutputView | ||
93 | Layout.fillWidth: true | 96 | Layout.fillWidth: true | ||
94 | Layout.preferredHeight: contentHeight | 97 | Layout.preferredHeight: contentHeight | ||
95 | Layout.margins: units.gridUnit / 2 | 98 | Layout.margins: units.gridUnit / 2 | ||
96 | interactive: false | 99 | interactive: false | ||
97 | spacing: units.largeSpacing | 100 | spacing: units.largeSpacing | ||
98 | model: PulseObjectFilterModel { | 101 | model: PulseObjectFilterModel { | ||
99 | filters: [ { role: "VirtualStream", value: false } ] | 102 | filters: [ { role: "VirtualStream", value: false } ] | ||
100 | sourceModel: SourceOutputModel {} | 103 | sourceModel: SourceOutputModel {} | ||
101 | } | 104 | } | ||
102 | 105 | | |||
103 | delegate: StreamListItem { | 106 | delegate: StreamListItem { | ||
104 | deviceModel: sourceModel | 107 | deviceModel: sourceModel | ||
108 | isPlayback: false | ||||
105 | } | 109 | } | ||
106 | } | 110 | } | ||
107 | } | 111 | } | ||
108 | } | 112 | } |
I don't think the addition of the word "Streams" adds useful information here.