SeriesFinale for Harmattan (N9/N950)

As promised before, here is the first release of SeriesFinale for MeeGo Harmattan.

This summer Micke Prag, a fellow programmer from Sweden contacted me because he was starting a port of SF for Harmattan. By then I still didn’t have an N950 because of having missed the deadline for the first developers program. Later, when the second developers program was launched I managed to finally get one. At that point, even though I already had my Samsung Galaxy S (yes, with Android) I still wanted to have a port of SeriesFinale as I had received many emails asking for this port so I started from Micke’s code and finally here it is!

The Harmattan port

SF first version for MeeGo

Maybe it is something obvious but this version is not written in PyGTK/PyMaemo. It uses part of the “old” Python backend that was changed to play well with the new UI code written in QML.

This port’s code is a bit dirty by now and I’m sure there are bugs in this first version but at least it can be used and I didn’t want to make people wait much more. The support and feedback that SeriesFinale’s users have given me is amazing (some people even saying they still use the N900 only for SF!), thank you all for it.
My heart is still filled with GNOME/GTK+ love but QML is really impressive; there are some things I still need to spend some time with to figure out but I like how quick and flexible one can do stuff in QML.

The OVI Store

It was also the first time I published something on Nokia’s Ovi Store and the process took around 2 weeks before it finally got approved (it was rejected twice before due to weird stuff like “they” thinking was not a good place to report issues or the fact that an application that says it works only with English US is eligible only for the USA, not for all the countries…).

The future

I really like the N9/N950. The user experience is something awesome and I believe this was the phone that could really compete with the iPhone and Android. Unfortunately someone at Nokia disagrees and the future of this incredible phone is doomed even though Nokia’s alternative is not better. Due to this mainly, I’m not using the N950 as my main phone. This and the fact that my personal time, in which I develop SF, is very limited, means that unless things change, I don’t know how much more releases I will do but I still wanted to add some cool features. It will probably depend again on the feedback and support.

Anyway here it is at an Ovi Store a few taps/swipes away and for free, as always (although I appreciate when someone buys me a beer 🙂 ):

Get SeriesFinale from Ovi Store

SeriesFinale 0.6.9

Yup, after some months, here is a new version of SeriesFinale.

This new version doesn’t have many new features but brings an important one related to my previous blog post: the context menu.
When long-pressing a show or a season, a dialog will be shown with some actions. On the show’s context menu (or context dialog?), the user can update it, delete it, view its info or, more importantly, mark the next episode to watch as watched. On the season’s context menu, it can be deleted or, as many users have requested, mark all episodes.

Here are a couple of screenshots:

SF Context Menus Screenshots

SF Context Menus Screenshots

Of course that by only seeing the screenshots you don’t get the same feeling has when you quickly open the dialog and mark the next episode to watch so give it a try.
It it already in Extras Testing and if it works well for you, please vote for it to get into Extras.

The Future

This summer I bought myself an Android phone. That’s right, because of pure curiosity and with the help of Nokia’s decisions regarding MeeGo, I bought a Samsung Galaxy S.
I’ve been using it ever since as my main phone but I didn’t want to leave SF unattended yet. There are a couple of things more that I want to do and I’ll keep an eye on the download statistics to try to guess how many people is still interested in this app.

I haven’t yet found a full replacement for it on Android. I’ve installed a few apps that either don’t work well, require login or are bloated with features making it harder to use so I don’t know if I’ll end up contributing to some FOSS one or developing an official port of SF. Do you think that developing an official version for Android makes sense?
Also, people have asked me for a Symbian and Blackberry versions of it but I just don’t own any phone with these systems.

As for SF on the N9/N950, a release could be out there soon so stay tuned.

Long press GTK+ TreeView on Maemo

Yesterday was a holiday so I got some time to hack a bit in SeriesFinale.
One of the things I wanted to do was to have a context menu for shows and seasons. Something to apply individual actions like deleting, updating, viewing information, etc when there is a long press on a tree view’s item.

In Maemo the way to do this is to use the TreeView’s tap_and_hold_setup method but the problem is that I hate how this context menu is implemented: I have accidentally deleted stuff because of this menu. Can you think of a less intuitive widget for a touch screen? One that shows below your thumbs, only while you’re touching the screen and triggers some action when you lift it.
Instead, I wanted to show a dialog with the different actions so users could easily know what their doing.
Also, the fact that the API only allows me to use this long-press action to trigger a menu widget doesn’t seem like the best design…

Because of this I decided to implement a TreeView’s subclass that makes it better!
In my opinion, the way to implement this in the TreeView is to treat it like any other functionality: emit a signal when it occurs.

Though it wasn’t difficult, I thought the job would be easier. I had already implemented the “long-press” signal emission but the “row-activated” signal kept being emitted as well. Contrary to what I thought, re-implementing do_row_activated didn’t do it so I had to take a look at the GTK+’s source and though the row_activated method is indeed the one that emits the signal, there is also a “hildon-row-tapped” signal being emitted from the button_release_event. I don’t know if this signal is related or if it is the Python bindings fault but I had to prevent the “row-activated” signal from the mouse_released_event method in a hackish way

Finally, when running the dialog, the application would freeze and not respond after this.
It was related to the emission being done from the timeout callback which, without having the time to look further, smelled like some race condition so I had to wrap the signal emission with the threads_enter/leave.
After this, everything worked well.

Like the “row-activated”, the “long-press” signal gives the tree path and the column that was pressed. It is emitted after pressing for 0.5 seconds and is cancelled if meanwhile the user moves the finger more than 25 pixels. These values are completely arbitrary and have just worked good enough for me. Of course you can easily change them.

And that’s it. I’ve called it EnhancedTreeView and if you want to use it in your Maemo application go ahead and copy/tweak the file (it has less than 60 lines).