aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-03-01 16:41:59 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-03-01 16:41:59 +0100
commit5d84e8cb1e8423c245dae27c45d1960b231d89fa (patch)
tree6eb82b90956edbd6004bbfd2a929f3f960d81d3d
parent8c9c40746da2ba9e87db585e6c3d6fdf8e03b59d (diff)
parent96bd3d81bd75f094f2c90034cae97d03c62fcefd (diff)
downloadayatana-indicator-session-5d84e8cb1e8423c245dae27c45d1960b231d89fa.tar.gz
ayatana-indicator-session-5d84e8cb1e8423c245dae27c45d1960b231d89fa.tar.bz2
ayatana-indicator-session-5d84e8cb1e8423c245dae27c45d1960b231d89fa.zip
Merge branch 'tari01-pr/fix-distro-help-url'
Attributes GH PR #29: https://github.com/AyatanaIndicators/ayatana-indicator-session/pull/29
-rw-r--r--src/utils.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/utils.c b/src/utils.c
index e950d3b..406cafa 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -106,8 +106,8 @@ get_os_release (void)
val = g_strdup(in);
g_clear_error(&error);
}
-
- g_debug("from \"%s\": key [%s] val [%s]", os_release, key->str, val);
+
+ g_debug("from \"%s\": key [%s] val [%s]", os_release, key->str, val);
g_hash_table_insert (hash, g_strdup(key->str), val); /* hash owns val now */
}
@@ -144,9 +144,18 @@ get_distro_url (void)
if (distro_url == NULL)
{
GHashTable * os_release = get_os_release();
- gpointer value = g_hash_table_lookup(os_release, "HOME_URL");
+ gpointer value = g_hash_table_lookup(os_release, "SUPPORT_URL");
+
if (value == NULL)
- value = "https://www.gnu.org"; /* fallback value */
+ {
+ value = g_hash_table_lookup(os_release, "HOME_URL");
+
+ if (value == NULL)
+ {
+ value = "https://www.gnu.org"; /* fallback value */
+ }
+ }
+
distro_url = g_strdup(value);
g_hash_table_destroy(os_release);
}