Stop using deprecated Gtk.Widget.get_state ()