aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorhwspeedy <ns@bigbear.dk>2024-05-01 00:13:10 +0200
committerhwspeedy <ns@bigbear.dk>2024-05-01 00:13:10 +0200
commitbabf0dfcd68022aa5088763258e3f50bbe7e7e29 (patch)
tree0eff3a6794036f62909a05196f366003bbf361e4 /modules
parentb68e803cecdfee529544a94575073b095c4b41ba (diff)
FIX Added strwrap function and fixed width for OS, Security & Env vars
Diffstat (limited to 'modules')
-rw-r--r--modules/computer.c10
-rw-r--r--modules/computer/environment.c6
2 files changed, 12 insertions, 4 deletions
diff --git a/modules/computer.c b/modules/computer.c
index 28f630d8..bb05544f 100644
--- a/modules/computer.c
+++ b/modules/computer.c
@@ -170,8 +170,10 @@ gchar *hi_get_field(gchar * field)
void scan_summary(gboolean reload)
{
SCAN_START();
+ gdk_window_freeze_updates(GDK_WINDOW(gtk_widget_get_window(shell_get_main_shell()->info_tree->view)));
module_entry_scan_all_except(entries, 0);
computer->alsa = computer_get_alsainfo();
+ gdk_window_thaw_updates(GDK_WINDOW(gtk_widget_get_window(shell_get_main_shell()->info_tree->view)));
SCAN_END();
}
@@ -582,6 +584,7 @@ gchar *callback_summary(void)
return info_flatten(info);
}
+
gchar *callback_os(void)
{
struct Info *info = info_new();
@@ -602,7 +605,7 @@ gchar *callback_os(void)
struct InfoGroup *version_group =
info_add_group(
info, _("Version"), info_field(_("Kernel"), computer->os->kernel),
- info_field(_("Command Line"), computer->os->kcmdline ?: _("Unknown")),
+ info_field(_("Command Line"), idle_free(strwrap(computer->os->kcmdline,80,' ')) ?: _("Unknown")),
info_field(_("Version"), computer->os->kernel_version),
info_field(_("C Library"), computer->os->libc),
info_field(_("Distribution"), distro,
@@ -634,6 +637,7 @@ gchar *callback_os(void)
gchar *callback_security(void)
{
+ gchar *st;
struct Info *info = info_new();
info_set_view_type(info, SHELL_VIEW_DETAIL);
@@ -686,9 +690,11 @@ gchar *callback_security(void)
g_strstr_len(contents, -1, "vulnerable"))
icon = "circle_red_x.svg";
+ st=strwrap(contents,90,',');
+ g_free(contents);
info_group_add_fields(vulns,
info_field(g_strdup(vuln),
- idle_free(contents), .icon = icon,
+ idle_free(st), .icon = icon,
.free_name_on_flatten = TRUE),
info_field_last());
}
diff --git a/modules/computer/environment.c b/modules/computer/environment.c
index 2f29c861..bdec7456 100644
--- a/modules/computer/environment.c
+++ b/modules/computer/environment.c
@@ -25,14 +25,16 @@ void scan_env_var(gboolean reload)
SCAN_START();
gchar **envlist;
+ gchar *st;
gint i;
g_free(_env);
_env = g_strdup_printf("[%s]\n", _("Environment Variables") );
for (i = 0, envlist = g_listenv(); envlist[i]; i++) {
- _env = h_strdup_cprintf("%s=%s\n", _env,
- envlist[i], g_getenv(envlist[i]));
+ st=strwrap(g_getenv(envlist[i]),80,':');
+ _env = h_strdup_cprintf("%s=%s\n", _env, envlist[i], st);
+ g_free(st);
}
g_strfreev(envlist);