[geany/geany] 2587fc: Show OS info in debug messages

Matthew Brush git-noreply at xxxxx
Sat Oct 3 18:43:06 UTC 2020


Branch:      refs/heads/master
Author:      Matthew Brush <matt at geany.org>
Committer:   Matthew Brush <mbrush at codebrainz.ca>
Date:        Sat, 03 Oct 2020 18:43:06 UTC
Commit:      2587fc249d1f9516609a0faf68c6002ce447547f
             https://github.com/geany/geany/commit/2587fc249d1f9516609a0faf68c6002ce447547f

Log Message:
-----------
Show OS info in debug messages


Modified Paths:
--------------
    src/libmain.c

Modified: src/libmain.c
11 lines changed, 11 insertions(+), 0 deletions(-)
===================================================================
@@ -1160,6 +1160,17 @@ gint main_lib(gint argc, gchar **argv)
 	geany_debug(geany_lib_versions,
 		gtk_major_version, gtk_minor_version, gtk_micro_version,
 		glib_major_version, glib_minor_version, glib_micro_version);
+
+#if GLIB_CHECK_VERSION(2, 64, 0)
+	gchar *os_prettyname = g_get_os_info(G_OS_INFO_KEY_PRETTY_NAME);
+	gchar *os_codename = g_get_os_info(G_OS_INFO_KEY_VERSION_CODENAME);
+	geany_debug("OS: %s (%s)",
+		os_prettyname ? os_prettyname : "Unknown",
+		os_codename ? os_codename : "Unknown");
+	g_free(os_prettyname);
+	g_free(os_codename);
+#endif
+
 	geany_debug("System data dir: %s", app->datadir);
 	utf8_configdir = utils_get_utf8_from_locale(app->configdir);
 	geany_debug("User config dir: %s", utf8_configdir);



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list