blue-systems / plasma-5.5

Plasma 5.2 - 5.5
0 stars 0 forks source link

[volume in systray]: right-click "Sound Volume Settings" opens empty dialog #113

Closed star-buck closed 9 years ago

star-buck commented 9 years ago

it would be nice to open the new kcm_pulseaudio mixer settings dialog in that popup (similar to kde4). Maybe someone can get Harald a tip how to achieve this?

mck182 commented 9 years ago

Something along these lines in applet's main file:

...

import org.kde.kquickcontrolsaddons 2.0

function action_soundkcm() {
    KCMShell.open("name_of_the_kcm");
}

Component.onCompleted: {
    plasmoid.setAction("soundkcm", i18n("Sound Volume Settings..."));
}
mck182 commented 9 years ago

Actually watch out for calling it "Sound Volume Settings" because then you'll have two same entries in the context menu - this one and the default plasmoid one. I don't think you can embed the kcm in the default config dialog unless that kcm is done using QtQuickControls.

hsitter commented 9 years ago

@mck182 the kcm is qtquick

notmart commented 9 years ago

yes, that's a problem of plasma5. in the past you could just embed kcms in the config dialogs, but now that config dialogs are done in QML, you can't put kcms there anymore.

so you can either replace the configure action or having 2 entries. If you replace it tough, you lose the config for the keyboard shortcut that would open the popup.

notmart commented 9 years ago

@apachelogger uh, really? if it's done with the KDeclararative::ConfigModule api, we can try to make some machinery to embed the kcm in the confg dialog as it used to be. (would require Plasma 5.4 tough, so if it's planned to be shipped on 5.3 would either need a patched one or the double actions kept until then)

hsitter commented 9 years ago

@notmart import org.kde.kcm 1.0 ;)

notmart commented 9 years ago

where is the code for that? all in scratch/sitter/plasma-volume-control ?

notmart commented 9 years ago

but yeah, i think we can do something with that then ;)

hsitter commented 9 years ago

http://quickgit.kde.org/?p=scratch%2Fsitter%2Fplasma-volume-control.git&a=tree&h=66cc92be0483134598230ce041f96b7558c8b0cf&hb=dc8a8f9f4498aedd7dedcadfdf7b2e63fb501dc4&f=src%2Fkcm%2Fpackage

star-buck commented 9 years ago

Whats this? ^^ Can it be packaged to make it work in netrunner-.16-ci-fixes?

notmart commented 9 years ago

for now it would have to either have 2 context menu entries or replace the config action losing the shortcut config, in the way @mck182 shown.

For 5.4 i would like to have it done the proper way, since the kcm is already in qml it can be loaded inside the plasmoid config window. if i manage to do it completely in plasma-framework it could be integrated even before, with new frameworks, we'll see.

star-buck commented 9 years ago

so for netrunner-16, which would be due next week, I need someone to decide for one of the solutions then: a patch, link to code, note to harald to make a package, package put in netrunner-16-ci-fixes, leszek ships package in ISO.

notmart commented 9 years ago

this is a patch that replaces the action: http://paste.opensuse.org/4665433 wether is better as a netrunner patch or upstream for a while (maybe in a release branch?) leaving @apachelogger to say :)

hsitter commented 9 years ago

@star-buck I'll need to know where we get the package from for netrunner 16, or at least which version the current one has so I can prepare an update.

star-buck commented 9 years ago

@apachelogger : the currently used package is from here: https://launchpad.net/~netrunner-os/+archive/ubuntu/netrunner-16-extras I guess its copied over from blueshellnext ppa...

hsitter commented 9 years ago

ok, new snapshot: https://launchpad.net/~netrunner-os/+archive/ubuntu/netrunner-16-ci-fixes/+sourcepub/5043133/+listing-archive-extra

this version should make the settings of the applet open the KCM and restore the ability to show application streams

star-buck commented 9 years ago

awesome, just somehow hasn't build yet...

hsitter commented 9 years ago

https://launchpad.net/~netrunner-os/+archive/ubuntu/netrunner-16-ci-fixes/+sourcepub/5044785/+listing-archive-extra

fixed version

star-buck commented 9 years ago

great, will test now thanks!

star-buck commented 9 years ago

tested and works!