Wednesday, March 05, 2008

click, drag ... eject! (oh, and logout)

These days you can run KDE apps natively on MacOS .. but that's not what I'm thinking about here. No, I'm thinking about a less recent Mac-related curio, circa 198x: my hand gently grasping the Mac-tethered mouse (cue the chuck-a-wa music here ;) and dragging the disc icon to the trash to eject it. Ooh yeah. Or when things went wrong, the slightly less romantic jabbing at the drive with a straightened paperclip to operate the manual eject mechanism.

While I many not get to relive the paper clip experience, we can do something for my drag-eject nostalgia! A few days back Marco Martin committed a change to the trash plasmoid he's written so that you can drag drives and discs from the Places view in Dolphin, the file open/save dialog, the Computer tab in kickoff, etc to the trash/recyle bin. Once dropped, the volume will be unmounted and, if applicable, the media is ejected.

It uses Solid, of course, to accomplish this: 7 lines of code plus 9 #include'd headers. (More headers than lines of code ... interesting.)

But I swear it's like stepping back to a time of fond childhood memories for me. Click .. drag .. eject! Yay! I may yet wear out the DVD drive on my laptop. ;)

Anyways, it tickled me so much that I just had to blog about it...

Also, since it's apparently all the rage to discuss how one can log out of KDE4, I figured I'd add to the mystery (?) and beauty (?!) of it all. KRunner (or, more accurately, the Sessions runner) understands the following commands: switch user, new session, logout, log out, restart, shutdown and lock. I'm sure you can guess what each one does.