Ticket #2011 (accepted enhancement)

Opened 9 years ago

Last modified 9 years ago

Include python-mokoui in libmokoui2 compilation

Reported by: Treviño Owned by: tick
Priority: normal Milestone:
Component: Distro Version: Om2008.9-dev
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:


One of the coolest and useful projects of Om2007.2 imho is the libmokoui2 library and its moko-finger-scroll.
It allows easily to add better finger usability to gtk applications (i.e. tangoGPS) with few lines of code.

The Openmoko repositories includes only the C libraries. What about including also the python-mokoui bindings?
They would be so much appreciated by all the users that are writing pygtk apps for openmoko.

To test some community python apps (i.e pythm media browser), I've tried to compile it with the toolchain, and after some tweaking I got it working well in the Freerunner.

Is this package not built due to the python-gnome dependency? Well, according to what I've seen in my tests, that dependency is not required at all for standard usage. In fact I've compiled my version of python-mokoui without any python-gnome sources (I've disabled it in configure) and the bindings are working well anyway!
So why not adding them? :P

Now I'm also going quite OT, but I'd also add more acceleration to the libmokoui2 base settings. I've changed it to allow to scroll faster and works better imho:

=== modified file 'libmokoui/moko-finger-scroll.c'
--- libmokoui/moko-finger-scroll.c      2008-06-30 06:16:56 +0000
+++ libmokoui/moko-finger-scroll.c      2008-09-17 00:36:00 +0000
@@ -253,11 +253,11 @@
        priv->ix = priv->x;
        priv->iy = priv->y;
        /* Don't allow a click if we're still moving fast, where fast is
-        * defined as a quarter of our top possible speed.
+        * defined as 1/10 of our top possible speed.
         * TODO: Make 'fast' configurable?
-       if ((ABS (priv->vel_x) < (priv->vmax * 0.25)) &&
-           (ABS (priv->vel_y) < (priv->vmax * 0.25)))
+       if ((ABS (priv->vel_x) < (priv->vmax * 0.10)) &&
+           (ABS (priv->vel_y) < (priv->vmax * 0.10)))
                priv->child = moko_finger_scroll_get_topmost (
                        GTK_BIN (priv->align)->child->window,
                        event->x, event->y, &x, &y);
@@ -959,7 +959,7 @@
                        "Maximum scroll velocity",
                        "Maximum distance the child widget should scroll "
                                "per 'frame', in pixels.",
-                       0, G_MAXDOUBLE, 48,
+                       0, G_MAXDOUBLE, 96,
                        G_PARAM_READWRITE | G_PARAM_CONSTRUCT));

        g_object_class_install_property (


libmokoui2-python-support.patch (1.2 KB) - added by Treviño 9 years ago.
Patch for python bindings compilation support

Change History

comment:1 Changed 9 years ago by Treviño

Well, I didn't set these priority flags... I don't really think that this is blocker or that it has an highest priority!

comment:2 Changed 9 years ago by Treviño

Ops... I forgot to attach an ipk containing the python-mokoui2 lib for who would like to test it:

comment:3 Changed 9 years ago by julian_chu

  • Status changed from new to assigned
  • Owner changed from julian_chu to tick
  • Severity changed from blocker to normal
  • Priority changed from highest to normal

Hi Treviño ,

It sounds cool.

Add python-mokoui into our repository is not only get a ipk file ,but also add it into our building system,OpenEmbedded?.

That means we should get a .bb file which telling OE how to build python-mokoui.
If I got a usable bb file I can add it into repository quickly or I have to solve other bugs and then create the recipe.

ps. I reassign it to Tick to see if he have time to do that

comment:4 Changed 9 years ago by tick

  • Status changed from assigned to accepted

comment:5 Changed 9 years ago by Treviño

Unfortunately I've not an OpenEmbedded? tree here (just using the toolchain :P), so I can't post a .bb file, BTW I'll attach here the patch needed to configure and compile the python package using only the Openmoko dependency.

About the bitbake file, I guess that you should just include that patch and then adding the "--enable-python" configure flag and allow to package the contents of $DESTDIR/usr/lib/python2.5/* in some python-mokoui2* packages...

Changed 9 years ago by Treviño

Patch for python bindings compilation support

comment:6 Changed 9 years ago by tick

Hi Trevino,

http://docs.openmoko.org/trac/attachment/ticket/2011/libmokoui2-python-support.patch looks good to me.

It's on the SVN now.

I will be very appreciate if you post the bb file for this. :-)


comment:7 Changed 9 years ago by Treviño

I'd like to attach it, but mokomakefiles doesn't work in my computers and I can't understand why. I'll try again ASAP...

Note: See TracTickets for help on using tickets.