Skip to content

Commit

Permalink
v0.2.14
Browse files Browse the repository at this point in the history
  • Loading branch information
rbn42 committed Nov 10, 2019
1 parent cbfba4f commit 24b9448
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
20 changes: 14 additions & 6 deletions kde/plasmoid/contents/ui/config/ConfigBackend.qml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,13 @@ Kirigami.FormLayout {

QQC2.ComboBox {
id:pulseaudioDevice
model: ListModel {
id: pdItems
}
textRole:'name'
onCurrentIndexChanged:{
if(currentText.length>0)
cfg_pulseaudioDevice= pulseaudioDevice.model[currentIndex]
cfg_pulseaudioDevice= pdItems.get(currentIndex).id
}
}
}
Expand Down Expand Up @@ -109,12 +113,16 @@ Kirigami.FormLayout {
onNewData: {

if(sourceName==sh_get_pa_devices){
pdItems.append({name:'default',id:'default'})
var lst=JSON.parse(data.stdout)
lst.unshift('default')
lst.push('all')
pulseaudioDevice.model=lst
for(var i=0;i<lst.length;i++)
if(lst[i]==cfg_pulseaudioDevice)
for(var i in lst)
pdItems.append(lst[i])
if(lst.length>1){
pdItems.append({name:"Mixing All Microphones and Speakers",id:'all'})
}

for(var i=0;i<pulseaudioDevice.count;i++)
if(pdItems.get(i).id==cfg_pulseaudioDevice)
pulseaudioDevice.currentIndex=i;
}else if(sourceName==sh_get_styles){
}else if(sourceName==sh_get_devices){
Expand Down
2 changes: 1 addition & 1 deletion kde/plasmoid/metadata.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ X-KDE-ServiceTypes=Plasma/Applet
X-KDE-PluginInfo-Author=rbn42
X-KDE-PluginInfo-Email=
X-KDE-PluginInfo-Name=panon
X-KDE-PluginInfo-Version=0.2.13
X-KDE-PluginInfo-Version=0.2.14
X-KDE-PluginInfo-Website=github.com/rbn42/panon
X-KDE-PluginInfo-Category=Multimedia
X-KDE-PluginInfo-Depends=
Expand Down
2 changes: 1 addition & 1 deletion panon/get_pa_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

l = []
for mic in sc.all_microphones(exclude_monitors=False):
l.append(mic.id)
l.append({'id': mic.id, 'name': mic.name})
s = json.dumps(l)
print(s)

0 comments on commit 24b9448

Please sign in to comment.