aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2023-10-03 18:25:36 +0200
committerRobert Tari <robert@tari.in>2023-10-03 18:38:05 +0200
commitd3c4ad8b3b08baf7e69406e0cc25acff76d28509 (patch)
treecc432f0722c01ae07cc620c3d3d8bb5071ef1f31 /src
parent7be65c7604fb6ae5028a535dca05abd6699c99e3 (diff)
downloadayatana-indicator-keyboard-d3c4ad8b3b08baf7e69406e0cc25acff76d28509.tar.gz
ayatana-indicator-keyboard-d3c4ad8b3b08baf7e69406e0cc25acff76d28509.tar.bz2
ayatana-indicator-keyboard-d3c4ad8b3b08baf7e69406e0cc25acff76d28509.zip
src/service.c: Switch to execute_command_warn
Diffstat (limited to 'src')
-rw-r--r--src/service.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/service.c b/src/service.c
index 7593a0aa..6d083569 100644
--- a/src/service.c
+++ b/src/service.c
@@ -342,20 +342,9 @@ static void onDisplay (GSimpleAction *pAction, GVariant *pVariant, gpointer pDat
sProgram = "gkbd-keyboard-display";
}
- gboolean bHasProgram = ayatana_common_utils_have_program (sProgram);
-
- if (!bHasProgram)
- {
- gchar *sMessage = g_strdup_printf ("The %s application is required to display keyboard layouts, but it was not found.", sProgram);
- ayatana_common_utils_zenity_warning ("dialog-warning", _("Warning"), sMessage);
- g_free (sMessage);
-
- return;
- }
-
- gchar *sCommand = g_strdup_printf ("%s -g %i", sProgram, nLayout + 1);
- ayatana_common_utils_execute_command (sCommand);
- g_free (sCommand);
+ gchar *sArgs = g_strdup_printf ("-g %i", nLayout + 1);
+ ayatana_common_utils_execute_command_warn (sProgram, sArgs);
+ g_free (sArgs);
}
static void initActions(IndicatorKeyboardService *self)