aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2009-08-14 08:27:19 +0800
committerWill Thompson <will.thompson@collabora.co.uk>2012-01-30 21:28:01 +0800
commit4cdb4a49b73c5f4698e91029d555a21f4b4e55b3 (patch)
tree9c39b41227e283238abcce3535cfc575022b3e7d /src
parent745f697021987e296d0f3f52bcb6cfe356502160 (diff)
downloadgsoc2013-empathy-4cdb4a49b73c5f4698e91029d555a21f4b4e55b3.tar
gsoc2013-empathy-4cdb4a49b73c5f4698e91029d555a21f4b4e55b3.tar.gz
gsoc2013-empathy-4cdb4a49b73c5f4698e91029d555a21f4b4e55b3.tar.bz2
gsoc2013-empathy-4cdb4a49b73c5f4698e91029d555a21f4b4e55b3.tar.lz
gsoc2013-empathy-4cdb4a49b73c5f4698e91029d555a21f4b4e55b3.tar.xz
gsoc2013-empathy-4cdb4a49b73c5f4698e91029d555a21f4b4e55b3.tar.zst
gsoc2013-empathy-4cdb4a49b73c5f4698e91029d555a21f4b4e55b3.zip
Special-case closing a window with exactly one tab
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
Diffstat (limited to 'src')
-rw-r--r--src/empathy-chat-window.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index e22cc8674..1832dcf96 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -268,6 +268,19 @@ confirm_close (EmpathyChatWindow *window,
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?"));