Archive for the ‘Plasma’ Category

Plasma Bugs

12th January 2008

Just to say that a few Plasma bugs/wishes are likely to be recurring themes on bugs.kde.org. Rest assured we know about them.

  • Background image sometimes doesn’t load, and the background preview in the “Configure Desktop” dialog doesn’t always update. Fixed for 4.0.1.
  • Applethandles don’t always disappear when you move the cursor off the applet. This is due to a deficiency in the Qt Graphics Canvas hover event handling. We’re looking into either a sensible work around or for TrollTech to fix it. We have a 99% workaround for 4.0.1 (see aseigo’s comment on this post).
  • No panel configuration (apart from adding & removing applets). It’s coming.
  • If your desktop crashes (or you kill it with killall plasma - handy tip: use kquitapp) part way through your first run, only part of the config gets saved and you no longer have a panel. Fixed for 4.0.1 (see aseigo’s comment on this post).

Resize; Rotate; and Breathe…

8th January 2008

There have been many complaints about how resizing and rotating happens on widget handles. Hopefully most of those should be assuaged with the last few commits I’ve made.

Here’s what you used to get if you rotated an widget, moved off the widget (so the handles disappeared) and hovered over it again:

Resize; Rotate; and Breathe…

You’ll notice that the handle isn’t rotated, even though the widget is. Also, you’re expected to resize and rotate with a single button (which is the rotate symbol, despite the fact that you’re much more likely to want to resize than rotate the widget). There were also odd quirks with rotating where it would jump about when you released the mouse button or moved off the widget; and if you rotated it, released the mouse button then started rotating again (without leaving the widget), the widget would jump back to its “unrotated” state and start from there.

Well, now all that’s fixed:

Resize; Rotate; and Breathe…

There’s a separate resize button (it still maintains aspect ratio by default, because most widgets have an “ideal” ratio that they start with, but you can freely resize it with CTRL). The rotate button works as expected. And the handle starts at the same rotation as the applet.

Edit: A couple of things I meant to mention and forgot - this will be in 4.0.1, and the jagged edges do exist in the original, but are made worse by the scaling of the images (click on them to get full size).

Resizing plasmoids

5th January 2008

Until this morning, resizing plasma applets meant maintaining the aspect ratio. There was no way to make them wider without changing the height, or vice versa, without manually editing the plasma config file.

Well, if you are running trunk, you can now freely resize applets by holding CTRL while resizing. This won’t make it to 4.0.0 (which has already been tagged), but all the current fixes in plasma should be backported to the 4.0 branch before we move on to 4.1 development. So it should make it to 4.0.1, which is good as it’s quite an important feature for certain plasmoids.

Also, I’ve greatly improved the Now Playing applet:

Resizing plasmoids
The text size will stretch to fit the height of the applet and, if the text doesn’t fit the width of the applet, any excess text will be ellided:

Resizing plasmoids

This is why I needed free resizing…

Now Playing: MPRIS

29th December 2007

MPRIS is insane. MPRIS is well-thought out. MPRIS is a standard for querying and controlling any media player without having to know the details of each player’s remote interface. MPRIS is now supported by the Now Playing data engine.

All of the above statements are true, to varying degrees.

It’s insane because it uses the same interface name (org.freedesktop.MediaPlayer) for three different interfaces (one for each of the objects /, /Player and /TrackList). This causes havoc with Qt’s D-Bus interface compiler. Luckily, just about everything I need is exported by the /Player part of the interface. Unfortunately, the only way to get the current track number out of Audacious is using the /TrackList object.

It’s well-thought out in most other respects. It has signals for information changes (something missing in Juk’s D-Bus interface). It is generally adaptable to the capabilities of most media players, without going overboard. It has a sane system of informing clients about the capabilities of the player’s interface (such as whether you can skip to the next track, for example), even if Audacious isn’t entirely honest about what is possible.

It’s a universal standard that allows clients to be player-agnostic. Or, at least, that’s the idea. Currently, I can only find one client supporting it: Audacious (although VLC 0.9.0 should include MPRIS support). And Audacious diverges from the standard in a couple of respects, most noticeably in the metadata returned for a track. It doesn’t include the tracknumber (which is optional, but it would be nice if it returned it when it made sense). It uses “length” for the length of the track in seconds, rather than “time”. And, outside the metadata, it claims every action is possible, even when it isn’t, such as stopping when nothing is playing.

The Now Playing applet support MPRIS players. Or, at least, it supports Audacious, which is the only one I’ve tested it with. And it doesn’t give a track number even then. But hey, it’s better than nothing, right? And other players should work “out of the box”, providing they don’t need any hacks like Audacious’ length/time metadata issue.

So: Juk and MPRIS players are supported. Next, I think I’ll steal XMMS support from the Kopete Now Listening plugin.

Incidentally, the player-querying code in the Now Playing engine should be general enough to use with other projects that need to get this information. One possible future change is to make them plugins that can be loaded by anyone who wants them.

PS: Is it me, or are there loads of media players that all seem exactly the same (WinAMP, Audacious, XMMS, Beep)?

What’re you listening to?

17th December 2007

At the moment, I can only start most KDE3 applications by clearing the environment of KDE4 things (basically by su’ing to myself) and running them from there.  Which means session management doesn’t work.  I got fed up with doing this with Amarok, so I’ve started using Juk as a stand-in until Amarok 2 is usable.

Now, I miss kirocker, which provided my KDE3 desktop with information about what music was playing in Amarok.  But, Plasma to the rescue!  In a reasonably short amount of time, I had a nowplaying data engine that queried Juk for what was currently being played.  It should be easily extensible to work with other players, but Juk is what I’m using at the moment.

I also hacked together a rough-and-ready applet that displays some of the information:

The Now Playing Applet

The engine should probably get some ability to execute commands like “play”, “pause”, “stop”, “next” and “previous”.  Publishing the volume might be a good idea, too.

The applet needs a lot of work.  In theory, the engine can pass album artwork, although Juk doesn’t publish it.  And there’s a lot more information available than what it printed there.  And long titles result in very small text.  If you fancy hacking around with the applet and making it pretty, be my guest: it’s all in playground.

Plasma

3rd December 2007

Given how my motivation went out the window when the interminable discussions about kdeprint happened (and it wasn’t even me or my work being attacked), I have great admiration for the people, like Aaron and the Oxygen team, who have carried on working despite being constantly attacked on the Planet and on the mailing lists for what is perceived as the sorry state of the desktop.

I can’t claim to have done huge amounts of work on Plasma, but I’ve done some and I keep up with what’s going on there, mainly.  On top of that, I’ve been running KDE 4 as my default session for a couple of weeks now, and I regularly rebuild everything.

I’m extremely impressed at the rate of improvement of the desktop.  Every time I svn up and recompile, some bug is fixed or some feature starts working correctly, or some new feature appears.  I’m becoming more and more comfortable with KDE 4 as my desktop.

Just in the last week, Jason Stubbs fixed the system tray.  Aaron posted that he’d fixed the Plasma crash on logout (I, meanwhile, couldn’t even figure out how to get a backtrace, since “killall plasma” doesn’t create the crash and logging out means Dr Konqi disappears before it loads the backtrace).  The Solid Device Notifier started working properly.

All these little improvements add up.  And the remaining major issues are being worked on as I write - in particular, the taskbar (which is functional, but not brilliant), panel placement and panel autohiding.

I can’t wait for the release!

PS: I also love the composite effects in KWin.  It’s really annoying that turning it on with my computer (ATI X300, free drivers) causes artifacts to appear that make using it really irritating.  When I get the chance, I’ll check with Compiz to see where the bug lies.

Where did that fishy go? A Places data engine.

9th September 2007

You know that side bar in Dolphin and the file open/save dialogue boxes? The one that lists things like “Home” “Root” “Volume (vfat)” “Remote” etc? Yes, that one.

There’s now a data engine for it. You can fire up plasmaengineexplorer and check it out, if you like. You know, if you’re particularly bored.

The implementation uses KFilePlacesModel. And KFreeDiskSpace from KIO. Because logically related things are never put together in APIs :-P.

One of the interesting things about KFilePlacesModel is what does and doesn’t propagate between programs.

For example, if you change the name of “Home” to “Home Directory” in Dolphin, the KFilePlacesModel will notice and tell the Places engine that the old data is invalid. And the engine will duly send the updated information to whoever asked for it.

However, if you mount (”set up” in Solid terminology) a removable device in Dolphin (by clicking on it), the KFilePlacesModel in the Places data engine won’t notice. So Places will still claim that the device needs setting up and has no URL (mount point), and will not tell you about free disk space. How rude. In fact, the same goes for hiding/unhiding places.

Unfortunately, Solid doesn’t provide this kind of notification, either (should it?). And it wouldn’t fix the hiding problem even if it did (although that’s not so important). So the only solution I can see is to periodically refresh the data.

Well, the real solution would be to make KFilePlacesModel pick up on these things. But that’s more work than I’m willing to do right now, with kdeprint to look at as well.