diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2013-03-03 11:30:58 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2013-03-03 11:30:58 +0100 |
commit | 8b925baa3cff083653b38603cf19090748d9a82e (patch) | |
tree | c86b07c20f54a0808fdd580879207b2c5020a776 /src/gui/gui-nicklist.c | |
parent | 844ba9e1c07d0f17c0081d666591c5f2758078bf (diff) | |
download | weechat-8b925baa3cff083653b38603cf19090748d9a82e.zip |
core: add count for groups, nicks, and total in nicklist
Diffstat (limited to 'src/gui/gui-nicklist.c')
-rw-r--r-- | src/gui/gui-nicklist.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/gui-nicklist.c b/src/gui/gui-nicklist.c index be6fdb484..d03fe3175 100644 --- a/src/gui/gui-nicklist.c +++ b/src/gui/gui-nicklist.c @@ -247,6 +247,8 @@ gui_nicklist_add_group (struct t_gui_buffer *buffer, gui_nicklist_insert_group_sorted (&(new_group->parent->children), &(new_group->parent->last_child), new_group); + buffer->nicklist_count++; + buffer->nicklist_groups_count++; } else { @@ -409,6 +411,9 @@ gui_nicklist_add_nick (struct t_gui_buffer *buffer, gui_nicklist_insert_nick_sorted (new_nick->group, new_nick); + buffer->nicklist_count++; + buffer->nicklist_nicks_count++; + if (visible) buffer->nicklist_visible_count++; @@ -455,6 +460,9 @@ gui_nicklist_remove_nick (struct t_gui_buffer *buffer, if (nick->prefix_color) free (nick->prefix_color); + buffer->nicklist_count--; + buffer->nicklist_nicks_count--; + if (nick->visible) { if (buffer->nicklist_visible_count > 0) @@ -510,6 +518,9 @@ gui_nicklist_remove_group (struct t_gui_buffer *buffer, (group->parent)->children = group->next_group; if ((group->parent)->last_child == group) (group->parent)->last_child = group->prev_group; + + buffer->nicklist_count--; + buffer->nicklist_groups_count--; } else { |