[Xfce4-commits] [xfce/xfce4-panel] 02/02: actions: Add support for dm-tool

noreply at xfce.org noreply at xfce.org
Tue Jun 5 01:04:35 CEST 2018


This is an automated email from the git hooks/post-receive script.

o   c   h   o   s   i       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfce4-panel.

commit 19b14fe75720b4b2db54070af10042504edabe95
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Tue Jun 5 00:58:19 2018 +0200

    actions: Add support for dm-tool
    
    gdmflexiserver is no longer provided by LightDM.
    Use dm-tool if it is available.
---
 plugins/actions/actions.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/plugins/actions/actions.c b/plugins/actions/actions.c
index 271448f..8e8b276 100644
--- a/plugins/actions/actions.c
+++ b/plugins/actions/actions.c
@@ -891,9 +891,17 @@ actions_plugin_actions_allowed (void)
   GError          *error = NULL;
 
   /* check for commands we use */
-  path = g_find_program_in_path ("gdmflexiserver");
+  path = g_find_program_in_path ("dm-tool");
   if (path != NULL)
     PANEL_SET_FLAG (allow_mask, ACTION_TYPE_SWITCH_USER);
+  else
+  {
+    /* check for gdmflexiserver if dm-tool is not present */
+    g_free (path);
+    path = g_find_program_in_path ("gdmflexiserver");
+    if (path != NULL)
+      PANEL_SET_FLAG (allow_mask, ACTION_TYPE_SWITCH_USER);
+  }
   g_free (path);
 
   path = g_find_program_in_path ("xflock4");
@@ -1004,7 +1012,12 @@ actions_plugin_action_activate (GtkWidget      *widget,
       break;
 
     case ACTION_TYPE_SWITCH_USER:
-      succeed = g_spawn_command_line_async ("gdmflexiserver", &error);
+      path = g_find_program_in_path ("dm-tool");
+      if (path != NULL)
+        succeed = g_spawn_command_line_async ("dm-tool switch-to-greeter", &error);
+      else
+        succeed = g_spawn_command_line_async ("gdmflexiserver", &error);
+      g_free (path);
       break;
 
     case ACTION_TYPE_LOCK_SCREEN:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list