[Screencast] KMix QML Applet, the real one

When I started writing my last blog post, exactly two weeks ago, I never imagined that I would receive so many positive feedbacks and responses1 for a project that, as I’ve always restated, was just an proof of concept and nothing more.

Anyways that experiment (and the act of sharing it with the community) leaded, besides the comments, to an awesome consequence: the developer in charge to improve KMix DBus interface and provide the Plasma applet replacement, Igor Poboiko2, sent me an email the same day I wrote the aforementioned post.

Long story short: he was busy (like me) with College duties so, after refactoring the DBus interface, he was forced to stop his work. But theΒ  amazing news was an other: he even wrote a Plasma DataEngine, and a Plasma Service for KMix πŸ˜€

So we joined our forces,Β  I advised him to publish his work on reviewboard (he did a huge work, kudos!) to receive more feedbacks about his doings and I started coding, on my spare time, to a new KMix applet replacement. Since I had at my disposal this new “mixer” Plasma DataEngine, I started wondering why not making a QML applet, instead of a regular C++ plasmoid.

No sooner said than done, and this is the result (still incomplete) of my work:

[blip.tv http://blip.tv/play/AYKsjjsA%5D

[HQ Version]

The applet has all the basic functionalities required for a mixer, you can modify the volume level/state for each control (in my past experiment, I was only able to act on the Master) but still, there is a lot of room for improvements.

I was really impressed about the power of QML and Plasma technology combined (plus some Javascript flavors),Β  I think I’m in love with them πŸ™‚

As soon as Igor’s work will be published, also mine will land on reviewboard and, hopefully, will be part of the kdemultimedia module πŸ™‚

Stay tuned for updates, cheers!

_______________________________________________________________

1: I even scored the busiest day on my blog, and my previous record was half of the visit I received that day O.o↑
2: Unfortunately, he doesn’t have a blog; I’ve found his sourceforge and twitter page, if you are interested↑

Advertisements

KMix plasmified [Screencast]

Hello folks, it’s been a looong time since my last post. Three months ago, during the Christmas holydays, and inspired by Aurelien’s posts about how improve UI’s in KDE-Land, I got inspired and started submitting some small patches to plasma and ksysguard, and then I focused on an application I (and I think all of you) use a lot: the audio applet.

KMix has a fancy monochrome tray icon, which makes it appear homogeneous with the other plasmoids contained in the Notification area. From a non-developer point of view, this is great: the user doesn’t need to know the difference between a regular application and a plasmoid placed in the notification area; he/she simply has to use it. The problem raises exactly when we want to use it: instead of showing to the user a beatiful interface which takes advantage of the Plasma API, the audio applet shows the old and plain slider with a regular pushbutton, destroying the feeling of an homogeneous and polished panel. Moreover, if the notification area is embedded in a vertical panel, when you click the KMix tray icon, the widget partially covers the panel.

For these reasons, I started porting KMix as plasmoid. I encountered some troubles so I contacted the mantainer whom kindly told me that port was already started by an other developer. So I leaved that project, and focused on something else. Why this post then, you may ask?

About one month ago my exams session started and, as usual, I got inspired on some projects (daaaamn :P) and specifically on KMix. I was curious to see how a possible port of KMix to Plasma would look like, so I’ve started this small experiment/proof of concept.

In the video below, you can see what I did, plus a cool feature made possible thanks to Plasma:Β  a minimalistic media panel πŸ™‚

(Sorry for the bad quality of the video, but recordmydesktop is not working on natty, plus I’m having problems with fglrx so I’m using the opensource driver1)

[blip.tv ?posts_id=4858227&dest=-1]

[HQ Version]

Some screenshots for those that don’t want to download 53 MB of video:

KMix Applet - Collapsed in an icon

KMix Applet - Popup shown

KMix Applet - Controls shown inside panel

Pretty cool, isn’t it? πŸ˜‰

However, there are a lot of issues with the current implementation, mostly because I’m using DBus calls to an interface exposed by KMix. Don’t get me wrong: it is awesome, because saved meΒ  a lot of headaches like dealing with alsa/oss and whatever but, on the other hand, the interface exposed to DBus is outdated and far from complete. For example, you can retrieve only the ID of the master device and set/get/mute/unmute only that device, there is no signal exposed for notifying changes of the volume level, so you cannot be notified of the volume level if an other app is modifying it unless you repeatedly poll the result of the masterVolume() call2. Sometimes, when adding/removing multiple instances of the applet3, plasma crashes (this is my fault). Since I rely on DBus calls to get/set the volume, this means that you can’t quit the old KMix application; however, you can open KMix main window, click on “Configure KMix”, uncheck the “Dock in system tray” option, and then close the KMix window.Β  In this way KMix will run in the background, wihtout showing himself in the notification area, and you can enjoy the plasmoid version πŸ™‚

If I didn’t scared you enough and you still want to give it a try (until the official version will be released) you can grab the code from my personal repo, and then compile and install it as usual.

Cheers!

_______________________________________________________________

1: By the way KWin’s “Magic Lamp” effect works way better with the opensource driver rather than the closed one, so much win πŸ˜€ ↑
2: The mantainer told me that the developer in charge of porting KMix to plasma is also writing a better and efficient DBus interface, to allow a fine-grained control of the Mixer object, so the official release will really kick ass! ↑
3: I know that it does not makes sense with the current implementation, since I can only modify the master channel, but I like to test all the possiblities πŸ˜›β†‘

Authentication framework: closing the circle (+ screencast)

As I promised more than a week ago, today I’ll show you the progress done with the authentication framework, starting with signing a plasmoid with PlasMate, uploading that plasmoid and its signature to opendesktop.org within PlasMate, and retrieve it with the Widget ExplorerΒ  “Download widget dialog”.

Originally, I planned to show a more detailed screencast but, for an unfortunate serie of events, I started playing on a full functional opendesktop testserver just yesterday afternoon. However here it is the screencast, splitted in two pieces. Alas, I noticed too late that the screencast took so much time (the first part lasts about 14 minutes O.o, but you can skip the last 7 minutes because I’m repeatedly signing and sending some plasmoids on the server to show later the authentication process).Β  By the way, I hope you’ll enjoy these videos:

Part 1 (.ogv version):

[blip.tv ?posts_id=4019829&dest=-1]

Part 2 (.ogv version):

[blip.tv ?posts_id=4019854&dest=-1]

Cool, isn’t it? πŸ™‚

However, this is only the beginning: as I mentioned in my previous post, the KNewStuff maintainer (fregl) wants to extend that authenticatiom mechanism for every package exchanged with KNS, so I need to move the library from plasma libs to a more suitable place (perhaps kdelibs?). There is some work to do also in the Attica library, because the opendesktop specification describes multiple signatures and fingerprints (because of the collaboration stuff), and I did only a basic implementation in order to see if everything worked as expected. The KNewStuff3 download dialog needs some love too, because the detailed up to now shows only a string with the signer name and the trust level for each plasmoid; I didn’t implemented a widget with start ratings for the following reasons:

  • there is already a starred rating widget, used for the users rating:Β  showing two widgets with different star ratings will confuse the user in my opinion, so I opted for visualizing a simple text ;
  • lack of time πŸ˜›

The grid view is even more complex, because the same informations are condensed in less space, so I need to figure out how to show in a proper way also the authentication information.

PlasMate needs a lot of love too, and I realized it when playing on its code again; perhaps, after this summer of code, I’ll start on rewriting its internals and clean up the code.

That’s all, for now. Stay tuned πŸ˜‰

[GSoC] Authentication framework progress

Heya Planet,
It’s been a while since my last post about my GSoC projetc and, since there is one week left before the suggested pencil down date, it’s time to summarize what I’ve done in these weeks.
First of all, I’m proud to announce that PlasMate now is able to sign the plasmoids made within it, and install/export them (plasmoid+signature) successfully; thanks a lot to Mark Mutz that helped me to find out where I was wrong πŸ˜‰
Now, about KNewStuff3: unfortunately, I discovered that signature upload/download wasn’t implemented yet1 , oppositely what I’ve been told. However, joining the #ghns channel and the open-collaboration-services mailing list, I met very enthusiastic and friendly people. We discussed a lot about exending the current protocol to support gpg signature and turned out that, in the current OCS draft, they already inserted a basical gpp specification. So we exchanged our opinions and informations, and finally the gpg signature support is well-defined!
But wait, there is even more! Talking with fregl, he told me that the authentication framework I’m building could be used inside KNewStuff3 to provide an authentication mechanism for _every_ package sent/received, instead of limit its use to plasmoids. I don’t know why I didn’t think about it from the beginning, because it’s really an awesome idea!
Think about it: you’ll be able to download plasmoids, plasma themes, kopete themes, new comics for your comic plasmoid, amarok plugins, and tons of other extensions for your favourite app, and you’ll be notified about their trust level at the same time πŸ˜€
This excited me so much that I modified the library again, introducing a new level of trust to give the user a finer control over the authentication mechanism, and I’ve also made available the possibility to specify a custom keystore when creating a new instance of the class, allowing to have different keyrings for different applications (however, I’m not still 100% convinced about this feature).
By the way, things are really evolving good!
See you the next week, I’m thinking about making a cool screencast about all this stuff πŸ˜‰

____________________________________________________

1: The mantainer explained his reasons, and he was totally right, because the only app that used gpg auth was Quanta, back in the old times; so he opted to keep a clean and compact api.↑

GSoC week #7 – Porting week :P

After spending lots of time trying to make the QCA GNUpg working by doing some workarounds and pushing some pressure on the developer, and seeing the midterm evaluation closer every day, I’ve taken the decision to move to GpgME++. So I’ve started porting some stuff on the PlasMate side in order to get my feet wet with this new library, and I have to admit: its really simple and effective πŸ™‚
Once ported PlasMate to gpgme++, I’ve ported the authentication library, and its on playground now πŸ™‚ I’ve to fix a bug that makes plasma crash sometimes, however now all the pieces are working, so yayy πŸ™‚

GSoC week #6 – It’s PlasMate time :)

During the past week, since the authentication library is working pretty good with the plasma widget explorer1 (although it still need to be polished and refined), I decided to get a little break with it and starting on improving PlasMate. As you should know, showing the trust level of a scripted plasmoid in the widget explorer is only one part of my whole GSoC: the goal is to provide a simple way to sign plasmoids, upload them with their signature via GHNS, retrieve them from the web (again, with GHNS), show their trust level before being downloaded, and finally display their trustlevel when browsing the plasma widget explorer.

Therefore, this week was PlasMate turn πŸ™‚ . In the screenshot below, you can see how the Publish widget looks now:

PlasMate with Signing option (open in a new window)

The interface is pretty simple and intuitive: to enable the plasmoid signing option, simply click on the corresponding checkbox. Then, you have to select one PGP private key from the list below, and that’s all. Every time the user clicks Export/Install/Publish, a new signature file will be calculated, and a dialog will popup and ask for the key password.

The widget has also two buttons used to create or delete the keys used for signing; however they’re disabled for now because the creation of a new pgp key pair is not implemented in the qca api and I have to manage it on my own(so, this time, everything is good πŸ˜› ), but the delete button is disabled because, yet an other bugβ„’, the removeEntry() method calls the wrong command line switches, and I’m waiting for the fix2.

I’ve also managed to solve a serious bug which made PlasMate constantly crash whenever pressing the export, install or publish button. Seems like this bug affected PlasMate since alpha2, but I discovered it only few days ago when I started using these features. However, now it works like a charm πŸ˜€

Stay tuned for further updates, cheers !

____________________________________________________

1:For whose that missed the screencast, here it is the video.↑

2: No, I’m not kidding you. I’ve even told the author why the actual command line fails, and a sensible way to fix it. And, after five days, I’m still waiting for this trivial fix…↑

GSoC week #4 and #5, with screencast

[Update]: since the video on youtube still look like crap ( 😦 ), I’ve re-uploaded the video on blip.tv and embedded from it.

Two weeks are gone without blogging, and now it’s time to show to the Planet the progess I made during this weeks with my GSoC project.

During week #4 I was somewhat busy with a College exam, however I performed a lot of fixes to the Authentication API, and got lots of headaches because of the qca-gnupg, again :\

Basically, when calling the startVerify(QByteArray &detachedSig) function, it randomly hangs, causing the library to freeze ( and thus the application too). After struggling a lot on the possible reasons, I noticed that the gpg process spawned by qca sometimes didn’t end, causing the issue. I wrote in the QCA mailing list, where I sent some feedbacks about what’s happened, but the problem doesn’t seems to be easily fixable. So, in the meantime, I wrote an other workaround to launch gpg with aΒ  KProcess and parse its output, until the patch is released.

During week #5 I started to deeply integrate the authentication library into the widget explorer. When I made this screenshot, I basically setted a fixed TrustLevel for each scirpted plasmoid, as well for the rating icons, to test how these new informations will look once merged with the usual UI. Now, instead, the ratings are retrieved by verifying each plasmoid against its signature, if any, and the informations about the signer are showed in the tooltip. Moreover, compared to the screenshot I linked above, the icons which represents the rating and running plasmoid are now better placed in the layout, in order to save space on the bottom of the Plasma widget explorer.

Oh well, stop talking now, and let’s see the video I made πŸ™‚
[blip.tv ?posts_id=3835218&dest=-1]

.ogv version

Urghh, seems like Youtube is taking a lot to process my video…If tomorrow the condition is the same, I’ll re-upload on blip.tv .