Category Archives: Planet GNOME

Bringing sanity back to my T440s

Published / by mario / 4 Comments on Bringing sanity back to my T440s

As a long time Thinkpad’s trackpoint user and owner of a Lenovo T440s, I always felt quite frustrated with the clickpad featured in this laptop, since it basically ditched away all the physical buttons I got so used to, and replace them all with a giant, weird and noisy “clickpad”.

Fortunately, following Peter Hutterer’s post on X.Org Synaptics support for the T440, I managed to get a semi-decent configuration where I basically disabled any movement in the touchpad and used it three giant soft buttons. It certainly took quite some time to get used to it and avoid making too many mistakes but it was at least usable thanks to that.

Then, just a few months ago from now, I learned about the new T450 laptops and how they introduced again the physical buttons for the trackpoint there… and felt happy and upset at the same time: happy to know that Lenovo finally reconsidered their position and decided to bring back some sanity to the legendary trackpoint, but upset because I realized I had bought the only Thinkpad to have ever featured such an insane device.

Luckily enough, I recently found that someone was selling this T450’s new touchpads with the physical buttons in eBay, and people in many places seemed to confirm that it would fit and work in the T440, T440s and T440p (just google for it), so I decided to give it a try.

So, the new touchpad arrived here last week and I did try to fit it, although I got a bit scared at some point and decided to step back and leave it for a while. After all, this laptop is 7 months old and I did not want to risk breaking it either :-). But then I kept reading the T440s’s Hardware Maintenance Manual in my spare time and learned that I was actually closer than what I thought, so decided to give it a try this weekend again… and this is the final result:

T440s with trackpoint buttons!

Initially, I thought of writing a detailed step by step guide on how to do the installation, but in the end it all boils down to removing the system board so that you can unscrew the old clickpad and screw the new one, so you just follow the steps in the T440s’s Hardware Maintenance Manual for that, and you should be fine.

If any, I’d just add that you don’t really need to remove the heatskink from the board, but just unplug the fan’s power cord, and that you can actually do this without removing the board completely, but just lifting it enough to manipulate the 2 hidden screws under it. Also, I do recommend disconnecting all the wires connected to the main board as well as removing the memory module, the Wifi/3G cards and the keyboard. You can probably lift the board without doing that, but I’d rather follow those extra steps to avoid nasty surprises.

Last, please remember that this model has a built-in battery that you need to disable from the BIOS before starting to work with it. This is a new step compared to older models (therefore easy to overlook) and quite an important one, so make sure you don’t forget about it!

Anyway, as you can see the new device fits perfectly fine in the hole of the former clickpad and it even gets recognized as a Synaptics touchpad, which is good. And even better, the touchpad works perfectly fine out of the box, with all the usual features you might expect: soft left and right buttons, 2-finger scrolling, tap to click…

The only problem is that the trackpoint’s buttons would not work that well: the left and right buttons would translate into “scroll up” and “scroll down” and the middle button would simply not work at all. Fortunately, this is also covered in Petter Hutterer’s blog, where he explains that all the problems I was seeing are expected at this moment, since some patches in the Kernel are needed for the 3 physical buttons to become visible via the trackpoint again.

But in any case, for those like me who just don’t care about the touchpad at all, this comment in the tracking bug for this issue explains a workaround to get the physical trackpoint buttons working well right now (middle button included), simply by disabling the Synaptics driver and enabling psmouse configured to use the imps protocol.

And because I’m using Fedora 21, I followed the recommendation there and simply added psmouse.proto=imps to the GRUB_CMDLINE_LINUX line in /etc/default/grub, then run grub2-mkconfig -o /boot/grub2/grub.cfg, and that did the trick for me.

Now I went into the BIOS and disabled the “trackpad” option, not to get the mouse moving and clicking randomly, and finally enabled scrolling with the middle-button by creating a file in /etc/X11/xorg.conf.d/20-trackpoint.conf (based on the one from my old x201), like this:

Section "InputClass"
        Identifier "Trackpoint Wheel Emulation"
        MatchProduct "PS/2 Synaptics TouchPad"
        MatchDriver "evdev"
        Option  "EmulateWheel"  "true"
        Option  "EmulateWheelButton" "2"
        Option  "EmulateWheelInertia" "10"
        Option  "EmulateWheelTimeout" "190"
        Option  "Emulate3Buttons" "false"
        Option  "XAxisMapping"  "6 7"
        Option  "YAxisMapping"  "4 5"
EndSection

So that’s it. I suppose I will keep checking the status of the proper fix in the tracking bug and eventually move to the Synaptic driver again once all those issue get fixed, but for now this setup is perfect for me, and definitely way better than what I had before.

I only hope that I hadn’t forgotten to plug a cable when assembling everything back. At least, I can tell I haven’t got any screw left and everything I’ve tested seems to work as expected, so I guess it’s probably fine. Fingers crossed!

Building a SNES emulator with a Raspberry Pi and a PS3 gamepad

Published / by mario / 12 Comments on Building a SNES emulator with a Raspberry Pi and a PS3 gamepad

It’s been a while since I did this, but I got some people asking me lately about how exactly I did it and I thought it could be nice to write a post answering that question. Actually, it would be a nice thing for me to have anyway at least as “documentation”, so here it is.

But first of all, the idea: my personal and very particular goal was to have a proper SNES emulator plugged to my TV, based on the Raspberry Pi (simply because I had a spare one) that I could control entirely with a gamepad (no external keyboards, no ssh connection from a laptop, nothing).

Yes, I know there are other emulators I could aim for and even Raspberry specific distros designed for a similar purpose but, honestly, I don’t really care about MAME, NeoGeo, PSX emulators or the like. I simply wanted a SNES emulator, period. And on top of that I was quite keen on playing a bit with the Raspberry, so I took this route, for good or bad.

Anyway, after doing some investigation I realized all the main pieces were already out there for me to build such a thing, all that was needed was to put them all together, so I went ahead and did it. And these are the HW & SW ingredients involved in this recipe:

Once I got all these things around, this is how I assembled the whole thing:

1. Got the gamepad paired and recognized as a joystick under /dev/input/js0 using the QtSixA project. I followed the instructions here, which explain fairly well how to use sixpair to pair the gamepad and how to get the sixad daemon running at boot time, which was an important requirement for this whole thing to work as I wanted it to.

2. I downloaded the source code of PiSNES, then patched it slightly so that it would recognize the PS3 DualShock gamepad, allow me define the four directions of the joystick through the configuration file, among other things.

3. I had no idea how to get the PS3 gamepad paired automatically when booting the Raspberry Pi, so I wrote a stupid small script that would basically wait for the gamepad to be detected under /dev/input/js0, and then launch the snes9x.gui GUI to choose a game from the list of ROMS available. I placed it under /usr/local/bin/snes-run-gui, and looks like this:

#!/bin/bash

BASEDIR=/opt/pisnes

# Wait for the PS3 Game pad to be available
while [ ! -e /dev/input/js0 ]; do sleep 2; done

# The DISPLAY=:0 bit is important for the GUI to work
DISPLAY=:0 $BASEDIR/snes9x.gui

4. Because I wanted that script to be launched on boot, I simply added a line to /etc/xdg/lxsession/LXDE/autostart, so that it looked like this:

@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@xscreensaver -no-splash
@/etc/sudoers.d/vsrv.sh
@/usr/local/bin/snes-run-gui

By doing the steps mentioned above, I got the following “User Experience”:

  1. Turn on the RPi by simply plugging it in
  2. Wait for Raspbian to boot and for the desktop to be visible
  3. At this point, both the sixad daemon and the snes-run-gui script should be running, so press the PS button in the gamepad to connect the gamepad
  4. After a few seconds, the lights in the gamepad should stop blinking and the /dev/input/js0 device file should be available, so snes9x.gui is launched
  5. Select the game you want to play and press with the ‘X’ button to run it
  6. While in the game, press the PS button to get back to the game selection UI
  7. From the game selection UI, press START+SELECT to shutdown the RPi
  8. Profit!

Unfortunately, those steps above were enough to get the gamepad paired and working with PiSNES, but my TV was a bit tricky and I needed to do a few adjustments more in the booting configuration of the Raspberry Pi, which took me a while to find out too.

So, here is the contents of my /boot/config.txt file in case it helps somebody else out there, or simply as reference (more info about the contents of this file in RPiConfig):

# NOOBS Auto-generated Settings:
hdmi_force_hotplug=1
config_hdmi_boost=4
overscan_left=24
overscan_right=24
overscan_top=16
overscan_bottom=16
disable_overscan=0
core_freq=250
sdram_freq=500
over_voltage=2

# Set sdtv mode to PAL (as used in Europe)
sdtv_mode=2

# Force sound to be sent over the HDMI cable
hdmi_drive=2

# Set monitor mode to DMT
hdmi_group=2

# Overclock the CPU a bit (700 MHz is the default)
arm_freq=900

# Set monitor resolution to 1280x720p @ 60Hz XGA
hdmi_mode=85

As you can imagine, some of those configuration options are specific to the TV I have it connected to (e.g. hdmi_mode), so YMMV. In my case I actually had to try different HDMI modes before settling on one that would simply work, so if you are ever in the same situation, you might want to apt-get install libraspberrypi-bin and use the following commands as well:

 $ tvservice -m DMT # List all DMT supported modes
 $ tvservice -d edid.dat # Dump detailed info about your screen
 $ edidparser edid.dat | grep mode # List all possible modes

In my case, I settled on hdmi_mode=85 simply because that’s the one that work better for me, which stands for the 1280x720p@60Hz DMT mode, according to edidparser:

HDMI:EDID DMT mode (85) 1280x720p @ 60 Hz with pixel clock 74 MHz has a score of 80296

And that’s all I think. Of course there’s a chance I forgot to mention something because I did this in my random slots of spare time I had back in July, but that should be pretty much it.

Now, simply because this post has been too much text already, here you have a video showing off how this actually works (and let alone how good/bad I am playing!):

Video: Raspberry Pi + PS3 Gamepad + PiSNES

I have to say I had great fun doing this and, even if it’s a quite hackish solution, I’m pretty happy with it because it’s been so much fun to play those games again, and also because it’s been working like a charm ever since I set it up, more than half a year ago.

And even better… turns out I got it working just in time for “Father’s Day”, which made me win the “best dad in the world” award, unanimously granted by my two sons, who also enjoy playing those good old games with me now (and beating me on some of them!).

Actually, that has been certainly the most rewarding thing of all this, no doubt about it.

GStreamer Hackfest 2015

Published / by mario

Last weekend I visited my former office to attend the GStreamer hackfest 2015, along with other ~30 hackers from all over the world.

This was my very first GStreamer hackfest ever and it was definitely a great experience, although at the beginning I was really not convinced to attend since, after all, why bother attending an event about something I have no clue about?

But the answer turned out to be easy in the end, once I actually thought a bit about it: it would be a good opportunity both to learn more about the project and to meet people in real life (old friends included), making the most of it happening 15min away from my house. So, I went there.

And in the end it was a quite productive and useful weekend: I might not be an expert by now, but at least I broke the barrier of getting started with the project, which is already a good thing.

And even better, I managed to move forward a patch to fix a bug in PulseAudio I found on last December while fixing an downstream issue as part of my job at Endless. Back then, I did not have the time nor the knowledge to write a proper patch that could really go upstream, so I focused on fixing the problem at hand in our platform. But I always felt the need to sit down and cook a proper patch, and this event proved to be the perfect time and place to do that.

Now, thanks to the hackfest (and to Arun Raghavan in particular, thanks!), I’m quite happy to see that the right patch might be on its way to be applied upstream. Could not be happier about it! :)

Last, I’d like to thank to Samsung’s OSG, and specially to Luis, for having done a cracking job on making sure that everything would run smoothly from beginning to end. Thanks!

Frogr 0.11 released

Published / by mario / 6 Comments on Frogr 0.11 released

Screenshot of Frogr 0.11

So, after neglecting my responsibilities with this project for way too long, I finally released frogr 0.11 now, making the most that I’m now enjoying some kind of “parenting vacation” for a few days.

Still, do not expect this new release to be fully loaded of new features and vast improvements, as it’s more like another incremental update that adds a couple of nice new things and fixes a bunch of problems I was really unhappy about (e.g. general slowness, crashes).

Wrapping it up, the main changes included with this release are:

  • Moved to the new GTK+’s header bar plus the typical menu button when GTK+ >= 3.12 (GTK+ 3.4 is still supported). I personally like this change a lot, as it makes frogr much more compact and sleek IMHO, and much better integrated with newer releases of GNOME.
  • Added a new option to automatically replace the “date posted” field in flickr with the “date taken” value from the EXIF metadata when uploading pictures. Useful to keep your photo stream sorted regardless of when you uploaded which pictures. Thanks a lot to Luc Pionchon for requesting this feature. I never thought of it before, now I use it all the time!
  • Sped up the load of pictures into the main window, as it was a very slow process when importing tags from the XMP keywords was enabled. I measured a 3x improvement, but YMMV.
  • Fixed random crashes due to the missing initialization of the gcrypt library introduced with the recent changes to use SSL API end points. Thanks a lot Andrés for your help with this!
  • Fixed issues related to the OS X port, which prevented frogr 0.9 from having video support and caused many problems with the 0.10 release. Now it should be fine, grab the bundle from here.
  • Other things: removed calls to deprecated APIs, updated translations, fixed a few minor bugs and a bit of a clean-up here and there, which is usually good.

As usual, feel free to check the website of the project in case you want to know more about frogrhow to get it or how to contribute to it. I’m having a hard time lately to find time to devote to this pet project, so any help anyone can provide will be more than welcome :-) fosdem-15-logo

By the way, I’m going to FOSDEM this year again, so feel free to say “hi” if you want to chat and/or share a beer (or more!).

Endless changes ahead!

Published / by mario / 2 Comments on Endless changes ahead!

I know I haven’t blogged for a while, and definitely not as much as I would like, but that was partially because I was quite busy during my last days in Samsung (left on the 25th of July), where I wanted to make sure I did not leave any loose end before departure, and that everything was properly handed over to the right people there.

But that was one month ago… so what did I do since then? Many many things, and most of them away from a keyboard, at least until the past week. Main highlights:

  • One week travelling by car with my family all the way down to Spain from the UK, through France, visiting all the nice places we could (and could afford) in the way, which was a lot of fun and an incredible experience.
  • The goal of taking the car to Spain was to sell it once we were there and, surprisingly enough, we did it in record time, so one thing less to worry about…
  • 2 weeks in Spain having proper “relaxing holidays” to get some quality time off in between the two jobs, to properly recharge batteries. Not that the previous week was not holidays, but travelling 2200 km by car with two young kids on the back can be amazing and exhausting at the same time :-)
  • 1 week in the UK to make sure I had everything ready by the time I officially started in the new company, where I will initially be working from home: assemble a home office in my spare bedroom, and prepare my new laptop mainly. In the end, we (my wife helped me a lot) finished by Wednesday, so on Thursday we went for a last 2-day getaway to Wales (what a beautiful place!) by car, making the most that we were kids-free.

Endless Mobile logoTherefore, as you can imagine, I didn’t have much time for blogging lately, but still I would like to share with the world my “change of affiliation” so here it is: since yesterday I’m officially part of the amazing team at Endless, an awesome start up from San Francisco committed to break the digital divide in the developing world by taking GNOME-based technology to the end users in ways that were not imaginable before. And I have to say that’s a vision I fell in love with since the very first time I heard about it (last year in Brno, during Matt’s keynote at GUADEC).

But just in case that was not awesome enough by itself, the other thing that made me fall in love with the company was precisely the team they have assembled, because even if I’m mostly a technical guy, I still value a lot the human side of the places I work in. And in this regard Endless seems to be perfect, or even better!

So, I’m extremely happy these days because of this new challenge I’m seeing in front of me, and because of the opportunity I’m being given to have a real positive impact in the lives of millions of people who still can’t access to technology as they should be able to do it. Also, I feel blessed and privileged for having been given the chance to be part of such an amazing team of people. Could not be happier at this time! :)

Last to finish this post, I would like to say thanks to my friend Joaquim, since he was who introduced me to Matt in the first place and “created” this opportunity for me. Thank you!

Frogr 0.10 released

Published / by mario / 2 Comments on Frogr 0.10 released

frogrQuick post to let the world know that I’ve just released a new version of frogr right now, in order to address a few issues present in the previous version. Mainly:

  • Deprecation of non-SSL end points for the Flickr API (see these two posts for more info). From now on, frogr will use SSL-only API calls.
  • Address issues with frogr‘s AppData file. Apparently, the AppData file was neither valid (according to appdata-validate) nor being installed properly, preventing frogr from showing up nicely in the GNOME Software app.
  • Allow disabling video uploads at configuration time (enabled by default), instead of making the decision depending on the detected platform. This will hopefully make life easier for packagers of other platforms (e.g. MacPorts).
  • Removed libsoup-gnome code once and for all (API deprecated a while ago).
  • Other things: updated translations and fixed a few minor bugs.

As usual, feel free to check the website of the project in case you want to know more about frogrhow to get it or how to contribute to it.

Frogr 0.9 released

Published / by mario

So, after a bit more than one year without releasing any version of frogr, I finally managed to get some “spare” time to put all the pieces together and ship the ninth version of it, which I believe/hope is going to be a quite solid one.

Frogr 0.9

In all honesty, though, this version does not come with many new features as the previous ones, yet some changes and fixes that I believe were quite necessary, and therefore should help improving the user experience in some subtle ways.

For instance, the layout of the dialog to edit the details of a picture has changed (as per Ana Rey‘s comments during GUADEC) to enable a more efficient usage of vertical space, so much needed these days in small widescreen laptops. Of course, design-wise still sucks, but I believe it’s much more convenient now from a pragmatical point of view.

Also, frogr is now a little bit more “modern” in things such as that it now supports GStreamer 1.0 (0.10 still supported), a lot of deprecated code (e.g. Stock items, GtkActions) has been replaced internally and it now integrates better with GNOME Shell’s search box. Ah! and it also now provides an AppData file to integrate with GNOME Software Center, which is a nice touch too.

Another interesting thing is that I finally fixed the problem that we have with multiple selections in the main view, which was neither intuitive nor very useful, as Ctrl and Shift modifiers did not work as expected. So, from now on, it is finally possible to work with disjoint multiple selections of pictures, a feature I was missing so much.

Last, I fixed two important problems in the code that caused frogr consume two much memory, specially after uploading pictures. It was a quite severe problem since frogr was not properly freeing the memory used by pictures even after those were uploaded and removed from the UI, causing important issues in cases where people tried to upload a lot of pictures at once. It’s hopefully fixed now.

And that’s all I think. As usual, you can check the website of the project to know how to install frogr on your system if you don’t want to wait for your favourite distribution to ship it, or if you just want to check more information about the project or to contribute to it.

FOSDEM 2014

Ah! By the way… I’m going to FOSDEM again this year, but this time by train. Can’t wait to be there! :)

WebKitGTK+ Hackfest 2013: The Return of the Thing

Published / by mario

The WebKitGTK+ Hackfest 2013As many other WebKitGTK+ hackers (30 in total), I flew last Saturday to A Coruña to attend the 5th edition of the WebKitGTK+ Hackfest, hosted once again by Igalia at their premises and where people from several different affiliations gathered together to try to give our beloved port a boost.

As for me, I flew there to work mainly on accessibility related issues, making the most of the fact that both Joanie (Orca maintainer) and Piñeiro (ATK maintainer) would be there too, so it should be possible to make things happen faster, specially discussion-wise.

And turns out that, even if I feel like I could have achieved more than what I actually did (as usual), I believe we did quite well in the end: we discussed and clarified things that were blocking the mapping of new WAI-ARIA roles in WebKitGTK+, we got rid of a bunch of WebKit1-specific unit tests (Joanie converted them into nice layout tests that will be run by WebKit2GTK+ too), we got a few new roles in ATK to be able to better map things from the web world and and we fixed a couple of issues in the way too.

Of course, not everything has been rainbows and unicorns, as it seems that one of the patches I landed broke the inspector for WebKit2GTK+ (sorry Gustavo!). Fortunately, that one has been rolled out already and I hope I will be able to get back to it soon (next week?) to provide a better patch for that without causing any problem. Fingers crossed.

In the other hand, my mate Brian Holt joined us for three days too and, despite of being his first time in the hackfest, he got integrated pretty quickly with other hackers, teaming up to collaborate in the big boost that the network process & multiple web processes items have went through during the event. And not only that, he also managed to give a boost to his last patch to provide automatic memory leak detection in WebKitGTK+, which I’m sure it will be a great tool once it’s finished and integrated upstream.

Anyway, if you want more details on those topics, or anything else, please check out the blog posts that other hackers have been posting these days, specially Carlos’s blog post, which is quite extensive and detailed.

Samsung LogoOf course, I would like to thank the main sponsors Igalia and the GNOME Foundation for making this thing happen again, and to my employer Samsung  for helping as well by paying our trips and accommodation, as well as the snacks and the coffee that helped us stay alive and get fatter during the hackfest.

Last, I would like to mention (in case anyone reading this wondered) that it has indeed felt a bit strange to go the city where I used to live in and stay in a hotel, not to mention going to the office where I used to work in and hang around it as a visitor. However, both my former city and my former colleagues somehow ensured that I felt as “at home” once again, and so I can’t do anything about it but feeling enormously grateful for that.

Thank you all, and see you next year!

Greppin’ in the past with git

Published / by mario / 4 Comments on Greppin’ in the past with git

It seems that one can never stop learning new things with git, no matter for how long you’ve been using it (in my case, I’m a proud git user since 2008), because today I added a new trick to my toolbox, that already proved to be quite useful: “grepping” files in a git repository, as you would do it with git grep, but using a commit-id to limit the search to a specific snapshot of your project.

In other words, I found that it’s possible to do things like, say, grep files to search for something in your repository considering how it was, say, some commits ago.

This is the “magical” command:

    git grep <search-params> <tree-id>

This is what I get if I try to search for updateBackingStore() in my local clone of WebKit, as if my current branch was “50 commits older” than what it actually is:

$ git grep updateBackingStore HEAD~50
0ae236137d560da6ca889a826a8f3d023364a669:AccessibilityObject.cpp:void AccessibilityObject::updateBackingStore()
0ae236137d560da6ca889a826a8f3d023364a669:AccessibilityObject.h:    void updateBackingStore();
0ae236137d560da6ca889a826a8f3d023364a669:AccessibilityObject.h:inline void AccessibilityObject::updateBackingStore() { }
0ae236137d560da6ca889a826a8f3d023364a669:atk/WebKitAccessibleUtil.h:        coreObject->updateBackingStore(); \
0ae236137d560da6ca889a826a8f3d023364a669:atk/WebKitAccessibleUtil.h:        coreObject->updateBackingStore(); \
0ae236137d560da6ca889a826a8f3d023364a669:atk/WebKitAccessibleWrapperAtk.cpp:    coreObject->updateBackingStore();
0ae236137d560da6ca889a826a8f3d023364a669:ios/WebAccessibilityObjectWrapperIOS.mm:    m_object->updateBackingStore();
0ae236137d560da6ca889a826a8f3d023364a669:ios/WebAccessibilityObjectWrapperIOS.mm:    m_object->updateBackingStore();
0ae236137d560da6ca889a826a8f3d023364a669:mac/WebAccessibilityObjectWrapperBase.mm:    // Calling updateBackingStore() can invalidate this element so self must be retained.
0ae236137d560da6ca889a826a8f3d023364a669:mac/WebAccessibilityObjectWrapperBase.mm:    m_object->updateBackingStore();

I don’t know about you, but I find this quite useful for me to answer questions such as “Where was this function being used in commit X?”, and things like that.

Anyway, you might have noticed that I mentioned <tree-id> in the recipe instead of <commit-id>, yet I used HEAD~50 in the example, which is actually a commit-id. And still works.

And the short explanation, without trying to explain here all the different kind of data types that git keeps internally for every repository (mainly commitstrees and blobs), is that git is smart enough to find the right tree-id associated to a given commit-id by just considering the current path inside the repository and the tree-id associated to the top directory for a given commit.

But how to know that tree-id myself in case I want to? Easy, just pretty print the full information of the commit object you’re interested in, instead of only seeing the abbreviated version (what you usually see with git show or git log:

$ git cat-file -p HEAD~50
tree 0ae236137d560da6ca889a826a8f3d023364a669
parent bdb7a7949a29988da3fe50a65d6c694d5084d379
author [...]

See that tree thing in the first line? That’s the tree-id that git needs for grepping, which as you can see can be easily extracted from a particular commit. Actually, you could get easily the tree-id for any subdirectory from this point, by using the git ls-tree command:

$ git ls-tree 0ae236137d560da6ca889a826a8f3d023364a669
100644 blob 3fe2340c9614e893f0dfeb720f23773bbf1ea076	.dir-locals.el
100644 blob 741c4d53b5a0338cf36900a283e89408d0f9d457	.gitattributes
100644 blob f45a975762be9a429aa971c18da01b433c559553	.gitignore
100644 blob d571aa28ea86c14c7880533bf3ba68e9ef4b3c81	.qmake.conf
100644 blob 10f85055ae9f3823f0d20808599f644c18af7921	CMakeLists.txt
100644 blob 5eb66e7bcbc7543eb3a4dbf183a9043545776659	ChangeLog
100644 blob 7dbe9d2e0029bab47b8b2b22065a1032ecfe4434	ChangeLog-2012-05-22
040000 tree d42a0b3121ed7993cfd250426d20472769760f87	Examples
100644 blob 78d89e5c70ad56c38b0c25e7705d42fa380c4ee0	GNUmakefile.am
040000 tree 4a9e87fc1f35efa1349a18b1df694530c981c57e	LayoutTests
100644 blob 14e33157011157797dac62c494bac0bf254d7c2f	Makefile
100644 blob ee723d830dea51d1ce9e2d1ad8c985eeca2d4f3f	Makefile.shared
040000 tree 20c763d6a4e8749ad9e041e8372e9f47dc722f45	ManualTests
040000 tree 660d88b926cf618ab9e1612b8e2a3e97b15dbcbe	PerformanceTests
040000 tree fbf9703d3e9a9e4cf2ff10817c99ba3a5de87410	Source
040000 tree 346110c441a674334f5f56ef42b9dd40def89c76	Tools
040000 tree 262cb11d9b491be35daee570f9b825bce5715579	WebKit.xcworkspace
040000 tree b9e48a7a24b4973b253ee14053808b40d67c94aa	WebKitLibraries
040000 tree adce37b690957abdd21d2dd8ff77302c5a5a9071	Websites
100755 blob befd429487fc5ac9bb3494800f4eeaef1e607663	autogen.sh

And of course, “navigating” with more calls to git ls-tree you could also get the tree-id for a specific subdirectory, in case you wanted to constraint the search to that specific path of your repo.

However, considering that git is so good at translating a commit-id into a tree-id, my personal recommendation is that, instead, you first cd into the path you want to focus the search in, and then let git  do its “magic” by just using the git grep <search-params> <tree-id> command.

So that’s it. Hope you find this useful, and please do not hesitate to share any comment or suggestion you might have with regard to this or any other “git trick” you might know.

I honestly love using git so much that sometimes I wonder if coding is not just a poor excuse to use git. Probably not, but the thing is that I can not imagine my life without it anymore. That’s a fact.

Goodbye Pango! Goodbye GAIL!

Published / by mario / 2 Comments on Goodbye Pango! Goodbye GAIL!

As I mentioned in my previous post before GUADEC, I’ve been putting some effort lately on trying to improve the accessibility layer of WebKitGTK+, as part of my work here at Samsung, and one of the main things I’ve worked on was the removal of the dependency we had on Pango and GAIL to implement the atk_text_get_text_*_offset() family of functions for the different text boundaries.

And finally, I’m really happy to say that such a task is complete once and for all, meaning that now those functions should work as well or as bad on WebKit2GTK+ as they do in WebKitGTK+, so the weird behaviour described in bug 73433 is no longer an issue. You can check I’m not lying by just taking a look to the commit that removed both all trace of Pango and GAIL in the code, as well as and the one that removed the GAIL dependency from the build system. And if you want more detail, just feel free to check the whole dependency tree in WebKit’s bugzilla.

This task has been an interesting challenge for me indeed, and not only because it was one of the biggest accessibility related tasks I’ve worked on in WebKitGTK+ since late 2012 (so I needed to get my brain trained again on it), but also because reimplementing these functions forced me to dive into text editing and accessibility code in WebCore as I never did before. And it’s so cool to see how, despite of having to deal eventually with the frustrating feeling of hitting my head against a wall, at the end of the day it all resulted on a nice set of patches that do the work and help advance the state of the ATK based accessibility layer in WebKitGTK+ forward.

Anyway, even though that is probably the thing that motivated me to write this blog post, that was not the only thing that I did since GUADEC (which has been a blast, by the way):

On the personal side, I’ve spent two lovely weeks in Spain on holidays, which was the biggest period of time I’ve been outside of the UK since I arrived here, and had  an amazing time there just “doing nothing”(tm) but lying around on the beach and seeing the grass grow. And there is not much grass there anywhere, so you can imagine how stressful that life was… it was great.

In the other hand, on the professional side, I’d say that one of the other big things that happened to me lately was that I finally became accepted as a WebKit reviewer, meaning that now I can not only help breaking the Web, but also authorize others to do it so. And while agree that might be fun in some way, it probably would not be very cool, so forgive me if I try instead to do my best to help get exactly the opposite result: make things work better.

And truth to be told, this “upgrade” came just with perfect timing, since these days quite some work is being done in the accessibility layer for both the WebKitGTK+ and the WebKitEFL ports thanks also to my mates Denis NomiyamaAnton ObzhirovBrian Holt and Krzysztof Czech from Samsung, and that work would ideally need to be reviewed by someone familiar with the ATK/AT-SPI based accessibility stack. And while I’m still by far not the most knowledgeable person in the world when it comes to those topics, I believe I might have a fairly well knowledge about it anyway, so I assume (and hope) that my reviews will certainly add value and help with those specific pieces of work.

And as a nice plus, now I can finally “return the favour” to the only accessibility reviewer WebKit had until now (Chris Fleizach) by helping reviewing his patches as well, in a similar fashion to what he has been tirelessly doing for me for the last 3 years and a half. Yay!

To finish , I’d like to get back again to the original topic of this post and say a big “thank you” to everyone who helped me along the way with the removal of Pango and GAIL from the ATK specific code. Special thanks go to those who spend time performing the code reviews, as it’s the case of Martin, Gustavo and Chris. I wouldn’t be writing this post otherwise.

Thanks!

I’m going to GUADEC!

Published / by mario / 1 Comment on I’m going to GUADEC!

I'm attending GUADECOne year again GUADEC is approaching and, also again, I’m very happy to say that I’ll be there as well this time, even if I have to recognize it was not on my plans for this year, at least not initially.

And the reason why it was not initially in my plans was mainly because I’ve been already through quite some changes during these past months year, and my family just came over to the UK two months ago. This means that, even I already arrived by the beginning of the year, we just started to settle here as a family a few weeks ago. So in that context, I didn’t feel like leaving them alone for one week already now, it definitely would look like a “wrong management of priorities” to me.

However, it turns out that my wife and kids won’t be here anyway during the first week of August and, on top of that, Samsung has been so kind to sponsor this trip just based on the simple fact that I’m part of the GNOME community. So, I certainly can no longer find a single reason not to go and spend 7 amazing days in Brno, meeting people that I normally see only in conferences (and this time that group of people will be bigger than ever, since my former mates from Igalia are now also included there), while attending to what it seems to be a very appealing event.

Also, I will try to make the most of the trip to do some work during the different hackfests and BoFs that are already planned, which special focus in the one about accessibility, of course. As a personal goal, I expect to have the chance to move forward some work I’ve been doing lately in the WebKitGTK+ a11y world, such as getting rid of the nasty dependency on Pango/Gail we still have there, something I’ve been already working on for some time now, and which I expect it will be fixed soon, hopefully before GUADEC, although time will tell.

Once that it’s fixed, WebKit2GTK+ based apps should recover the ability to properly expose text through the atk_text_get_text_*_offset() family of functions for different text boundaries, which means that ATs (e.g. the Orca screen reader)  will be able to properly allow again line-by-line navigation when in caret browsing mode. And, as you can imagine, this is quite a big problem these days, since WebKit2GTK+ that has become the default backend for some core apps such as the Epiphany browser with the GNOME 3.8 release, so fixing this is like a high priority now, I’d say.

Samsung LogoAnyway, I’m starting to write too much (as usual) for what it was going to be a short “I’m going to GUADEC” blog post, so I will stop right now, although not without first thanking Samsung for sponsoring this my first trip to the Czech Republic.

See you all in three weeks!

WebKit Contributors Meeting 2013

Published / by mario / 2 Comments on WebKit Contributors Meeting 2013

It turns out I’m writing this post at 6:00 AM in the morning from a hotel instead of doing it at a more reasonable time from my comfy home or a nice cafeteria. That’s already quite a new thing by itself, and the reason for that is not that I became crazy or something, but the fact that I’m completely jet-lagged in California right now in order to attend my second WebKit Contributors Meeting (my first time was in 2011), this time as part of the Samsung team in the UK R&D center, together with my mate Anton Obzhirov.

With regard to that, it has been a very interesting experience so far where I could meet new people I still haven’t had the chance to see in real life yet (e.g. my mates from other Samsung R&D centers or some guys from Apple I didn’t have the chance to meet in person before), as well as chat again with some friends and former mates that I haven’t seen for a while, such as Martin, Xan and Philippe from Igalia, Byungseon from LG, Nayan from Motorola or Gustavo from Collabora to mention some of them. It’s strange, and at the same time wonderful, how easily you can catch up on conversations with people that you barely see once a year (or even less) and mainly in conferences, and definitely one of my favourite parts of attending these kind of events, to be honest.

Also, from a less social point of view, I have to say I found very interesting the sessions I’ve attended so far, specially the one about “managing the differences between ports”, although the one about “build systems” was quite interesting too. Not sure how far we are yet in the WebKitGTK+ port from realistically switching to some kind of commonly agreed build system (cmake?), but at least it’s a good start to agree on the fact that it would be an interesting move and now that some people pushing for it.

My only regret about this first day is that I missed Hyatt‘s talk about pagination due to some health issues I’m experimenting while in California, mostly due to the extremely hot and dry weather (anything over 25 Celsius is “unbearable hot” for me), which is causing me a little bit of cough, sore throat and fever, all well mixed with the jet lag to make it a perfect “welcome pack” to the meeting. Fortunately, I got some “interesting” medicines that seem to have relieved a bit the pain and I could attend the rest of the sessions without much trouble, other than some occasional coughing. Not bad.

By the way, for those of you who were not lucky enough to attend the meeting but are anyway interested in the topics being discussed here, make sure you check the main TRAC page for the meeting, where you can also find transcripts for most of the sessions.

As for today, some more sessions will take place as well as a couple of hackathons so I expect it to be very interesting as well. Also I hope I can find some time too to work a bit on my patches to remove the nasty dependency on pango we have in WebKitGTK+ accessibility code, which is preventing us to have proper caret navigation in WebKit2GTK+ based browsers, as well as to discuss possible ways in which our lab could collaborate more actively upstream. Seems a promising day already!

Last (but not least), and in a completely unrelated and super-off-topic way, I would like to tell the world that I’m extremely happy for the fact that next week will be the end of my “lonely existence in the UK”, finally. After 4 months of living away from my family with just some flash trips from Friday to Sunday (every 2 weeks), I’m once and for all travelling on Thursday to my home town with a one way plane ticket to do some final arrangements, put everything (family included!) in the car and travel to Santander, where we’ll be taking a ferry that will take us to the Portsmouth (southern coast of England), from where we will just drive to the UK in order to start our new life, all together again.

It has been quite hard for us to live this way for so long, but I think in the end we managed to handle the situation quite well, and now it seems all our efforts are already paying off because things seem to be finally fitting in the right places: we have a lovely house, we have a place in a nearby public school for my oldest kid to start on September, most of the needed paperwork seems to be done and we already moved all our stuff from Spain (lots of toys!), which is now waiting to be used in our new place.

I really can’t wait to live again in the noisy and chaotic atmosphere that two kids can so easily create around them. Even if that means it will probably drive me crazy every now and then and that I won’t sleep that well sometimes.

Yes. Even considering that.

Multiple cursors, Emacs and me

Published / by mario / 13 Comments on Multiple cursors, Emacs and me

It’s been 7 years already since I started using Emacs and, for some reason, I still haven’t found a text editor I do feel more comfortable with, and I Swear to Gods I’ve tried. I really did. And as proof, I can tell that those who know me a bit can really support this statement, no doubt about it.

The thing is that,  for some reason or another, whenever I tried a different editor, a fancy IDE or anything else, the result was always the same: I first realize of a new and very interesting feature X in the editor Y which makes me think for a while “hmmm… this could be the one”, then I start using that editor Y for a while, then I realize I’m not comfortable enough for many other things, then I realize I’m continuously alternating between that editor and Emacs and then… finally… I somehow manage to “port” that very nice feature X to Emacs and ditch editor Y to finally come back to the origin again.

And that has been the story of my (text editing) life so far. And, as you can see, I haven’t written a blog post about every single feature X I added to my Emacs. But this time is different.

Everything started, as usual, with me willing to try a new text editor, and this time I selected Sublime Text 2 as the one to check, mainly because I wanted to check myself whether of all the hype around it was justified or whether it was just… well… just hype.

And I have to say that I was really impressed by ST2: what I’ve seen is a very nice and modern editor which is blazingly fast and convenient to use, and which on top of that it comes with a lot of useful features and a nice configuration out-of-the box, which is also very easy to customize and extend if you want to. Up to that moment, everything seemed to suggest I could be really in front of a replacement for Emacs, but given my past experiences I still took this with a grain of salt (even if I could not hide my excitement either)…

If you don’t believe me, you should really checkout its website and, even better, the “Perfect Workflow in Sublime Text2” tutorial and you will see yourself what I’m talking about.

However, not all were bells and whistles in my ST2 experience. There were drawbacks too, and the main ones I could see were that it was not an Open Source editor and that the bus-factor was really scary (only one developer, I think). And those two things together were a serious concern to me. But I tried it anyway, because it really feel like it could be a serious competitor for my Emacs, and I was willing to take the risk, just for the sake of checking it (and playing around with a new editor, which I confess is something I love doing every now and then in any case).

But yet again, the same pattern happened one more time: I found myself loving ST2 in many regards but alternating too often between it and Emacs since, even if ST2 was lovely for many things, there was nothing that was really convincing me of replacing my Emacs in favour of it. Well, almost nothing… because the “multiple cursors” feature in ST2 got my attention as not many text editor features got it in the last years.

So, the obvious step at this point, having already decided that I would be going back to Emacs again, would be to try to port this nice feature to Emacs, and then I found the awesome “Emacs Rocks!” site, where I found a demonstration of this sleek feature working inside Emacs. I´ll leave the link to the video here, so you can really see what all this is about:

As you can see, this feature is amazingly useful for many things of everyone’s life (well, maybe not really everyone’s, but almost!), as it’s incredibly helpful for things like massive “search & replace”, improving code structure (e.g. break a list of strings in one single line into multiple ones) and many other situations.

Others might disagree, of course, but for me there’s a “before” and an “after” I knew about this feature, and I don’t think I will be able to easily move now to an editor which doesn’t have something like this available in some way.

Should you want to try it out yourself, I recommend you to check out both episode 13 in “Emacs Rocks!” as well as the github repository where you’ll find the package for Emacs.

Guess this means I’ll stick to Emacs for some more time after all, even if I’m still not sure I will stick forever to it, since I can’t say either I’m 100% comfortable with it, just that it’s the best thing I’ve found so far. Yet I can’t avoid feeling that I still haven’t found what I’m looking for

Accessibility in [WebKit]GTK+

Published / by mario / 8 Comments on Accessibility in [WebKit]GTK+

This past week I’ve spent some time explaining to my mates at Samsung the basics about how accessibility works and is implemented in WebKitGTK+. I realized, yet again, of how messy and confusing everything can be the first time you encounter these things. After all, WebKit is quite a complex project already and accessibility is not a simple matter either.

In order to help them better understand this topic, I wrote a summary to have as reference that explains in my own words which the main pieces of the whole puzzle are, and how they relate to one another. In my experience, it’s not always easy to understand the big picture quickly, and I think this kind of documentation can be quite useful for anyone willing to contribute to accessibility in WebKitGTK+. At least it would have been useful for me when I started working on this. I only regret not having written it before, but better late than never, right?

So let’s begin then. I will start by talking about accessibility-only stuff, which are basically common to any accessible application based in GTK+. Then I will explain the bits specific to WebKitGTK+ and how they fit in the picture.

Accessibility in GTK+ applications

The parts, or “actors”, involved in any GTK+ application from an accessibility point of view are:

  • Assistive Technologies (ATs)
  • AT-SPI (Assistive Technology Service Provider Interface)
  • ATK (Accessibility ToolKit)
  • ATK <-> AT-SPI bridge
  • GTK+
  • GTK’s Accessibility Implementation

Accessibility in GTK+ applications

Now let’s describe all those points, one by one:

Assistive Technologies (ATs):

ATs are applications whose main purpose is to facilitate access and/or interaction with certain bits of information interesting from an accessibility related point of view, exposed by other applications. This access/interaction can be primarily output based. For instance the Orca screen reader is an AT which provides access via text to speech and/or refreshable braille to on-screen information exposed by editors, browsers, mail agents and other applications.

Other ATs are primarily input based, allowing the user to interact with the exposed applications by executing certain actions over them (e.g. clicking on a exposed link), so it’s not just about “consuming” information. Normally, ATs are called the clients and the applications exposing information the servers, as in the end it’s actually an implementation of a typical client/server architecture.

AT-SPI (Assistive Technology Service Provider Interface):

Set of interfaces that Assistive Technologies (the clients) understand and use to inspect and interact with the accessible content exposed by applications in Linux environments. At some point, “someone” has to provide actual AT-SPI objects (linked together forming a AT-SPI hierarchy) implementing several of those interfaces (depending of the type of object) so ATs can “see them”.

This is the job of the AT-SPI registry, a daemon which takes care of maintaining a hierarchy of AT-SPI objects for every single accessible application in the system, in a centralized way, so ATs can interact with them. It is worth mentioning that the parent/children relationships in that hierarchy are modelled in terms of D-Bus, so different AT-SPI objects can belong to different processes.

ATK (Accessibility ToolKit):

The toolkit used by GTK+ applications to expose accessible representations of the toolkit’s objects, along with appropriate interfaces, on the side of the applications exposing content (the servers). This representation is an almost a 1:1 match with the objects and interfaces defined by AT-SPI (that is, almost).

The main difference when it comes to understanding its place in the puzzle is that AT-SPI is what clients (ATs) understand, and that is not process-bounded (see previous point). ATK, in contrast, is what servers implement to expose accessible information, and it is process-bounded. Thus the parent/children relationships in the ATK hierarchy are modelled by actual references (pointers) between objects living in the same process.

ATK <-> AT-SPI bridge:

The glue that makes sure there’s a mapping between the ATK hierarchy living in the server process and the AT-SPI hierarchy held by the AT-SPI registry. Such a bridge is implemented in terms of D-Bus too, as it needs to communicate with the registry whenever something needs to be updated there, as well as when the server needs to react to external actions coming from ATs (e.g. perform the default action for an object).

GTK+:

The widgets toolkit normally used by applications embedding WebKitGTK+. Explaining what GTK+ is beyond the scope of this post, so I will assume you already know what it is.

GTK’s Accessibility Implementation:

Provides ATK objects implementing different ATK interfaces for every widget from the GTK+ library, and uses the ATK <-> AT-SPI bridge to communicate with the AT-SPI registry. This means that if you use standard GTK+ widgets only, your application will be accessible out-of-the-box. On the contrary, should you use custom widgets, you’ll probably have to write custom ATK objects implementing the proper ATK interfaces to make them accessible too.

So that’s all so far, when it comes to GTK+ applications. Check the following diagram for a more detailed look at all these hierarchies for a hypothetical GTK+ application exposing information and a screen reader accessing it:

Accessibility in GTK+ applications: a specific exampleAs you can see, there’s an ATK tree matching the GTK+ hierarchy, and another AT-SPI tree matching the ATK one. Finally, the screen reader accesses the information through that AT-SPI tree, as explained above.

Accessibility in WebKitGTK+

Now that we already understand the basics of accessibility in GTK+ applications, let’s add the bits specifically related to WebKitGTK+. Namely:

  • WebCore’s Accessibility Objects
  • WebKitGTK+ (ATK) wrappers
  • WebKit2GTK+ specific details

Again, a picture is usually better than just text, so here you have one too:

Accessibility in WebKitGTK+

In order to clarify it a bit more before explaining each point, let’s just say that  you’ll have to look in the dashed box named WebCore accessibility world, where the hierarchy on the left (red & orange) represent the WebCore Accessibility objects, while the one on the right (the green one) represents the WebKitGTK+ ATK wrappers.

With this in mind, let’s examine these three points in more depth:

WebCore Accessibility objects:

Similar to GTK’s Accessibility Implementation, WebCore‘s accessibility objects are the implementation of an independent hierarchy exposing accessibility related information for objects present in a web page. As the mission of accessibility in WebKit is to expose information to users that are normally being rendered in the screen (as well as some other information that might be hidden to regular users), there is a tight relationship between this hierarchy and other ones in WebKit, such as the DOM tree and the Render Objects tree.

This layer is meant to be platform-agnostic, so you won’t find much WebKitGTK+ specific stuff here. Instead, you will find the implementation of the accessibility related specifications published by the W3C‘s Web Accessibility Initiative (WAI), such as WAI-ARIA.

WebKitGTK+ ATK wrappers:

An ATK-based implementation of an accessibility hierarchy where every ATK object will take care of wrapping the proper accessibility object from WebCore, as well as implementing the proper ATK interfaces depending on the situation (e.g. the role of the WebCore accessibility object, some properties coming from the associated Render Object…).

The ATK hierarchy created here is connected with the ATK hierarchy from the embedding application (normally a GTK+ app) by setting the root ATK object in this tree (normally representing DOM‘s root element) as the child of the leaf ATK object in the tree coming from the embedding application (normally the GtkWidget containing the WebView).

As is the case with any other regular GTK+ application, this ATK hierarchy will finally be seen by ATs thanks to the translation that the ATK <-> AT-SPI bridge will do for us, making the whole ATK tree from the WebKitGTK+ based application (from the top level GTK+ window down to the deepest accessibility object inside WebCore) available to the AT-SPI registry by means of D-Bus.

WebKit2GTK+ specific details:

I already talked about this in previous posts, so I will focus here just on commenting the main difference compared to the generic case for WebKitGTK+ described earlier (see previous diagram above):

WebKit2GTK+ implements a split-process model, where the  high level API belongs to one process (the UI process) while the core logic of the web engine lives in another one (the Web process).

From an accessibility point of view, this means that the full hierarchy of ATK objects we had before is also split in two parts: some accessibility objects are now in the UI process and the rest of them will be in the Web process.

To be more specific, we’ll find the following objects in each process:

As I explained previously, these two ATK hierarchies will be seen as a single accessibility hierarchy by ATs thanks to the “magic” of AtkPlug and AtkSocket classes, which takes care of exposing everything together in a single AT-SPI tree. And remember that such a tree is modelled by means of D-Bus, so it does not matter that things are actually in different processes.

Thus, since ATs just  understand AT-SPI, they will see The Right Thing ™ as in the previous case where we have one single process. See the following diagram for a more visual explanation of this:

Accessibility in WebKit2GTK+

Wrapping up

So that’s it. At the end the post turned out to be longer than what I was expecting, as my initial idea was to publish the stuff I wrote internally at Samsung this week, but ended up extending it quite a lot!

At least I hope this will be helpful for anyone willing to contribute to accessibility, either in WebKitGTK+ or in a more general way.

After all, most of the stuff I talked about here applies to  every accesible GTK+ application: Assistive Technologies (ATs)AT-SPIATK, the ATK <-> AT-SPI bridge

Last, I would like to thanks Joanmarie Diggs from Igalia for her help with this blog post. One certainly feels more confident writing a long article like this one about a very specific topic when you have one of the most experienced persons on the matter reviewing it!

My first week at SERI

Published / by mario / 9 Comments on My first week at SERI

So, after almost 3 months of “holidays”, I’ve finally started working on my new job this Tuesday in Samsung Electronics Research Institute UK (aka SERI), where I’ll join a team mainly working in A/V and DTV related stuff while, at the same time, I’ll keep contributing to WebKit and WebKitGTK+.

Samsung Smart TV Unveils New Smart HubAs you can imagine, being the first week means that I mostly spent my time learning a lot of stuff about my new job and the tools I’d be using, as well as setting up my development environment and getting to know my colleagues and the things we’ll be working on.

But for the time being I have to say that my first impression has already been very positive and that I’m enthusiastically looking at the future and what it’s going to be next. Surely it will be a very different experience compared to what I was used to, but in a way that’s precisely what I was looking for, and so that’s why I feel very optimistic and motivated about it.

Also, and besides work related stuff, being a new resident in the UK also means that I had to spend some time doing some additional things, such as creating a bank account, getting a UK-based SIM card and starting to look for a place that should become our permanent residence in 2-3 months time, once my wife and my children move as well to the UK (they’re still in Spain), hopefully before Easter. Fortunately, being a EU citizen simplifies a lot the whole thing of coming here to work, since I don’t need any VISA or the like. Just my Spanish ID and/or Passport are more than enough.

Anyway, I’ve just arrived in the UK on Monday and started working on Tuesday (yeah, I love having big margins) so still much to do left, but I’m already on my way so it’s a matter of time that we are settled here, and that we start living the “English adventure” all together again.

But in the meanwhile we’ll have to live with me visiting them every 2-3 weeks and the typical audio/video conference tools.

Can’t wait!

Frogr 0.8 released

Published / by mario / 5 Comments on Frogr 0.8 released

During the last weeks, I decided to make the most of some spare time I had while still in “nowhere land” (see my previous post) and so I’ve been working in frogr to see if I could release the 0.8 version before the end of the year. In my mind it looked like kind of a nice and humble Christmas present to the world and, at the same time, a interesting way to spent this time I had between my depart from my previous job and the start of the new one.

And it turns out that, at the end, I didn’t manage to have as much spare time as I initially expected to have (I was pretty busy most of the time, actually), mainly due to many unrelated things I needed also to take care of, but in the end I still managed to steal some minutes here and there and I’m now proudly announcing that the new release is finally out.

But before going on, see the mandatory screenshot, as taken in my Fedora 18 machine:

As you can already spot in the screenshot, some changes are already quite visible, but some others are not, so let’s now comment on the most important ones, one by one…

Ported to GtkApplication and GMenu

It’s no secret that one of my favourite changes in this release is the integration with GNOME 3‘s “global menu” (aka the application menu), which makes frogr more beatifully integrated with the desktop than ever. However that came with a price: I needed to port frogr to GtkApplication first and then implement both the application menu and the menu bar using GMenu, which also made me raise the required version for GTK+ up to 3.4.

Sure I could have kept adding more ifdefs to the code to keep supporting previous GTK+ versions, but I also saw this as a good opportunity to clean up the code and get rid of so many conditional compilation units that were increasingly harder to maintain, and so I did it. As a plus, the OS X specific code has been reduced enormously as well, since GTK+ 3.4 integrates very well with OS X without having to do anything special, as I needed to do when I used GTK+ 2.24 for that port.

Loading and saving ‘projects’

This has been one of the features that several people have suggested in the past in different occasions, and so one of those I hope people will enjoy the most with this new release: the possibility to save the current session into a “project file”, so you can resume your work later.

How it works it’s actually pretty simple: when you save a session to a project, frogr will just serialize your current pictures, sets, groups and local tags to a json file (using json-glib) that you can use to restore the state later. It could be more sophisticated, but I think that it works reasonably well in the tests I did considering what it was designed for. In any case, please feel free to report bugs or feature requests to improve or fix things if needed.

Support for video uploads

Believe it or not, frogr has been almost ready to upload videos since some time ago, since for Flickr a video is just a “moving picture”, and it’s treated in exactly the same way than pictures when it comes to the upload API.

The only thing that was missing to remove that almost from here was to generate thumbnails for videos so they could get loaded into the UI. Not rocket science, sure, but something which needed doing and which was not a priority at all until now. And to be honest, it is not a priority yet anyway, but I felt like doing it this time once and for all, so from now on you can upload videos too.

Other features & bug fixes

Besides those three and perhaps more noticeable features, frogr 0.8 comes with several other new things, bug fixes, small changes and refinement that I hope will make this release more stable, useful and fun to use than ever.

Some examples of those other new things are, as taken from the NEWS file:

  • Handle and report errors in a better way (no more mysterious failures).
  • Perform after-upload operations (add to sets/groups, set license…) in parallel.
  • Avoid fetching sets/groups/tags when still not connected yet to Flickr.
  • Hide title bar when main window is maximized (see screenshot above).
  • Renamed the ‘Actions’ menu to ‘Edit’ and brought the ‘File’ menu back.
  • Allow sorting elements in the icon view by size.

Last, I’m also quite happy to tell that the OS X port of frogr has been finally migrated to GTK+ 3 in this release (at last!), and that the whole process of building it for that platform is now easier than ever, thanks to a specific Jhbuild moduleset I created for that purpose, following the lead of GEdit (thanks Nacho for the suggestion).

Check out the README file in the osx/ directory if you feel curious about the process or if you want to build it yourself. It shouldn’t take more than 2-3 commands in the terminal to get something like this running in your OS X machine:

Also, another advantage of having that moduleset created, is that now it’s trivial to properly document (by means of a shell script) the bundle file used to distribute frogr in OS X, instead of just providing an “opaque” pre-compiled bundle, as I used to do in an “unofficial way” with previous versions. Feel free to grab the bundle I’ve just created for this release from the GNOME FTP server.

So that’s it. I hope you enjoy using frogr 0.8 as much as I did writing it, and if you eventually find it useful too, then even better! As usual, check the website of the project for additional information or just to know how to install frogr on your system.

Moving On

Published / by mario / 14 Comments on Moving On

Two months ago it was an important day for me. It was the day that I finally told my partners at Igalia that I’d be leaving the company, after almost seven years. It hasn’t been an easy decision to make and so this hasn’t been an easy post to write either… yet one I’d like to write anyway.

But let’s push the rewind button for a moment now…

I’ve joined Igalia on November 2005, initially as a trainee while I was finishing my studies of Computer Science Engineering, and got quickly hooked by the company, the people that was part of it back then and the kind of project they were trying to build.

Igalia as a company is one of a kind, you can be sure of it, and I felt enormously lucky for having found it and having been granted with the privilege of being part of it. And best of all… it happened to have its main office in my own town! I just couldn’t believe it…

I even still recall now how many mates of mine in the Faculty were telling me, back in the days of the University, things like “that Linux thing you like so much is not worth it”, “forget about Open Source, you won’t ever make a living out of it” or even “well, maybe there’s a chance for you to work on that, but it’s definitely not going to happen here”.

I have to say I never believed much in any of those statements (well, maybe a bit the last one), but I swear I couldn’t have ever imagined that I’d be able to prove all of them wrong at the same time without even having to move out of the country, let alone the town.

It was too good to be true. But it was true and real… it definitely was real.

And turns out that what started as a 3-month internship in late 2005, became my first permanent job (and the only one so far) when I became a regular employee on February 2006, to finally become a partner of the company in 2010. Not bad.

I worked on many different projects across all these years, from system administration tasks and pure web development to application development over the GNOME and the Maemo platforms, to end up working on what it probably became the most challenging and interesting thing I’ve ever worked on: the WebKit project and, more specifically, the WebKitGTK+ port.

Additionally, I also met a lot of awesome people while there, both inside Igalia and outside (e.g. at conferences), in some cases  becoming closer to “actual friends” than to “just work mates”, which is yet another great thing I will always feel lucky and grateful for.

In other words, I grew up there, both at the professional and the personal level, and I feel endlessly grateful for that. I’m sure my life wouldn’t have been the same now without that stage in my life, so I don’t have more than good words and thoughts about it.

However, and even if I still think Igalia is an awesome place to be part of, I’ve been lately feeling like I needed a change, to try something new, to move on…

I’m not sure about how much that could be related to the fact that my life is now quite different than seven years ago, and that perhaps my priorities could have shifted now I have my own family, but the fact is that at some point I very clearly saw that I would need to try something else, to change some things and patterns in my life, kind of a “fresh restart”.

And after so much thinking, I suddenly realized such a  change couldn’t ever happen if I stayed in Igalia, since it would probably require that the company stopped being as it is in some ways. And that’s something I don’t think I should ask for “just because I felt that way”. That would be too selfish, don’t you think?

So I made the only decision I thought it made sense: to quit.

Sure it was hard, and even tough at some moments, to make such a decision. But once I made it for real, I have to say I felt very well about it, as if everything was making sense once again, as if the puzzle I was trying so hardly to solve was finally complete.

In any case, this doesn’t mean I want to work on something completely different either. In my lollipop world, my plan is to keep working around the Open Source world as much as possible, hopefully also around GNOME and WebKit, the two platforms I learned to love during these years. Well, actually for the case of GNOME I must say it’s a platform I already loved before joining Igalia, but I can’t deny that being part of that company played a major role to help me get more involved on it, so that’s why I think it deserves some credit.

Fortunately, I’m a lucky guy and I can already say that, just two months after making that decision and starting looking for new opportunities, I already found a job where I think I’ll be able to keep working in what I love (see paragraph above) while, at the same time, being also able to try something different and new compared to what I’ve done so far.

Additionally, I think this new job will also help me find answers to the questions that have been crossing my mind lately, let alone learning new stuff… I’m sure I’ll learn a lot of new stuff as well, something I already can’t wait for.

Anyway, I won’t start working there until January, so let’s go step by step.

First I needed to write this post to tell the world about my new situation (check). Second, I need to use these “two months in nowhere” to re-organize my life and arrange many different things related to the short-term (work in progress). Finally, I’ll start that new stage in my life and finally announce here where I’m going to, something I’d rather keep for another post.

Surely I know all this will mean big challenges for both me and my family (we’ll be moving abroad, to begin with), but those are challenges we’re willing to face and can’t wait for. In a way, I kind of feel like I did 7 years ago right before joining Igalia, when I just finished my studies at the University and still had no clue what I was going to do with my life. Back then, the future looked uncertain and full of opportunities at the same time, and if I now look backwards I can clearly see it was even better than what I’ve would ever have expected. Really.

And you know what? That’s exactly how I feel right now, and that’s a feeling I’m liking a lot. And believe me, I’m pretty much aware that my current situation (married and with two children) is quite different compared to 7 years ago. Yet it doesn’t scare me well enough not to feel thrilled about this new stage in our life, a stage I’m already eager to deal with.

So it’s time to move on. I won’t ever forget the great time I had at Igalia, all the people I met here and all the good things that being part of such an special company brought to my life, but I also think now it’s time to look forward and focus on the future.

I have the most amazing family in the world and we’ll be together on this through thick and thin, so I’m already sure we’ll be fine. It’s just a matter of time we’ll get there, so what else can I ask for?

Just wish us good luck. That should do the rest :)

WebKitGTK+ 1.10 is almost here!

Published / by mario / 4 Comments on WebKitGTK+ 1.10 is almost here!

As you might already know, the new and shiny 3.6 release of the GNOME desktop is right around the corner, and so it’s the next release of WebKitGTK+, the port of the WebKit web rendering engine to the GTK+ platform.

And it turns out that such a release is going to be a very special one for us, members of the WebKit team at Igalia,  since it comes with some very interesting features, like those I already mentioned in the talk I gave during the past GUADEC, mainly:

  • Beta version of the WebKit2GTK+ API
  • Support for Accelerated Compositing
  • WebGL enabled by default
  • Support for HTML5 Fullscreen and WebAudio
  • Multimedia layer ported to GStreamer 0.11
  • Support for the Low-Level Interpreter in JavaScriptCore

From all those, I’m specially happy because we will be finally releasing the very first beta version of the new WebKit2GTK+ API, based in the multi-process architecture of WebKit2, as well as providing support for Accelerated Compositing and WebGL.

This new WebKit2GTK+ API, as you perhaps already know, will allow applications gain the split process model of WebKit2 out-of-the box, which is awesome. Xan already mentioned  some of the advantages of it becoming beta for GNOME 3.6 in his last post this week, being my favorite ones the “increased responsiveness and stability” (quoting Xan) that will come with it, as well as the fact that it will be not only powerful enough to port old applications and write new ones, but also simpler and easier to use (we are putting a lot of effort on this).

And honestly, I think we are doing pretty well in that regard, even though there’s still a lot of work to do before we can release an stable version of this new API (due for WebKitGTK+ 2.0,  to be released with GNOME 3.8), which will also mean the very first version of Epiphany that will be using WebKit2 by default.

With regard to Accelerated Compositing and WebGL, I’d just like to mention that having them supported in WebKitGTK+ from now on is great because it means you will be able to render visually stunning web content in your browser of choice (epiphany, huh?), as well as enjoy more subtle improvements such as smoother animations or increased responsivenes while browsing. You can visit this post by my mate Martin for more details on this topic.

Anyway, all these are very nice words and all that, but sometimes it’s not that easy to properly understand just with words what exactly those things will actually mean for users, so I decided to spend some time today polishing a bit the videos I used as demos in my talk during GUADEC, and link them from here, so everyone can easily watch them now.

Hope you enjoy watching them as much as I did making them:

WebKitGTK+: WebGL and Accelerated Compositing

WebKit2GTK+: The UI and the Web process

WebKit2GTK+: The Plugin process

mariospr.org

Published / by mario / 1 Comment on mariospr.org

I’ve been thinking for some time already of moving my six years old blog to a more personal domain, and turns out I did it last week moved by the fact that I already had to mess with web development, hostings and domains for a while again, in order to assist my brother-in-law with the set up of a new local business.

So, I finally went after some (quick) thinking for this mariospr.org domain which I think it kinda makes sense considering I’m using mariospr in many places out there already.

One consequence of this change is that I hope I will write more often in my blog from now on, and not only about work-related stuff but also about some more personal things, experiences and the like. Still, I plan to keep using the “Planet [Name]” categories to control what I send to the planets I’m registered in, so if you want to keep track of those other kind of posts, make sure you visit or subscribe to the blog’s feed URL.

By the way, I would like to make the most of this post to say thank you to Lucas Rocha, who have helped me quite a lot to set up this blog without even knowing it, simply by being a good “inspiration” for some decisions I needed to make during the migration process, such as the domain name I finally chose and the font family for the text, for instance.

I even tried the sleek WordPress theme Lucas created, although in this case I ended up  making my own slight modifications to the -also beautiful- TwentyEleven theme, which I will publish as well at some point when the blog has really settled down.

Last, thanks also to my mates in Igalia who have already set up a redirect rule from the old address at blogs.igalia.com to the new domain, and of course to the people who helped update the feed link in the different planets my blog is in, since that means that everything should be already working as expected, even if you’re still using the old URLs.

GUADEC, WebKit and bikes

Published / by mario

I'm going to GUADECIt seems this year GUADEC is going to be pretty close to my place and so I will surely attend, but this time I won’t go by plane but by bike, which since some months ago has become my main vehicle for moving around the beautiful city where I live in: A Coruña.

Also, besides hanging around the venue and trying to help as much as possible as the local I am, I’ll be talking about WebKitGTK+ in the afternoon on Thursday 26th, so feel free to come round the room if you feel curious about the current status of the whole thing and the current plans for the short and medium term, which are mostly focused around WebKit2 and the roadmap we’re already following.

You probably already read some news related to this coming from my mates in the Igalia WebKit team, (like the improvements in Accelerated Compositing or the migration of our handsome browser Epiphany to using WebKit2), yet I will try to deliver an interesting talk to y’all. I just hope I’ll be able to do it (but please forgive me if I don’t).

So that’s it. As usual, just feel free to talk me if you see me around if you want. I’ll basically be around the venue most of the time during GUADEC, and will attend a11y and WebKitGTK+ BoFs on the 30th and 31st, so I’d say it will be pretty easy to find me.