Show correct number of channels/dialogs when closing server tab

This commit is contained in:
TingPing 2014-12-31 10:50:13 -05:00
parent 63bb87fc93
commit c5016e390f
1 changed files with 4 additions and 1 deletions

View File

@ -1096,8 +1096,11 @@ mg_tab_close (session *sess)
else else
{ {
for (i = 0, list = sess_list; list; list = list->next) 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++; i++;
}
dialog = gtk_message_dialog_new (GTK_WINDOW (parent_window), 0, dialog = gtk_message_dialog_new (GTK_WINDOW (parent_window), 0,
GTK_MESSAGE_WARNING, GTK_BUTTONS_OK_CANCEL, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK_CANCEL,
_("This server still has %d channels or dialogs associated with it. " _("This server still has %d channels or dialogs associated with it. "