diff options
author | Leandro Pereira <leandro@hardinfo.org> | 2019-06-29 19:37:51 -0700 |
---|---|---|
committer | Leandro Pereira <leandro@hardinfo.org> | 2019-06-29 19:51:14 -0700 |
commit | b2b1302ba44cba5b6582d329392318d2ffe6f40e (patch) | |
tree | 6dfa16d83b508fdd06b88202de6875c4989b6b38 /includes/info.h | |
parent | 5d83c3e53841cff86dc8cc028aeb1ed32fadab75 (diff) |
Support icons in InfoFields
Diffstat (limited to 'includes/info.h')
-rw-r--r-- | includes/info.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/includes/info.h b/includes/info.h index 91eb0eaf..f244ceb4 100644 --- a/includes/info.h +++ b/includes/info.h @@ -47,6 +47,7 @@ struct InfoGroup { struct InfoField { const gchar *name; const gchar *value; + const gchar *icon; int update_interval; @@ -67,6 +68,12 @@ struct InfoField info_field_printf(const gchar *name, const gchar *format, ...) struct InfoField info_field_update(const gchar *name, int update_interval); struct InfoField info_field_last(void); +static inline struct InfoField info_field_with_icon(struct InfoField field, const gchar *icon) +{ + field.icon = icon; + return field; +} + void info_set_column_title(struct Info *info, const gchar *column, const gchar *title); void info_set_column_headers_visible(struct Info *info, gboolean setting); void info_set_zebra_visible(struct Info *info, gboolean setting); |