enum class
Fix compile warning, remove GTK functions not present in version 3.16, and make code more concise.