diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/computer.h | 9 | ||||
-rw-r--r-- | includes/info.h | 7 |
2 files changed, 15 insertions, 1 deletions
diff --git a/includes/computer.h b/includes/computer.h index 05db78c3..57da9db3 100644 --- a/includes/computer.h +++ b/includes/computer.h @@ -27,6 +27,7 @@ typedef struct _MemoryInfo MemoryInfo; typedef struct _UptimeInfo UptimeInfo; typedef struct _LoadInfo LoadInfo; typedef struct _DisplayInfo DisplayInfo; +typedef struct _Distro Distro; typedef struct _AlsaInfo AlsaInfo; typedef struct _AlsaCard AlsaCard; @@ -92,7 +93,8 @@ struct _Computer { struct _OperatingSystem { gchar *kernel; gchar *libc; - gchar *distrocode, *distro; + gchar *distrocode; + gchar *distro; gchar *hostname; gchar *language; gchar *homedir; @@ -113,6 +115,11 @@ struct _MemoryInfo { gfloat ratio; }; +struct _Distro { + gchar *distro; + gchar *codename; +}; + #define get_str(field_name,ptr) \ if (g_str_has_prefix(tmp[0], field_name)) { \ ptr = g_strdup(tmp[1]); \ 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); |