Mixing QML and MeeGoTouch
When trying to invoke a MeeGoTouch application's MSheet from a QML app, I was getting the following error:
There is no instance of MDeviceProfile. Please create MComponentData first.
Using MApplication instead of QApplication would solve that, but still a MApplicationWindow would be needed to make the MSheet appear.
After searching on Google for a while (see after the snippet for the sources) and talking to gri in #harmattan, I've come up with the following solution:
#include <MApplication>
#include <MApplicationWindow>
#include <MApplicationPage>
#include <QDeclarativeEngine>
#include <QGraphicsObject>
#include <QDeclarativeComponent>
#include <QDeclarativeContext>
int main(int argc, char *argv[])
{
MApplication app(argc, argv);
QDeclarativeEngine engine;
// The context is unused in this example
// QDeclarativeContext *context = engine.rootContext();
MApplicationWindow window;
window.showFullScreen();
MApplicationPage page;
page.setPannable(false);
page.appear(MApplication::instance()->activeWindow());
QDeclarativeComponent component(&engine, QUrl("qrc:/qml/main.qml"));
QGraphicsObject *content = qobject_cast<QGraphicsObject*>(component.create());
MWidget *centralWidget = new MWidget;
content->setParentItem(centralWidget);
page.setCentralWidget(centralWidget);
int result = app.exec();
delete centralWidget;
return result;
}
From QML support in Meego touch Framework I learnt that I had to load the QML into a MeeGoTouch widget, so I followed Loading QML components from C++ to replace the loadQmlComponent non-existing method with the QDeclarativeComponent::create approach.
Also, note that I use MApplicationWindow::showFullScreen instead of MApplicationWindow::show and MWidget::setMinimumSize
Butaca is now available in the Ovi Store
After having improved the movie showtimes support and updated the UI so it aligns better with the Swipe UX, this Saturday I submitted Butaca to the Ovi Store. Yesterday (yes, that quickly!) I got a notification that it had been accepted. I'm really satisfied with this release: I use the application myself a lot, and it's great to be able to check which movies are playing on the cinemas and later review their details and the crew's.
I've uploaded a screencast to Youtube, displaying how the application works, and -as usual- screenshots are available at my Flickr gallery. You can also review the release details at the project page (where you'll be able to file bugs or get support as well).
If you wonder what's to come next, here's some insight:
- Localization
- Check for extras after and during the credits (now that I have an API available for that)
- Offline mode / better data caching
- Embed trailer playback in the application
- UI improvements
Download Butaca for free from the Ovi Store!
Butaca, IMDb and TMDb
Right now, probably all of you know IMDb. The Internet Movie Database is "the place" you'd go to look up a movie or check the filmography of an actor, writer or director. Some of you will also be familiar with IMDb Android and iOS applications, which allow you to check out that very same information on your mobile device, providing the means to settle any arguments (who directed The Terminator? And Aliens?). However, IMDb doesn't provide a free API: it provides a big ZIP file that you can download and parse to get that info. Then... -if you don't want to get a commercial license for the API- what are your chances as an Open Source developer willing to get the same functionality?
TMDb was started in the fall of 2008 as a side project in order to help serve high resolution posters and fan art for the popular XBMC project. What started as just a simple single page linked with some zip files has morphed into one of the most active user built movie databases on the entire Internet.
themoviedb.org is a free and open movie database. It's completely user driven by people like you. TMDb is currently used by millions of people every month and with our powerful API, also used by the world's most popular media centers.
And indeed it is a powerful API. Butaca uses it to provide you with all the movie information you could need
. At this moment, Butaca implements almost all the API exposed by TheMovieDb, so you can search and get information from people and movies and navigate through genres: the only thing you need is an Internet connection. Besides, Butaca allows you to mark the content as favorite so you'd keep it in your home screen as a shortcut.

Welcome view with favorites

Detailed Movie View
Other available feature in Butaca is movie showtimes. Right now, I couldn't find any world-wide open showtimes API: looks like there are some local ones, which could serve in some countries (or areas inside some countries) but most of these APIs need to be licensed. So what's the solution at the moment? When the user wants to check what's on the theaters around him, the browser is open pointing to Google Movies. The browser is used also, if you want to check if there are shows for a particular movie. In the future (unless I find some good API), instead of opening the browser, a WebView will be used.
So if at this point you're still interested, please check out the project. You'll find plenty of screenshots there, and instructions on how to add the OBS repository (deb http://repo.pub.meego.com/home:/spenap/Harmattan/ ./) to your device so you can install Butaca and start using it. And then, start filing bugs
Butaca: getting close to the first release
This time, some screenshots before heading to bed.
You can check out the full set of screenshots at Picasa, the code at Gitorious, and -only for the braves!- a Debian package. Thanks a lot to Tuomas Siipola, who sent me the placeholder icons for persons and movies, and to Felipe Erias, who is guiding me on the UI design.
EDIT: Also uploaded the screenshots to Flickr, with descriptions in each view.
EDIT 2: You can follow these steps to use my OBS repository and keep Butaca updated
Butaca in Harmattan
Three weeks ago, the N9 was announced. Little can be added to what's been written: it's a great achievement, but also a bitter one. Still, I really think that great things can be done on this platform, and that's why I applied to the N950 Devkit Program.
My initial idea was to port Maevies from Fremantle to Harmattan, keeping the same architecture. In the week or so that went between the N9 announcement and the filtering of the candidates for the devkit program, I resumed the development on the client side, bringing the ability to save and load favorite movies, as well as other minor UI fixes, and also updated the D-Bus service so that it would compile on HARMATTAN target.
When I knew I was selected for the program, I started using PySide (specifically Harmattan Python) to quickly get a working UI which could connect to the D-Bus service... but it turned out that I didn't need it, thanks to the powerful way to deal with XML models inside QML. Today I've uploaded "Butaca" application to gitorious. Still a draft of what I expect it to be, it lets the user search and browse through movies, and get detailed information about them. I also created an entry at the MeeGo Wiki at User:Spenap/Butaca.
Guess what? I’m going to FOSDEM
After a great experience last year, and again sponsored by Igalia -this time as an employee
-, I'm going to FOSDEM. I'm really looking forward to meet again a pretty good amount of fellow Igalians there, and also some great people from the Free Software Master.
See you in Brussels next week!
GObject Introspection and Grilo: A winner combination
About GObject Introspection
A few days ago Adrian Perez wrote about GObject Introspection (abbreviated GI), explaining why it is gaining so much momentum. While you're really encouraged to visit his blog entry to see the work he did on Lua's GI bindings, I'll take some of his words:
In short, it (GObject Introspection) works like this:
- Library developers add annotations to the documentation comments of functions.
- The GI support tools generate XML and compiled API metadata.
- You have a library to use that metadata at runtime.
The last thing is very interesting, especially the runtime usage of metadata... because it enables dynamic language bindings. This means that developers no longer have to build e.g. the Python bindings for themselves but just annotating the source code!
GObject Introspection in Grilo
As Grilo's primary focus is to allow application developers concentrate on making good user interfaces, without having to deal with the low level stuff done at the framework level, we consider very important providing them with the ability to use their language of choice. At the same time, we'd like to avoid devoting time to write manual bindings, and that's the reason we put so much effort on GObject Introspection support: right now, if not all, most of the API is accessible via GI, and we're working to fix the less binding-friendly parts.
Building Grilo with GObject Introspection enabled
The best way to try Grilo from GI is, in my opinion, using jhbuild. Clone it with
git clone git://git.gnome.org/jhbuild
build and install it, and copy the configuration file provided sample.jhbuildrc to ~/.jhbuilrc. The project page explains everything in detail, from installation details to tweaking the configuration file, but if you don't want to do it, that's fine. You'll probably need to install the build prerequisites, by invoking
$jhbuild bootstrap
To see the dependencies needed to get grilo and grilo plugins installed you can type
$jhbuild list grilo grilo-plugins
But to get the most from Grilo, you'd go for:
$jhbuild build gtk+ pygobject grilo grilo-plugins
That will install grilo core and plugins, pygobject (which includes Python's glue to use GObject Introspection, and has gobject-introspection as a dependency) and Gtk+, needed to run the grilo-test-ui sample done with GI. After a rather long build, you should have an environment with Grilo installed with GI support.
From there, type
$jhbuild shell
to enter the jhbuild environment and go to your Grilo's checkout directory. If everything has worked fine, you should be able to do:
$ python Python 2.5.2 (r252:60911, Aug 6 2010, 16:46:34) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from gi.repository import Grl >>> Grl.init([]) >>>
Under tools/python/ there's a grilo-test-ui.py program, which showcases all the combined potential of GI and Grilo: run it with
$python tools/python/grilo-test-ui.py
and enjoy
(And then, start doing you own apps
)
GObject Introspection has landed in Grilo!
If you're using Grilo from git, last patches enabled improved GObject Introspection so you can start using Python with PyGObject to develop your applications.
A Python clone of the grilo-test-ui is provided, and should give you an idea of what can be done with these new bindings: basically enjoy all the power in Grilo without needing to touch C code, and without us having to maintain manually created bindings.
If you're a JavaScript user, then you need to watch bug #616961. As JavaScript doesn't support GParamSpecs yet (#626047), you'll need this patch which replaces GParamSpec annotations with uints. And now, time for unit testing with PyGObject!
Watch a product in (GNOME’s) Bugzilla
Another quick one: if you want to watch/follow a product in (GNOME's) bugzilla, it is explained here.
To watch an entire product, lookup the product in this page. This will show the default assignee (often productname-maint@gnome.bugs). Then add it your your watched users list.
An easy one, but as it took me a while to find it, I put it here as a reference.
Guadec Hispana 7: el principio
Aunque se haya acabado ya la 7ª Guadec-Hispana, para mí siempre será el principio: la primera vez que aporté algo (por humilde que haya sido) a una conferencia de Software Libre. Fue una experiencia muy agradable, a pesar de que hablar delante de tanto hacker produzca cierta intimidación
. Afortunadamente, la (estupenda) cena del día anterior me sirvió para ir conociendo un poco a la gente, y ver que no mordían: es gente muy maja. Desde luego, es algo totalmente recomendado, tanto si tenéis la oportunidad de presentar algo como si acudís de oyentes.
Todas las charlas quedaron grabadas en vídeo, y la organización se encargó también de recoger las presentaciones, así que no creo que se tarde mucho en publicarlas en la página del evento: son todas muy recomendables. Y, para ir haciendo boca, aquí están las mías: en ellas se habla de Jamp, la aplicación desarrollada en el módulo de Desktop & Mobile del máster. ¡Que las disfrutéis!










