Adjust for GTK3 github actions compile testing.

fixed gtk2 compiling.
This commit is contained in:
2026-02-01 15:23:36 -07:00
parent e5673e9a7b
commit 7dd47dbd2e
11 changed files with 212 additions and 18 deletions

View File

@@ -103,3 +103,30 @@ static char *get_memory_info (void)
return sysinfo_format_memory (meminfo.ullTotalPhys, meminfo.ullAvailPhys);
}
static const char *sysinfo_detect_toolkit(void)
{
#if defined(HAVE_GTK3)
return "GTK3";
#elif defined(HAVE_GTK2)
return "GTK2";
#elif defined(HAVE_GTK)
return "GTK";
#else
return NULL;
#endif
}
char *
sysinfo_backend_get_ui (void)
{
const char *toolkit = sysinfo_detect_toolkit();
/* On Windows we don't have X11/Wayland. Keep it simple. */
if (toolkit)
{
return g_strdup_printf ("Windows / %s", toolkit);
}
return g_strdup ("Windows");
}