summaryrefslogtreecommitdiffstats
path: root/abs/core/enlightenment/startup.patch
blob: d13ed2fa7b8500ee5822d7196424780007b55167 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
--- src/startup.c.orig	2014-12-05 22:19:41.506253255 +0000
+++ src/startup.c	2014-12-08 13:33:17.326875866 +0000
@@ -172,5 +172,52 @@
    speed = Conf.desks.slidespeed > 0 ? Conf.desks.slidespeed : 500;
    duration = 2000000 / speed;
 
+ //Start of MythVantage delay for ultra cool startup
+   printf("***\n");
+   int ret = 1 ;
    AnimatorAdd(NULL, ANIM_STARTUP, doStartupWindowsOpen, duration, 0, 0, NULL);
+   //checking for fname}
+   int result;
+   const char *filename = "/tmp/nofe";
+   result = access (filename, F_OK);
+   int result_config;
+   const char *homedir = "HOME";
+   char *value;
+   value = getenv(homedir);
+   //char *filename_config;
+   //filename_config = strcat(value , "/.configure");
+   const char *filename_config = "/tmp/no_e_delay";
+   result_config = access (filename_config, F_OK);
+   if( result == 0 || result_config ==0 )
+   {
+      printf("ENLIGHTENMENT: Found /tmp/nofe, skipping delay\n");
+   }
+   else
+   {
+     printf("ENLIGHTENMENT: Waiting for Mythfrontend\n");
+     int i;
+     for (i = 0; i < 20; i++)
+     {
+        sleep(1);
+        ret = system("xwininfo -name \"MythTV Frontend\" 2>/dev/null >/dev/null " );
+        if ( ret == 0 )
+            break;
+        ret = system("xwininfo -name \"mythwelcome\" 2>/dev/null >/dev/null " );
+        if ( ret == 0 )
+            break;
+        ret = system("xwininfo -name \"MythTV Setup\" 2>/dev/null >/dev/null " );
+        if ( ret == 0 )
+            break;
+        ret = system("xwininfo -name \"MythVantage\" 2>/dev/null >/dev/null " );
+        if ( ret == 0 )
+            break;
+     }
+     if ( ret != 0 )
+      printf("ENLIGHTENMENT: Couldn't find mythfrontend/mythwelcome, starting anyhow \n");
+     else {
+       printf("ENLIGHTENMENT: MythFrontend or MythWelcome found, continue startup (after 2 second delay) \n");
+       sleep(2);
+      }
+   }
+   // End of delay code
 }