[empathy] Special-case closing a window with exactly one tab
- From: Will Thompson <wjt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Special-case closing a window with exactly one tab
- Date: Mon, 30 Jan 2012 13:52:12 +0000 (UTC)
commit 4cdb4a49b73c5f4698e91029d555a21f4b4e55b3
Author: Will Thompson <will thompson collabora co uk>
Date: Fri Aug 14 01:27:19 2009 +0100
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
src/empathy-chat-window.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index e22cc86..1832dcf 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?"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]