A long time ago, in the year 2007, yours truly was slowly but determinately switching to Linux. Inpired by the consistent look and feel of GTK+ applications within the GNOME2 desktop environment, I wanted to start programming using this toolkit. As command line only application Hamachi was the perfect candidate to wrap a GUI around. Sure, there were already some GUI’s available but neither of the two GTK+ based ones even remotely followed the GNOME Human Interface Guidelines. So in good open source tradition decided I could do better and started my own…

Mono

At that moment in time I had mainly experience with languages like Javascript, PHP, ActionScript and a bit of Java. So I was looking for language with familiar syntax (exit Python) and not too much of a steap learning curve (exit C/C++). Other very important requirement was having an IDE providing code completion for GTK+ so that I could easily explore available properties, functions and signals. Behold MonoDevelop; an excellent IDE that also provided integrated localization and packaging support –which turns out handy when you actually want to ship your application. Also a lot of great applications like Banshee and F-spot were developed with Mono and the GTK+ binding for C# called GTK#. There was a vivid community backed by Novell surrounding the platform, so Mono and C# was the obvious and logical choice for me.

Stagnation

It was most likely the acquisition of Novell by Attachmate on November 22, 2010 that ultimately lead to the neglect of the platform, and specifically GTK#. Plans presented never came to fruition. Xamarin, the company that eventually took over control of Mono, only showed interest in mobile. While there has been still some community effort behind GTK# 3, the progress is slow and there’s no indication a stable release is happening anytime soon. Besides, it’s still targeting 3.0 API’s instead of anything current like 3.14.

Vala

In 2011 it was the first time I looked at Vala as possible alternative for the stagnating Mono platform. It’s close connection to the GObject system guaranteed up-to-date bindings while still providing a clean C# like syntax. Unfortunately, the few development tools for Vala that I found, Val(a)IDE and Vala Toys for gEdit, were totally useless. I ran away as fast as I could and didn’t look back for more than three years. Then, in December 2014 I stubled upon Valama, a Vala IDE that was actually able to compile and run code with the click of a button. Valama also provided working autocompletion and syntax checking (although it crashed a lot while doing so). Enough to set everything in motion.

Porting

As basis I used the GTK# 3.0 branch of Haguichi. I started out porting (end)classes that didn’t have any dependencies on other classes, like Text, Settings, Utils, and Debug. Initially, the main class was only filled with test calls to functions in the ported classes. From there on I worked my way up to the classes that had more dependencies on other classes. By temporarily commenting out code depending on classes that were not yet ported, at least many parts could be build and tested. Finally, everything was brought together in the core classes (Window, Controller, Main). By sticking to the plan of porting at least one class a day, after a few weeks the port was essentially working.
After that, an extensive process of testing, bug fixing, fine-tuning, replacing deprecated API’s (GTK+ developers just love deprecating things) and implementing new API’s (GApplication, GAction, GMenu, Headerbar, Popover, etc) followed.

Packaging

When using MonoDevelop I was able to generate installation packages containing makefiles from within the IDE. Although Valama does generate makefiles (CMake or Autotools) necessary to build and run your application, it doesn’t provide a way to specify targets for data files. Not eager to write CMake files manually, I thankfully discovered Autovala, a program that automatically generates them based on the project’s source and data files.

Epilogue

While there’s been lots of hate geared towards Mono from some vocal people, those same people failed to provide a useful alternative for years. Even today, there’s no Vala IDE that matches the features of MonoDevelop even closely. Ludicrously, Builder –the new IDE for GNOME– doesn’t even treat Vala like a first class citizen, and only plans to add Vala support in a distant future