summary refs log tree commit diff stats
path: root/src/fe-gtk
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2014-12-31 10:50:13 -0500
committerTingPing <tingping@tingping.se>2014-12-31 10:50:13 -0500
commitc5016e390ff6bb4e3aa65db0b446d9cbac42994b (patch)
tree3d85e280623eb4e74505d5c1bb8835c950360270 /src/fe-gtk
parent63bb87fc93a441a12bc1c15042a7ac081c1e49f8 (diff)
Show correct number of channels/dialogs when closing server tab
Diffstat (limited to 'src/fe-gtk')
-rw-r--r--src/fe-gtk/maingui.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c
index 2eabe8b7..a5472b70 100644
--- a/src/fe-gtk/maingui.c
+++ b/src/fe-gtk/maingui.c
@@ -1096,8 +1096,11 @@ mg_tab_close (session *sess)
 	else
 	{
 		for (i = 0, list = sess_list; list; list = list->next)
-			if (((session *)list->data)->server == sess->server)
+		{
+			session *s = (session*)list->data;
+			if (s->server == sess->server && (s->type == SESS_CHANNEL || s->type == SESS_DIALOG))
 				i++;
+		}
 		dialog = gtk_message_dialog_new (GTK_WINDOW (parent_window), 0,
 						GTK_MESSAGE_WARNING, GTK_BUTTONS_OK_CANCEL,
 						_("This server still has %d channels or dialogs associated with it. "