The confirmation message when closing a window containing one tab, which
is a chat room, should be identical to the confirmation message when
closing that tab with ^W.
https://bugzilla.gnome.org/show_bug.cgi?id=591756
priv = GET_PRIV (window);
+ /* If there are no chats in this window, how could we possibly have got
+ * here?
+ */
+ g_return_if_fail (priv->chats != NULL);
+
+ /* Treat closing a window which only has one tab exactly like closing
+ * that tab.
+ */
+ if (close_window && priv->chats->next == NULL) {
+ close_window = FALSE;
+ chat = priv->chats->data;
+ }
+
if (close_window) {
primary = g_strdup (_("Close this window?"));