Following Hildon HIG on HildonAppMenu

In my talk in the Maemo Summit 09 I mentioned a way to follow the Hildon HIG in what comes to HildonAppMenu’s items’ availability.
As written on it, the HildonAppMenu shouldn’t have insensitive items. Items that are supposed to be dimmed, should be hidden instead.

Now if you’re porting an exiting GTK+ application, these will likely use GtkActions as they are a great way not to repeat yourself while defining and sharing actions for widgets.

So, a nice way to keep using GtkActions while not showing the insensitive menu items is to hide these using a callback triggered by the “show” signal.

Here’s the callback:

static void
update_menu_items_visibility_cb (GtkWidget *menu, gpointer data)
    GList *items = hildon_app_menu_get_items (HILDON_APP_MENU (menu));
    for (; items != NULL; items = g_list_next (items))
        GtkWidget *item = GTK_WIDGET (items->data);
        gboolean item_sensitive = TRUE;
        g_object_get (G_OBJECT (item), "sensitive", &item_sensitive, NULL);
        if (item_sensitive)
            gtk_widget_show (item);
            gtk_widget_hide (item);

Which should be connected this way:

g_signal_connect (G_OBJECT (menu),
                         G_CALLBACK (update_menu_items_visibility_cb),

Hope it’s useful to you!

Last day at GCDS

So, for me and some other Igalians, today was the last day at GCDS.

I also gave an introduction to Hildon 2.2. On this introduction, I talked about how to use the new widgets introduced on Hildon 2.2 as well as ways of accomplishing the same functionalities when porting an application to Maemo Fremantle. To better illustrate this, I compared the EOG for Maemo with the desktop version.

The presentation slides are below:

And that’s it, I must say I really liked my first GUADEC and I’m willing to go for the next one!
Maybe I’ll be able to write some post-event posts to compensate the lack of blogging during these days.

Eye of GNOME for Maemo

Since a while ago, and during my work at Igalia, I’ve been porting EOG to Maemo using the new and great Fremantle widgets!

The project is still in an *early stage* but I couldn’t wait more to let everyone know about it so today I’ve published the git repository.

The project is being done as a branch of the original EOG. You can get the source by doing:

$ git clone
$ git checkout –track -b mobile origin/mobile

And then, you know, inside scratchbox:

$ ./
$ ./configure
$ make
$ make install
$ eog

Thank you to the people who helped me porting EOG, mainly Claudio and Berto.

And here you have a screencast and some nice screenshots, hope you like it:

EOG for Maemo from Joaquim Rocha on Vimeo.

EOG Normal View        EOG Editing view

EOG Open file view