1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-06 17:25:41 +02:00

Added hotlist option for buffer in plugins API, improved buffer refreshs

This commit is contained in:
Sebastien Helleu
2008-01-06 12:44:54 +01:00
parent 2b7c8eb73b
commit f94b679a4a
36 changed files with 459 additions and 382 deletions
+1 -1
View File
@@ -707,7 +707,7 @@ alias_completion_cb (void *data, char *completion, struct t_gui_buffer *buffer,
for (ptr_alias = alias_list; ptr_alias;
ptr_alias = ptr_alias->next_alias)
{
weechat_list_add (list, ptr_alias->name, "sort");
weechat_list_add (list, ptr_alias->name, WEECHAT_LIST_POS_SORT);
}
return WEECHAT_RC_OK;
+1 -1
View File
@@ -469,7 +469,7 @@ irc_channel_add_nick_speaking (struct t_irc_channel *channel, char *nick)
if (!channel->nicks_speaking)
channel->nicks_speaking = weechat_list_new ();
weechat_list_add (channel->nicks_speaking, nick, "end");
weechat_list_add (channel->nicks_speaking, nick, WEECHAT_LIST_POS_END);
size = weechat_list_size (channel->nicks_speaking);
if (size > IRC_CHANNEL_NICKS_SPEAKING_LIMIT)
+7 -7
View File
@@ -156,7 +156,7 @@ irc_command_ame (void *data, struct t_gui_buffer *buffer, int argc,
if (argc > 1)
{
//gui_add_hotlist = 0;
weechat_buffer_set (NULL, "hotlist", "-");
for (ptr_server = irc_servers; ptr_server;
ptr_server = ptr_server->next_server)
{
@@ -171,7 +171,7 @@ irc_command_ame (void *data, struct t_gui_buffer *buffer, int argc,
}
}
}
//gui_add_hotlist = 1;
weechat_buffer_set (NULL, "hotlist", "+");
}
return WEECHAT_RC_OK;
}
@@ -196,7 +196,7 @@ irc_command_amsg (void *data, struct t_gui_buffer *buffer, int argc,
if (argc > 1)
{
//gui_add_hotlist = 0;
weechat_buffer_set (NULL, "hotlist", "-");
for (ptr_server = irc_servers; ptr_server;
ptr_server = ptr_server->next_server)
{
@@ -236,7 +236,7 @@ irc_command_amsg (void *data, struct t_gui_buffer *buffer, int argc,
}
}
}
//gui_add_hotlist = 1;
weechat_buffer_set (NULL, "hotlist", "+");
}
else
return WEECHAT_RC_ERROR;
@@ -387,7 +387,7 @@ irc_command_away (void *data, struct t_gui_buffer *buffer, int argc,
(void) data;
(void) argv;
//gui_add_hotlist = 0;
weechat_buffer_set (NULL, "hotlist", "-");
if ((argc > 2) && (weechat_strcasecmp (argv[1], "-all") == 0))
{
for (ptr_server = irc_servers; ptr_server;
@@ -400,8 +400,8 @@ irc_command_away (void *data, struct t_gui_buffer *buffer, int argc,
else
irc_command_away_server (ptr_server, argv_eol[1]);
//gui_status_draw (window->buffer, 1);
//gui_add_hotlist = 1;
weechat_buffer_set (NULL, "hotlist", "+");
return WEECHAT_RC_OK;
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+10 -3
View File
@@ -52,9 +52,16 @@ struct t_weelist;
#define WEECHAT_RC_WITH_HIGHLIGHT 4 /* ok and ask for highlight */
/* (for message handler only) */
#define WEELIST_POS_SORT "sort"
#define WEELIST_POS_BEGINNING "beginning"
#define WEELIST_POS_END "end"
/* list management (order of elements) */
#define WEECHAT_LIST_POS_SORT "sort"
#define WEECHAT_LIST_POS_BEGINNING "beginning"
#define WEECHAT_LIST_POS_END "end"
/* buffer hotlist */
#define WEECHAT_HOTLIST_LOW "0"
#define WEECHAT_HOTLIST_MESSAGE "1"
#define WEECHAT_HOTLIST_PRIVATE "2"
#define WEECHAT_HOTLIST_HIGHLIGHT "3"
struct t_weechat_plugin
{