Gtk UI: small code refactoring
Gtk UI: prevent possible segfaults
(yes, this is a bit paranoid)
Gtk UI: fix SIGABRT when gdk_display_get_default() returns NULL
https://bugs.launchpad.net/ubuntu/+source/eiskaltdcpp/+bug/968761