aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-03-21 09:49:31 +0000
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-03-21 09:59:35 +0000
commit46ddf4f5d96974d5129567a4c94a311ed586121d (patch)
tree67ab81cfb07fe2299a0d9edb43094034332ee01f
parent5a695ecb884f2c97ba1065e95d8d2ee28d8671f7 (diff)
downloadayatana-indicator-session-46ddf4f5d96974d5129567a4c94a311ed586121d.tar.gz
ayatana-indicator-session-46ddf4f5d96974d5129567a4c94a311ed586121d.tar.bz2
ayatana-indicator-session-46ddf4f5d96974d5129567a4c94a311ed586121d.zip
my_desktop_help(): Don't always fallback to empty yelp call, rather show a warning that we don't know how to access the currently running desktop's user guide or help center.
-rw-r--r--src/backend-dbus/actions.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/backend-dbus/actions.c b/src/backend-dbus/actions.c
index a8699de..1b104cf 100644
--- a/src/backend-dbus/actions.c
+++ b/src/backend-dbus/actions.c
@@ -100,6 +100,19 @@ prompt_status_t;
static gboolean
+have_gnome_program (const gchar *program)
+{
+ g_auto(GStrv) desktop_names = NULL;
+
+ if (is_gnome()) {
+ g_autofree gchar *path = g_find_program_in_path (program);
+ return path != NULL;
+ }
+
+ return FALSE;
+}
+
+static gboolean
have_mate_program (const gchar *program)
{
g_auto(GStrv) desktop_names = NULL;
@@ -974,7 +987,9 @@ my_desktop_help (IndicatorSessionActions * self G_GNUC_UNUSED)
{
static char * browser = NULL;
- if (have_mate_program ("yelp"))
+ if (have_gnome_program ("yelp"))
+ run_outside_app ("yelp help:gnome-user-guide");
+ else if (have_mate_program ("yelp"))
run_outside_app ("yelp help:mate-user-guide");
else if (is_xfce())
{
@@ -984,7 +999,9 @@ my_desktop_help (IndicatorSessionActions * self G_GNUC_UNUSED)
run_outside_app(g_strdup_printf("%s '%s'", browser, "https://docs.xfce.org/"));
}
else
- run_outside_app ("yelp");
+ zenity_warning ("dialog-warning",
+ _("Warning"),
+ _("The Ayatana Session Indicator does not know yet, how to show\nthe currently running desktop's user guide or help center.\n\nPlease report this to the developers at:\nhttps://github.com/ArcticaProject/ayatana-indicator-session/issues"));
}
static void