Bug #15873 introduced a general "close multi tab" dialog. Since libxfce4ui 4.15.0 just got released, we can make use of it in thunar now.
I've almost finished implementing the support for the new function when I suddenly realized that the function doesn't entirely fulfill the needs of the terminal: the terminal not only checks the number of open tabs but also verifies whether any of the tabs is running an active process. When there's a process running, a similar dialog but with different text is shown. It wouldn't make sense to have different implementations for two similar dialogs, imho.
Meh, that's a pity. How about some optional parameter "gchar* additional_text" for xfce_dialog_confirm_close_tabs in order to cover that usecase ?