Showing posts with label hildon. Show all posts
Showing posts with label hildon. Show all posts

Thursday, June 24, 2010

The problem with maemo (and meego in a way too)

I've been a happy user of both the original Nokia 770 tablet, the N810 and N900. From the point of view of a normal user I've been very happy with all of them, they have done what they promised and as a user I don't have that much to complain about. But..

As a developer I was drawn to the original tables as it was gobject/gtk+/gnome based with no bloat of C++ or some java stuff.
Made it easy to create software and somewhat easy to support both desktop and tablets in the same software, with some ifdeffing for maemo specific parts (gtk/hildon). That was more or less working in 2007-2008, but currently it's a blody mess.
Trying to support Gregale, Diablo, Fremantle and normal desktop gnome in the same app is these days such a pain that I've almost lost interest to do anything at all (one reason for Mapper developing at a snail pace currently).
Even Fremantle, that should use the latest technologies, (and Diablo) is stuck in the stone ages, gtk is in the 2.10 series (3-4 yeras old) Gregale is even worse with 2.6. Same with glib. Then we have gnome-vfs and gio mess.
And tablets specific Hildon changes, 3 almost compatible versions. Then we have 3-4 different UI styles to support.

And now upstream gtk+ is moving to version 3.0 and GNOME applications should move over to it. GConf is going to be deprecated with GSetting/dconf.

Now what the fuck are you supposed to do as developer wanting to support all tablets and desktop in the same app?

Wednesday, June 16, 2010

How to change hildon context menu content depending on context

Mainly as a reminder to myself, but if you need to change the content of a context menu set with gtk_widget_tap_and_hold_setup() connect the "show" signal and do you show/hide in the signal handler.

Create your menu, connect signal and setup tap-and-hold:
menu=GTK_MENU(hildon_gtk_menu_new());
g_signal_connect(G_OBJECT (menu), "show", G_CALLBACK(menu_items_visibility_cb), NULL);
gtk_widget_tap_and_hold_setup(widget, menu, NULL, 0);

Then in your handler, check what you need and hide/show menu items:
static void
menu_items_visibility_cb(GtkWidget *menu, gpointer data)
{
if (foo) gtk_widget_show(menu_item_foo); else gtk_widget_hide(menu_item_foo);
}

Friday, January 26, 2007

Learning maemo/hildon

I started playing with the Nokia 770 development SDK last summer and ported an old gtk+ 1 based game (xhyperoid) to the device. First I had to fix it up to use gtk+ 2 and then hildonize it. Not too bad, the first packages had some silly key assignment bugs, but that is now fixed in the latest version, available on maemo garage.
The original xhyperoid has also sound effect support but it's using old OSS and maemo only supports gstreamer or esound, there is no Alsa or OSS emulation available. Anyway, I'm planning on getting sound support in the next version.