aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-03-01 14:47:13 +0100
committerRobert Tari <robert@tari.in>2021-03-01 14:47:13 +0100
commit96bd3d81bd75f094f2c90034cae97d03c62fcefd (patch)
tree6eb82b90956edbd6004bbfd2a929f3f960d81d3d /src
parent5e4d79e9c88b665fff69bf628c407e4843cc24b1 (diff)
downloadayatana-indicator-session-96bd3d81bd75f094f2c90034cae97d03c62fcefd.tar.gz
ayatana-indicator-session-96bd3d81bd75f094f2c90034cae97d03c62fcefd.tar.bz2
ayatana-indicator-session-96bd3d81bd75f094f2c90034cae97d03c62fcefd.zip
src/utils.c: Try to use SUPPORT_URL in get_distro_url
fixes #24
Diffstat (limited to 'src')
-rw-r--r--src/utils.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/utils.c b/src/utils.c
index 1175797..406cafa 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -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);
}