~ubuntu-branches/ubuntu/utopic/xfce4-panel/utopic

« back to all changes in this revision

Viewing changes to plugins/actions/actions.c

  • Committer: Package Import Robot
  • Author(s): Sean Davis
  • Date: 2014-10-14 06:15:01 UTC
  • Revision ID: package-import@ubuntu.com-20141014061501-ygi4heglyhwryuup
Tags: 4.11.1-0ubuntu2
* debian/patches/02_support-dmtool.patch
  - Add support for dm-tool for user-switching (LP: #1320560)

Show diffs side-by-side

added added

removed removed

Lines of Context:
860
860
  GError          *error = NULL;
861
861
 
862
862
  /* check for commands we use */
863
 
  path = g_find_program_in_path ("gdmflexiserver");
 
863
  path = g_find_program_in_path ("dm-tool");
864
864
  if (path != NULL)
865
865
    PANEL_SET_FLAG (allow_mask, ACTION_TYPE_SWITCH_USER);
 
866
  else
 
867
    {
 
868
      /* check for gdmflexiserver if no dm-tool */
 
869
      g_free (path);
 
870
      path = g_find_program_in_path ("gdmflexiserver");
 
871
      if (path != NULL)
 
872
        PANEL_SET_FLAG (allow_mask, ACTION_TYPE_SWITCH_USER);
 
873
    }
866
874
  g_free (path);
867
875
 
868
876
  path = g_find_program_in_path ("xflock4");
915
923
  gboolean     unattended = FALSE;
916
924
  GError      *error = NULL;
917
925
  gboolean     succeed = FALSE;
 
926
  gchar       *path;
918
927
 
919
928
  entry = g_object_get_qdata (G_OBJECT (widget), action_quark);
920
929
  panel_return_if_fail (entry != NULL);
958
967
      break;
959
968
 
960
969
    case ACTION_TYPE_SWITCH_USER:
961
 
      succeed = g_spawn_command_line_async ("gdmflexiserver", &error);
 
970
      path = g_find_program_in_path ("dm-tool");
 
971
      if (path != NULL)
 
972
        succeed = g_spawn_command_line_async ("dm-tool switch-to-greeter", &error);
 
973
      else
 
974
        succeed = g_spawn_command_line_async ("gdmflexiserver", &error);
 
975
      g_free (path);
962
976
      break;
963
977
 
964
978
    case ACTION_TYPE_LOCK_SCREEN: