The author is not wrong, the code really is crazy. Here's another random snippet from the ugly rewrite:
for(char relative[] = "-2"; (relative[0] ^= '+' ^ '-') == '-' || ++relative[1] <= '9'; )
gtk_list_store_insert_with_values(instances, NULL, -1, 0, relative, -1);
This is just pure excess cleverness. It's not even obvious how many times this loop runs for. There's a comment 1000 lines away that says this:
#define NUM_INSTANCES 5 // or 3, but change char relative[] = "-2" to "-1"
This is just insanely unmaintainable code. If a string is warranted I would have just done the "stupid" thing with a `sprintf(buf, "%+d", relative);` to make it obviously correct, even if it seems "slower".