mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
fixes .. still not perfect
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@713 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
f0b2564809
commit
b7ce4dc814
@ -93,9 +93,9 @@ void fe_common_core_init(void)
|
|||||||
theme_register(fecommon_core_formats);
|
theme_register(fecommon_core_formats);
|
||||||
|
|
||||||
autorun_init();
|
autorun_init();
|
||||||
hilight_text_init();
|
|
||||||
command_history_init();
|
command_history_init();
|
||||||
completion_init();
|
completion_init();
|
||||||
|
hilight_text_init();
|
||||||
keyboard_init();
|
keyboard_init();
|
||||||
printtext_init();
|
printtext_init();
|
||||||
fe_channels_init();
|
fe_channels_init();
|
||||||
|
@ -63,9 +63,8 @@ static void sig_message_public(SERVER_REC *server, const char *msg,
|
|||||||
window_item_window((WI_ITEM_REC *) chanrec)->items->next != NULL)
|
window_item_window((WI_ITEM_REC *) chanrec)->items->next != NULL)
|
||||||
print_channel = TRUE;
|
print_channel = TRUE;
|
||||||
|
|
||||||
level = MSGLEVEL_PUBLIC |
|
level = MSGLEVEL_PUBLIC | (for_me || color != NULL ?
|
||||||
(color != NULL ? MSGLEVEL_HILIGHT :
|
MSGLEVEL_HILIGHT : MSGLEVEL_NOHILIGHT);
|
||||||
(for_me ? MSGLEVEL_HILIGHT : MSGLEVEL_NOHILIGHT));
|
|
||||||
|
|
||||||
nickmode = get_nickmode(chanrec, nick);
|
nickmode = get_nickmode(chanrec, nick);
|
||||||
if (!print_channel) {
|
if (!print_channel) {
|
||||||
@ -103,7 +102,7 @@ static void sig_message_private(SERVER_REC *server, const char *msg,
|
|||||||
{
|
{
|
||||||
QUERY_REC *query;
|
QUERY_REC *query;
|
||||||
|
|
||||||
query = privmsg_get_query(server, nick, FALSE, MSGLEVEL_MSGS);
|
query = query_find(server, nick);
|
||||||
printformat(server, nick, MSGLEVEL_MSGS,
|
printformat(server, nick, MSGLEVEL_MSGS,
|
||||||
query == NULL ? IRCTXT_MSG_PRIVATE :
|
query == NULL ? IRCTXT_MSG_PRIVATE :
|
||||||
IRCTXT_MSG_PRIVATE_QUERY, nick, address, msg);
|
IRCTXT_MSG_PRIVATE_QUERY, nick, address, msg);
|
||||||
@ -209,8 +208,8 @@ void fe_messages_init(void)
|
|||||||
settings_add_bool("lookandfeel", "show_nickmode", TRUE);
|
settings_add_bool("lookandfeel", "show_nickmode", TRUE);
|
||||||
settings_add_bool("lookandfeel", "print_active_channel", FALSE);
|
settings_add_bool("lookandfeel", "print_active_channel", FALSE);
|
||||||
|
|
||||||
signal_add("message public", (SIGNAL_FUNC) sig_message_public);
|
signal_add_last("message public", (SIGNAL_FUNC) sig_message_public);
|
||||||
signal_add("message private", (SIGNAL_FUNC) sig_message_private);
|
signal_add_last("message private", (SIGNAL_FUNC) sig_message_private);
|
||||||
command_bind_last("msg", NULL, (SIGNAL_FUNC) cmd_msg);
|
command_bind_last("msg", NULL, (SIGNAL_FUNC) cmd_msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,6 +262,13 @@ static int sig_query_autoclose(void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void sig_message_private(SERVER_REC *server, const char *msg,
|
||||||
|
const char *nick, const char *address)
|
||||||
|
{
|
||||||
|
/* create query window if needed */
|
||||||
|
privmsg_get_query(server, nick, FALSE, MSGLEVEL_MSGS);
|
||||||
|
}
|
||||||
|
|
||||||
static void read_settings(void)
|
static void read_settings(void)
|
||||||
{
|
{
|
||||||
querycreate_level = level2bits(settings_get_str("autocreate_query_level"));
|
querycreate_level = level2bits(settings_get_str("autocreate_query_level"));
|
||||||
@ -288,6 +295,7 @@ void fe_queries_init(void)
|
|||||||
signal_add("window item remove", (SIGNAL_FUNC) signal_window_item_removed);
|
signal_add("window item remove", (SIGNAL_FUNC) signal_window_item_removed);
|
||||||
signal_add("server connected", (SIGNAL_FUNC) sig_server_connected);
|
signal_add("server connected", (SIGNAL_FUNC) sig_server_connected);
|
||||||
signal_add("window changed", (SIGNAL_FUNC) sig_window_changed);
|
signal_add("window changed", (SIGNAL_FUNC) sig_window_changed);
|
||||||
|
signal_add_first("message private", (SIGNAL_FUNC) sig_message_private);
|
||||||
signal_add("setup changed", (SIGNAL_FUNC) read_settings);
|
signal_add("setup changed", (SIGNAL_FUNC) read_settings);
|
||||||
|
|
||||||
command_bind("query", NULL, (SIGNAL_FUNC) cmd_query);
|
command_bind("query", NULL, (SIGNAL_FUNC) cmd_query);
|
||||||
@ -306,6 +314,7 @@ void fe_queries_deinit(void)
|
|||||||
signal_remove("window item remove", (SIGNAL_FUNC) signal_window_item_removed);
|
signal_remove("window item remove", (SIGNAL_FUNC) signal_window_item_removed);
|
||||||
signal_remove("server connected", (SIGNAL_FUNC) sig_server_connected);
|
signal_remove("server connected", (SIGNAL_FUNC) sig_server_connected);
|
||||||
signal_remove("window changed", (SIGNAL_FUNC) sig_window_changed);
|
signal_remove("window changed", (SIGNAL_FUNC) sig_window_changed);
|
||||||
|
signal_remove("message private", (SIGNAL_FUNC) sig_message_private);
|
||||||
signal_remove("setup changed", (SIGNAL_FUNC) read_settings);
|
signal_remove("setup changed", (SIGNAL_FUNC) read_settings);
|
||||||
|
|
||||||
command_unbind("query", (SIGNAL_FUNC) cmd_query);
|
command_unbind("query", (SIGNAL_FUNC) cmd_query);
|
||||||
|
@ -32,7 +32,9 @@
|
|||||||
|
|
||||||
static const char *noact_channels;
|
static const char *noact_channels;
|
||||||
|
|
||||||
static void sig_hilight_text(WINDOW_REC *window, SERVER_REC *server, const char *channel, gpointer levelptr, const char *msg)
|
static void sig_hilight_text(WINDOW_REC *window, SERVER_REC *server,
|
||||||
|
const char *channel, void *levelptr,
|
||||||
|
const char *msg)
|
||||||
{
|
{
|
||||||
int level, oldlevel, new_data;
|
int level, oldlevel, new_data;
|
||||||
|
|
||||||
@ -40,10 +42,13 @@ static void sig_hilight_text(WINDOW_REC *window, SERVER_REC *server, const char
|
|||||||
if (window == active_win || (level & (MSGLEVEL_NEVER|MSGLEVEL_NO_ACT)))
|
if (window == active_win || (level & (MSGLEVEL_NEVER|MSGLEVEL_NO_ACT)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* hilights and private messages get HILIGHT status,
|
||||||
|
public messages get MSGS status and rest get TEXT */
|
||||||
new_data = (level & (MSGLEVEL_HILIGHT|MSGLEVEL_MSGS)) ?
|
new_data = (level & (MSGLEVEL_HILIGHT|MSGLEVEL_MSGS)) ?
|
||||||
NEWDATA_HILIGHT :
|
NEWDATA_HILIGHT :
|
||||||
((level & MSGLEVEL_PUBLIC) ? NEWDATA_MSG : NEWDATA_TEXT);
|
((level & MSGLEVEL_PUBLIC) ? NEWDATA_MSG : NEWDATA_TEXT);
|
||||||
|
|
||||||
|
/* check that channel isn't in "don't show activity" list */
|
||||||
if (new_data < NEWDATA_HILIGHT &&
|
if (new_data < NEWDATA_HILIGHT &&
|
||||||
channel != NULL && find_substr(noact_channels, channel))
|
channel != NULL && find_substr(noact_channels, channel))
|
||||||
return;
|
return;
|
||||||
@ -51,7 +56,7 @@ static void sig_hilight_text(WINDOW_REC *window, SERVER_REC *server, const char
|
|||||||
oldlevel = window->new_data;
|
oldlevel = window->new_data;
|
||||||
if (window->new_data < new_data) {
|
if (window->new_data < new_data) {
|
||||||
window->new_data = new_data;
|
window->new_data = new_data;
|
||||||
window->last_color = 0;
|
window->last_color = hilight_last_nick_color();;
|
||||||
signal_emit("window hilight", 1, window);
|
signal_emit("window hilight", 1, window);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,8 +193,8 @@ void window_activity_init(void)
|
|||||||
signal_add("window changed", (SIGNAL_FUNC) sig_dehilight_window);
|
signal_add("window changed", (SIGNAL_FUNC) sig_dehilight_window);
|
||||||
signal_add("window dehilight", (SIGNAL_FUNC) sig_dehilight_window);
|
signal_add("window dehilight", (SIGNAL_FUNC) sig_dehilight_window);
|
||||||
signal_add("window item hilight", (SIGNAL_FUNC) sig_hilight_window_item);
|
signal_add("window item hilight", (SIGNAL_FUNC) sig_hilight_window_item);
|
||||||
signal_add_last("message public", (SIGNAL_FUNC) sig_message_public);
|
signal_add("message public", (SIGNAL_FUNC) sig_message_public);
|
||||||
signal_add_last("message private", (SIGNAL_FUNC) sig_message_private);
|
signal_add("message private", (SIGNAL_FUNC) sig_message_private);
|
||||||
signal_add("setup changed", (SIGNAL_FUNC) read_settings);
|
signal_add("setup changed", (SIGNAL_FUNC) read_settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user