Skip to content

Instantly share code, notes, and snippets.

View donadigo's full-sized avatar

Adam donadigo

View GitHub Profile
@donadigo
donadigo / cheatsheet.md
Last active June 5, 2018 09:21 — forked from matzipan/cheatsheet.md
Vala, GLib and GTK+ cheatsheet

Enable debug messages

Set the following environment variable G_MESSAGES_DEBUG=all. This will allow you to see messages you print with debug in Vala.

Markup escaping

If you try and set_text on a Gtk.Label a string which might contain markup characters (<>&), you need to escape them first, using GLib.Markup.escape_text.