summaryrefslogtreecommitdiff
path: root/src/gui/gui-bar-item.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2008-10-08 19:04:05 +0200
committerSebastien Helleu <flashcode@flashtux.org>2008-10-08 19:04:05 +0200
commit5d07aa14ed58bb7ba3a4566955d471861488f056 (patch)
tree59528af01029f965139a81bbf07bcd33007abbb6 /src/gui/gui-bar-item.c
parent0e053e072b9eb8755e0bd9418d18a58e4ae8f96d (diff)
downloadweechat-5d07aa14ed58bb7ba3a4566955d471861488f056.zip
Add function to get plugin name (return "core" for WeeChat core)
Diffstat (limited to 'src/gui/gui-bar-item.c')
-rw-r--r--src/gui/gui-bar-item.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/gui-bar-item.c b/src/gui/gui-bar-item.c
index f0eebe196..f2c2dcea3 100644
--- a/src/gui/gui-bar-item.c
+++ b/src/gui/gui-bar-item.c
@@ -742,6 +742,8 @@ gui_bar_item_default_buffer_plugin (void *data, struct t_gui_bar_item *item,
struct t_gui_window *window,
int max_width, int max_height)
{
+ char *plugin_name;
+
/* make C compiler happy */
(void) data;
(void) item;
@@ -750,9 +752,9 @@ gui_bar_item_default_buffer_plugin (void *data, struct t_gui_bar_item *item,
if (!window)
window = gui_current_window;
-
- return (window->buffer->plugin) ?
- strdup (window->buffer->plugin->name) : strdup ("core");
+
+ plugin_name = plugin_get_name (window->buffer->plugin);
+ return (plugin_name) ? strdup (plugin_name) : strdup ("");
}
/*