First of all: Happy new year :-)
Here is a patch for "delete_event" management on preferences dialog.
When you close preferences dialog with the top right window close button you can not reopen it anymore:
(jamin:21602): Gtk-CRITICAL **: gtk_widget_show: assertion `GTK_IS_WIDGET (widget)' failed
Add a "delete_event" callback.
-> You will need to regenerate "interface.*" files with glade 2 after applying this patch.