Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

irc: add pointer "irc_server" and "irc_channel" in hashtable sent to buflist bar item hook focus callback (closes #1543) #1575

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sim642
Copy link
Member

@sim642 sim642 commented Oct 18, 2020

Closes #1543.

TODO when merging

  • Create new table for buflist bar item extra focus variables under hook_focus in plugin API docs.
  • Add irc_server and irc_channel to that table with corresponding WeeChat version constraint.

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@07565a4). Click here to learn what that means.
The diff coverage is 20.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1575   +/-   ##
=========================================
  Coverage          ?   35.26%           
=========================================
  Files             ?      204           
  Lines             ?    84765           
  Branches          ?        0           
=========================================
  Hits              ?    29893           
  Misses            ?    54872           
  Partials          ?        0           
Impacted Files Coverage Δ
src/plugins/irc/irc-bar-item.c 46.02% <13.04%> (ø)
src/plugins/buflist/buflist-mouse.c 5.51% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 07565a4...acc2666. Read the comment docs.

Comment on lines +834 to +839
weechat_hook_focus ("buflist",
&irc_bar_item_focus_buflist, NULL, NULL);
weechat_hook_focus ("buflist2",
&irc_bar_item_focus_buflist, NULL, NULL);
weechat_hook_focus ("buflist3",
&irc_bar_item_focus_buflist, NULL, NULL);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is slightly copy-paste-ish but that's the only way in irc plugin to take care of all the buflists without having a weird dependency on the buflist plugin's constant. This could be improved by allowing wildcards in hook_focus area names.

@sim642 sim642 added the hacktoberfest-accepted PR accepted for Hacktoberfest label Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request hacktoberfest-accepted PR accepted for Hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

irc_channel irc_server and irc_nick in focus hashtable for the buflist
2 participants