Registered Member
|
Hello,
I'm preparing my own Kubuntu-based remastered ISO. One of things I'd like it to have, is customized Plasma desktop. This boils down do one thing: putting widgets of fixed size at custom [x,y]. So far, I have code like this:
Now, this works just fine, when run by hand from desktop console (having deleted all existing panels before, that is). This does not work, however, when run as init script during CD bootup. Widgets don't obey the set geometry, but are scaled and placed using the default Plasma algorithm instead. Things get clarified a bit after looking at generated plasma-desktop-appletsrc, where for each widget I get sth like this:
So basically, the geometry settings from my code go to "Configuration" instead of main widget config part, though I don't invoke currentConfigGroup() anywhere in the code. Written in the main config part is the geometry form Plasma calculations. I've read this thread: viewtopic.php?f=67&t=92001 and tried to tinker a bit with readConfig('geometry') in various configurations with writeConfig(), with no luck. Forcing rereading of parameters by call to reloadConfig() on every widget also seems to do nothing. What is more interesting, this code runs fine on KDE 4.5 after having uncommented the sleep() method between panel and widgets setup. KDE 4.6 seems to ignore that function when running script on init (I tried holding a script for half a minute - it certainly didn't pause for that long). So, my question to you guys is this: did anyone try doing this kind of stuff and is able to point me, what I'm doing wrong? And what has happened in 4.6 so that it stopped working? Ah, all this happens at Kubuntu 10.10 with KDE SC 4.5.4 (working) and updated to SC 4.6 via kubuntu-ppa (not working). I'd appreciate any help. Cheers, Chris |
Administrator
|
According to the Plasma developer I talked to, this is definitely not the intended behavior. Please file a bug at bugs.kde.org, posting the whole script and detailed information.
"Violence is the last refuge of the incompetent."
Plasma FAQ maintainer - Plasma programming with Python |
Registered Member
|
Hi,
Thanks for reply, sure will do. I guess what that means, however, is that you (or anyone here) rather can't come up with an idea how to workaround this problem, right? Or maybe there is some way to omit (or force-switch off) the plasma auto-placement algorithm? Basically, any temporary ugly hack will do for me - with one obvious exception of course: hardcoding setup in plasma-desktop-appletsrc is useless, as the screen resolution varies from run to run... Cheers |
Administrator
|
I'm not knowledgeable enough to know how to workaround it, and basing on my talks with a Plasma developer, this should just not happen at all... (the auto placement when you specify a geometry)
"Violence is the last refuge of the incompetent."
Plasma FAQ maintainer - Plasma programming with Python |
Registered Member
|
It works by using the following code:
When running first login maybe there is no activity for screen(0) tough Trying now |
Registered Member
|
Hi,
Thanks for reply. Last weekend I've tried similar code to this one, this time using KDE 4.6.2 from Kubuntu 10.10 repository. Using "settable" attribute of geometry field, rather than by writeConfig(), that is. It gave me even more weird result, as the wigdet didn't appear at all. Then in plasma-desktop-appletsrc I had this widget added, with position properly set, but of size (0,0) AFAIR. Something like
OK - I'll give it another go later today for various widgets and post the results. Oh - and yes, the activity surely was there when running this code - I've tried even to hardcode it in kubuntu-default-settings' plasma-desktop-appletsrc and just get a reference to it in JS. Ended up with the same result as when creating a new activity from JS. Chris |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]