summaryrefslogtreecommitdiff
path: root/src/plugins/plugins-interface.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2006-02-20 17:01:18 +0000
committerSebastien Helleu <flashcode@flashtux.org>2006-02-20 17:01:18 +0000
commit9373a7a47e4711e8db0549cec49da19db45330ae (patch)
tree5940281d9c986998fe96daebbca9fd04fcf1f589 /src/plugins/plugins-interface.c
parente0c97562a596bcfde406fb26dbc8f9d5f0cde111 (diff)
downloadweechat-9373a7a47e4711e8db0549cec49da19db45330ae.zip
Added new plugin API function: remove_infobar
Diffstat (limited to 'src/plugins/plugins-interface.c')
-rw-r--r--src/plugins/plugins-interface.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/plugins/plugins-interface.c b/src/plugins/plugins-interface.c
index e7f88712f..ab2d677bc 100644
--- a/src/plugins/plugins-interface.c
+++ b/src/plugins/plugins-interface.c
@@ -215,6 +215,29 @@ weechat_plugin_print_infobar (t_weechat_plugin *plugin, int time_displayed, char
}
/*
+ * weechat_plugin_infobar_remove: remove message(s) in infobar
+ */
+
+void
+weechat_plugin_infobar_remove (t_weechat_plugin *plugin, int how_many)
+{
+ if (!plugin)
+ return;
+
+ if (how_many <= 0)
+ gui_infobar_remove_all ();
+ else
+ {
+ while ((gui_infobar) && (how_many > 0))
+ {
+ gui_infobar_remove ();
+ how_many--;
+ }
+ }
+ gui_draw_buffer_infobar (gui_current_window->buffer, 1);
+}
+
+/*
* weechat_plugin_log: add a message on logs
*/