summaryrefslogtreecommitdiff
path: root/src/gui/gui-buffer.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-02-21 09:58:56 +0100
committerSebastien Helleu <flashcode@flashtux.org>2009-02-21 09:58:56 +0100
commitafdee2d9194bced6af912daefb91895890a1fefd (patch)
treee5f84e85bce224247e13b69f9421a48d2e23959b /src/gui/gui-buffer.c
parent3a57bb0659a609ed446977ce0d6c60c7b1c20fee (diff)
downloadweechat-afdee2d9194bced6af912daefb91895890a1fefd.zip
Add signals when local variables or buffer type are changed
Diffstat (limited to 'src/gui/gui-buffer.c')
-rw-r--r--src/gui/gui-buffer.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index 3e0d95485..c5d88b98f 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -134,6 +134,9 @@ gui_buffer_local_var_add (struct t_gui_buffer *buffer, const char *name,
free (new_local_var->value);
new_local_var->name = strdup (name);
new_local_var->value = strdup (value);
+
+ hook_signal_send ("buffer_localvar_changed",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
else
{
@@ -150,6 +153,9 @@ gui_buffer_local_var_add (struct t_gui_buffer *buffer, const char *name,
else
buffer->local_variables = new_local_var;
buffer->last_local_var = new_local_var;
+
+ hook_signal_send ("buffer_localvar_added",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
}
@@ -184,6 +190,9 @@ gui_buffer_local_var_remove (struct t_gui_buffer *buffer,
buffer->last_local_var = local_var->prev_var;
free (local_var);
+
+ hook_signal_send ("buffer_localvar_removed",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
/*
@@ -652,6 +661,9 @@ gui_buffer_set_type (struct t_gui_buffer *buffer, enum t_gui_buffer_type type)
buffer->type = type;
gui_buffer_ask_chat_refresh (buffer, 2);
+
+ hook_signal_send ("buffer_type_changed",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
/*
@@ -664,6 +676,7 @@ gui_buffer_set_title (struct t_gui_buffer *buffer, const char *new_title)
if (buffer->title)
free (buffer->title);
buffer->title = (new_title && new_title[0]) ? strdup (new_title) : NULL;
+
hook_signal_send ("buffer_title_changed", WEECHAT_HOOK_SIGNAL_STRING, NULL);
}