Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -Naur enlightenment-0.16.999.55225.orig//src/bin/e_startup.c enlightenment-0.16.999.55225/src/bin/e_startup.c
- --- enlightenment-0.16.999.55225.orig//src/bin/e_startup.c 2011-02-18 13:38:36.000000000 +0200
- +++ enlightenment-0.16.999.55225/src/bin/e_startup.c 2011-02-18 21:03:22.122000014 +0200
- @@ -1,4 +1,6 @@
- #include "e.h"
- +#include <dirent.h>
- +#include <string.h>
- /* TODO:
- * - Need some kind of "wait for exit" system, maybe register with
- @@ -13,10 +15,34 @@
- static E_Order *startup_apps = NULL;
- static int start_app_pos = -1;
- +void add_etc_xdg_autostart()
- +{
- + char path[100] = "/etc/xdg/autostart";
- + DIR *dirp = opendir(path);
- + struct dirent *dp;
- + char name[50];
- + Efreet_Desktop *desktop;
- + char *ara;
- +
- + while ((dp = readdir(dirp)) != NULL) {
- + if (strcmp(dp->d_name,".") && strcmp(dp->d_name,"..")) {
- + strcpy(name, dp->d_name);
- + strcat(path, name);
- + strcpy(ara, path);
- + desktop = efreet_desktop_get(ara);
- + e_exec(NULL, desktop, NULL, NULL, NULL);
- + strcpy(path, "/etc/xdg/autostart/");
- + }
- + }
- + closedir(dirp);
- +}
- +
- /* externally accessible functions */
- EAPI void
- e_startup(E_Startup_Mode mode)
- {
- +
- + add_etc_xdg_autostart();
- char buf[PATH_MAX];
- if (mode == E_STARTUP_START)
- {
- @@ -70,3 +96,6 @@
- {
- _e_startup();
- }
- +
- +
- +
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement