Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.43 KB | None | 0 0
  1. diff -Naur enlightenment-0.16.999.55225.orig//src/bin/e_startup.c enlightenment-0.16.999.55225/src/bin/e_startup.c
  2. --- enlightenment-0.16.999.55225.orig//src/bin/e_startup.c  2011-02-18 13:38:36.000000000 +0200
  3. +++ enlightenment-0.16.999.55225/src/bin/e_startup.c    2011-02-18 21:03:22.122000014 +0200
  4. @@ -1,4 +1,6 @@
  5.  #include "e.h"
  6. +#include <dirent.h>
  7. +#include <string.h>
  8.  
  9.  /* TODO:
  10.   * - Need some kind of "wait for exit" system, maybe register with
  11. @@ -13,10 +15,34 @@
  12.  static E_Order        *startup_apps = NULL;
  13.  static int             start_app_pos = -1;
  14.  
  15. +void add_etc_xdg_autostart()
  16. +{
  17. +    char path[100] = "/etc/xdg/autostart";
  18. +    DIR *dirp = opendir(path);
  19. +    struct dirent *dp;
  20. +    char name[50];
  21. +    Efreet_Desktop *desktop;
  22. +    char *ara;
  23. +    
  24. +    while ((dp = readdir(dirp)) != NULL) {
  25. +        if (strcmp(dp->d_name,".") && strcmp(dp->d_name,".."))  {
  26. +            strcpy(name, dp->d_name);
  27. +            strcat(path, name);
  28. +            strcpy(ara, path);
  29. +            desktop = efreet_desktop_get(ara);
  30. +            e_exec(NULL, desktop, NULL, NULL, NULL);
  31. +            strcpy(path, "/etc/xdg/autostart/");
  32. +        }
  33. +    }
  34. +    closedir(dirp);
  35. +}
  36. +
  37.  /* externally accessible functions */
  38.  EAPI void
  39.  e_startup(E_Startup_Mode mode)
  40.  {
  41. +  
  42. +   add_etc_xdg_autostart();
  43.     char buf[PATH_MAX];
  44.     if (mode == E_STARTUP_START)
  45.       {
  46. @@ -70,3 +96,6 @@
  47.  {
  48.     _e_startup();
  49.  }
  50. +
  51. +
  52. +
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement