I'm not using GTK, so I can't say much about the real use here. But the code looks fine, which IMO warrants a +1.
Two minor points:
* The source code lacks the copyright header.
* I think that
$flags = ($parent === null ? 0 : Gtk::DIALOG_MODAL);
is much more readable than without the brackets.