From 3f9148d0e3d0dbbfaa9de9d9b9cb727beeda7ce0 Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Mon, 1 Dec 2008 18:18:59 +0000 Subject: [PATCH] Add function to set minimum/maximum size for a statusbar item. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4936 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/statusbar-item.h | 1 + src/fe-text/statusbar.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/fe-text/statusbar-item.h b/src/fe-text/statusbar-item.h index 788fed75..ce9011e4 100644 --- a/src/fe-text/statusbar-item.h +++ b/src/fe-text/statusbar-item.h @@ -8,6 +8,7 @@ typedef void (*STATUSBAR_FUNC) (struct SBAR_ITEM_REC *item, int get_size_only); void statusbar_item_register(const char *name, const char *value, STATUSBAR_FUNC func); void statusbar_item_unregister(const char *name); +void statusbar_item_set_size(struct SBAR_ITEM_REC *item, int min_size, int max_size); void statusbar_item_default_handler(struct SBAR_ITEM_REC *item, int get_size_only, const char *str, const char *data, int escape_vars); diff --git a/src/fe-text/statusbar.c b/src/fe-text/statusbar.c index eb138404..45bdec05 100644 --- a/src/fe-text/statusbar.c +++ b/src/fe-text/statusbar.c @@ -92,6 +92,12 @@ void statusbar_item_unregister(const char *name) } } +void statusbar_item_set_size(struct SBAR_ITEM_REC *item, int min_size, int max_size) +{ + item->min_size = min_size; + item->max_size = max_size; +} + STATUSBAR_GROUP_REC *statusbar_group_create(const char *name) { STATUSBAR_GROUP_REC *rec;