cat /dev/maxilys

A glance in the mind of a KDE/Linux developer to see how ideas turn into code.

2007-03-10

KDE: Yes and No

Or "The Difference in between Theory and Practice". I had great plans about Kassie just before I went to bed. In theory, it should have been possible to change it into a simple PanelButton (without K!). I went all through Kafka's Metamorphosis process from KPanelApplet to PanelButton --These AutoTools are a real nightmare!-- and I hit a wall. Hard!

Maybe should I say a big sign. It was labelled "Members only". So... I was totally right last time when I wrote about Kicker's Very Private Club that doesn't accept outsiders --anything coming from outside of its build tree-- despite the appearances.

Just for the fun, here's what I got: Kassie normally appeared in the applets to install, I selected it and clicked "Add to panel". I got the little animation with the big tip saying "Kassie is in da house". (Something like that...) ;-) Kassie's icon appeared in Kicker's panel... 1/4 of second of pure glory... And it was immediately replaced with the icon for the unknown documents. Kassie just got kicked out by the Kicker. (Lousy pun intended.) The icon reacted as if there was "somebody" behind it but that was all. Kassie even had no name any more so I uninstalled « » and forgot about the whole idea.

I had copied everything from the other Kicker's PanelButtons... Except one thing: Kassie couldn't climb back into Kicker's womb where the other PanelButtons are. That's the problem as a quick search proved to me, they aren't independant objects. In other words: "Members only!"

So, with the few choices Kicker gives us, Kassie is a KPanelApplet... again! It's going to live with its extraneous handle until KDE 4 and Plasma which --I definitely hope-- will be more open.

Lucky me, I won't have all these problems to enter the KMenu. The KPanelAppMenus are independent objects. And I already know where I'm going to search for "inspiration". (Rip! Rip! Rip!) ;-) Let's get started! Well, first, I'm going to that french bakery are the corner of the street and find something sweet to give some energy to my brain.

In between parentheses, I'm happy to be able --again!-- to use Konqueror to type in my blog, with my KDE fonts, with the right sizes. I hate Firefox which is so slow to start and has a major problem with fonts sizes.

For those interested and who haven't yet gone to bugs.kde.org, --It took me time, too!-- the solution is to set Konqueror's identification to Firefox for www2.blogger.com (and eventually www.blogger.com). Still, it's better not to use the preview. Blogger is... hmm... what it is. End of parenthesis.

Labels: , ,

5 Comments:

At 10 March, 2007 16:55, Blogger pvandewyngaerde said...

"In theory, there is no difference between theory and practice. But, in practice, there is."

 
At 10 March, 2007 17:32, Blogger Rich Moore said...

One way around this is to walk the widget tree until you find the handle, then call hide() on it yourself.

Rich.

 
At 10 March, 2007 18:53, Blogger Unknown said...

great prose; perhaps you could offer some technical details along with it. because, you know, maybe there's a way of accomplishing whatever it is you are trying to accomplish. without technical data (e.g. exactly what you're trying to do, what exact problems you ran into, etc.) i couldn't say, however.

 
At 11 March, 2007 04:11, Blogger Maxilys said...

@Aaron: I was trying to build a Kicker's applet and I wanted it to be a PanelButton. The technical details as you say were directly cut and pasted from kdebase-3.5.6/kicker/kicker/buttons/* They were totally unimaginative, so not worth mentioning. Next time, I'll do better for my technical audience. ("a." reads my blog! "a." reads my blog!) ;-)

@Rich: I don't think that's possible. At least, it won't work in every situation. In my Kicker, the handles appear only on mouseover. It's more than an educated guess to suppose that "somebody" already calls hide() and show() to produce that effect. And since the applets don't "step aside" to make room for their handle, one can assume that their space is reserved. Adding anothing hide() in the process won't produce any visible result IMHO. I'm going to wait for Plasma/KDE4...

 
At 12 March, 2007 14:28, Blogger Rich Moore said...

You've not understood how the handles work. Do a dumpObjectTree() and you'll see that the handle is there even when the mouse isn't over it. I've used this solution before so I know it works. ;-)

 

Post a Comment

<< Home