summaryrefslogtreecommitdiff
path: root/capplets/accessibility/at-properties
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-06-27 14:43:32 +0800
committerraveit65 <[email protected]>2019-07-17 09:38:54 +0200
commit726e201050edd5bf3b46b12639bc490a9cefc465 (patch)
tree19298e32bcc18df68ce3e4317c0e25d97fe80118 /capplets/accessibility/at-properties
parent760f87c849ad7d9b09896da1c32d3d3f5f757d64 (diff)
downloadmate-control-center-726e201050edd5bf3b46b12639bc490a9cefc465.tar.bz2
mate-control-center-726e201050edd5bf3b46b12639bc490a9cefc465.tar.xz
support lightdm-gtk-greeter-settings as login preferences program
Diffstat (limited to 'capplets/accessibility/at-properties')
-rw-r--r--capplets/accessibility/at-properties/main.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/capplets/accessibility/at-properties/main.c b/capplets/accessibility/at-properties/main.c
index bfcdede9..11e91bd3 100644
--- a/capplets/accessibility/at-properties/main.c
+++ b/capplets/accessibility/at-properties/main.c
@@ -44,13 +44,14 @@ create_builder (void)
gtk_image_set_from_file (GTK_IMAGE (object),
PIXMAPDIR "/at-support.png");
- prog = g_find_program_in_path ("mdmsetup");
+ prog = g_find_program_in_path ("lightdm-gtk-greeter-settings-pkexec");
if (prog == NULL) {
- object = gtk_builder_get_object (builder,
- "login_button");
- gtk_widget_hide (GTK_WIDGET (object));
+ prog = g_find_program_in_path ("mdmsetup");
+ if (prog == NULL) {
+ object = gtk_builder_get_object (builder, "login_button");
+ gtk_widget_hide (GTK_WIDGET (object));
+ }
}
-
g_free (prog);
} else {
g_warning ("Could not load UI: %s", error->message);
@@ -83,7 +84,13 @@ cb_mouse_preferences (GtkDialog *dialog, gint response_id)
static void
cb_login_preferences (GtkDialog *dialog, gint response_id)
{
- g_spawn_command_line_async ("mdmsetup", NULL);
+ gchar *prog;
+ prog = g_find_program_in_path ("lightdm-gtk-greeter-settings-pkexec");
+ if (prog == NULL) {
+ prog = g_find_program_in_path ("mdmsetup");
+ }
+ g_spawn_command_line_async (prog, NULL);
+ g_free(prog);
}
/* get_session_bus(), get_sm_proxy(), and do_logout() are all