diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-09-18 18:44:03 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-09-18 18:44:03 +0200 |
commit | c572e393e7399d125b543f4102d1baeb3b3b8391 (patch) | |
tree | 885fe3b4307148b377c3f5233c98e322a603c734 /src/gui/gui-bar-item.c | |
parent | c3df7da6411a44da6b9fc0f52700372a1d074758 (diff) | |
download | weechat-c572e393e7399d125b543f4102d1baeb3b3b8391.zip |
Remove "category" for buffers (keep only name).
Diffstat (limited to 'src/gui/gui-bar-item.c')
-rw-r--r-- | src/gui/gui-bar-item.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gui/gui-bar-item.c b/src/gui/gui-bar-item.c index 075f70734..afa74a9c2 100644 --- a/src/gui/gui-bar-item.c +++ b/src/gui/gui-bar-item.c @@ -753,13 +753,10 @@ gui_bar_item_default_buffer_name (void *data, struct t_gui_bar_item *item, if (!window) window = gui_current_window; - snprintf (buf, sizeof (buf), "%s%d%s:%s%s%s/%s%s", + snprintf (buf, sizeof (buf), "%s%d%s:%s%s", gui_color_get_custom (gui_color_get_name (CONFIG_COLOR(config_color_status_number))), window->buffer->number, GUI_COLOR_CUSTOM_BAR_DELIM, - gui_color_get_custom (gui_color_get_name (CONFIG_COLOR(config_color_status_category))), - window->buffer->category, - GUI_COLOR_CUSTOM_BAR_DELIM, gui_color_get_custom (gui_color_get_name (CONFIG_COLOR(config_color_status_name))), window->buffer->name); @@ -867,7 +864,7 @@ gui_bar_item_default_hotlist (void *data, struct t_gui_bar_item *item, struct t_gui_window *window, int max_width, int max_height) { - char buf[1024], format[32]; + char buf[1024], format[32], *pos_point; struct t_gui_hotlist *ptr_hotlist; int names_count, display_name; @@ -929,7 +926,11 @@ gui_bar_item_default_hotlist (void *data, struct t_gui_bar_item *item, snprintf (format, sizeof (format) - 1, "%%.%ds", CONFIG_INTEGER(config_look_hotlist_names_length)); - sprintf (buf + strlen (buf), format, ptr_hotlist->buffer->name); + pos_point = NULL; + if (CONFIG_BOOLEAN(config_look_hotlist_short_names)) + pos_point = strchr (ptr_hotlist->buffer->name, '.'); + sprintf (buf + strlen (buf), format, + (pos_point) ? pos_point + 1 : ptr_hotlist->buffer->name); } if (ptr_hotlist->next_hotlist) |