Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        Makefile.am e.h e_apps.c e_apps.h e_border.c e_border.h 
        e_canvas.c e_eapp_main.c e_main.c 
Added Files:
        e_startup.c e_startup.h 


Log Message:


support ~/.e/e/applications/startup (and restart) dirs. they work likeall
other app dirs - defining a list of apps to start on start (or restart).

also splashscreen will be gone now on restart :)

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/Makefile.am,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- Makefile.am 2 Dec 2004 07:43:33 -0000       1.5
+++ Makefile.am 9 Dec 2004 13:56:06 -0000       1.6
@@ -60,7 +60,9 @@
 e_place.h \
 e_place.c \
 e_resist.h \
-e_resist.c
+e_resist.c \
+e_startup.h \
+e_startup.c
 
 enlightenment_LDFLAGS = -export-dynamic @e_libs@ @dlopen_libs@
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- e.h 2 Dec 2004 07:43:33 -0000       1.4
+++ e.h 9 Dec 2004 13:56:06 -0000       1.5
@@ -66,6 +66,8 @@
 #include "e_canvas.h"
 #include "e_focus.h"
 #include "e_place.h"
+#include "e_resist.h"
+#include "e_startup.h"
 
 typedef struct _E_Before_Idler E_Before_Idler;
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_apps.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- e_apps.c    2 Dec 2004 10:07:50 -0000       1.5
+++ e_apps.c    9 Dec 2004 13:56:06 -0000       1.6
@@ -461,6 +461,12 @@
        a->startup_notify = *v;
        free(v);
      }
+   v = eet_read(ef, "app/info/wait_exit", &size);
+   if (v)
+     {
+       a->wait_exit = *v;
+       free(v);
+     }
    eet_close(ef);
 }
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_apps.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_apps.h    2 Dec 2004 10:07:50 -0000       1.3
+++ e_apps.h    9 Dec 2004 13:56:06 -0000       1.4
@@ -38,6 +38,7 @@
    Evas_List     *instances; /* a list of all the exe handles for executions */
    
    unsigned char  startup_notify : 1; /* disable while starting etc. */
+   unsigned char  wait_exit : 1; /* wait for app to exit before execing next */
    unsigned char  starting : 1; /* this app is starting */
 
    unsigned char  scanned : 1; /* have we scanned a subdir app yet */
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- e_border.c  5 Dec 2004 09:30:59 -0000       1.13
+++ e_border.c  9 Dec 2004 13:56:06 -0000       1.14
@@ -655,13 +655,6 @@
    e = ev;
    bd = e_border_find_by_client_window(e->win);
    if (!bd) return 1;
-     {
-       char *name;
-
-       name = XGetAtomName(ecore_x_display_get(), e->atom);
-       printf("property for %0x [%s]\n", e->win, name);
-       XFree(name);
-     }
    if (e->atom == ECORE_X_ATOM_WM_NAME)
      {
        bd->client.icccm.fetch.title = 1;
@@ -932,6 +925,21 @@
             e_object_del(E_OBJECT(bd));
          }
      }
+   else if (!strcmp(source, "shade"))
+     {
+       if (bd->shaded)
+         {
+            bd->shaded = 0;
+            bd->changes.shaded = 1;
+            bd->changed = 1;
+         }
+       else
+         {
+            bd->shaded = 1;
+            bd->changes.shaded = 1;
+            bd->changed = 1;
+         }
+     }
 }
 
 static int
@@ -1588,6 +1596,7 @@
        else ecore_x_window_hide(bd->win);
        bd->changes.visible = 0;
      }
+   /* FIXME: handle shaded flag */
    if ((bd->changes.pos) && (bd->changes.size))
      {
        printf("border move resize\n");
@@ -1637,6 +1646,7 @@
        printf("border move resize done\n");
        bd->changes.size = 0;
      }
+
    if (bd->changes.reset_gravity)
      {
        GRAV_SET(bd, ECORE_X_GRAVITY_NW);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- e_border.h  2 Dec 2004 10:07:50 -0000       1.5
+++ e_border.h  9 Dec 2004 13:56:06 -0000       1.6
@@ -113,6 +113,7 @@
    unsigned char   focused : 1;
    unsigned char   new_client : 1;
    unsigned char   re_manage : 1;
+   unsigned char   shaded : 1;
 
    unsigned char   changed : 1;
 
@@ -127,6 +128,7 @@
       unsigned int prop : 1;
       unsigned int border : 1;
       unsigned int reset_gravity : 1;
+      unsigned int shaded : 1;
    } changes;
 };
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_canvas.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_canvas.c  5 Dec 2004 07:43:50 -0000       1.2
+++ e_canvas.c  9 Dec 2004 13:56:06 -0000       1.3
@@ -5,6 +5,7 @@
 /* local subsystem globals */
 static Evas_List *_e_canvases = NULL;
 
+/* externally accessible functions */
 void
 e_canvas_add(Ecore_Evas *ee)
 {
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_eapp_main.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e_eapp_main.c       2 Dec 2004 04:24:54 -0000       1.1
+++ e_eapp_main.c       9 Dec 2004 13:56:06 -0000       1.2
@@ -20,6 +20,7 @@
    int del_win_name = 0;
    int del_win_class = 0;
    int del_startup_notify = 0;
+   int del_wait_exit = 0;
    char *file = NULL;
    char *set_name = NULL;
    char *set_generic = NULL;
@@ -28,6 +29,7 @@
    char *set_win_name = NULL;
    char *set_win_class = NULL;
    int   set_startup_notify = -1;
+   int   set_wait_exit = -1;
    
    /* handle some command-line parameters */
    for (i = 1; i < argc; i++)
@@ -77,6 +79,11 @@
             i++;
             set_startup_notify = atoi(argv[i]);
          }
+       else if ((!strcmp(argv[i], "-set-wait-exit")) && (i < (argc - 1)))
+         {
+            i++;
+            set_wait_exit = atoi(argv[i]);
+         }
        else if ((!strcmp(argv[i], "-del-all")))
          {
             del_name = 1;
@@ -114,6 +121,10 @@
          {
             del_startup_notify = 1;
          }
+       else if ((!strcmp(argv[i], "-del-wait-exit")))
+         {
+            del_wait_exit = 1;
+         }
        else if ((!strcmp(argv[i], "-h")) ||
                 (!strcmp(argv[i], "-help")) ||
                 (!strcmp(argv[i], "--h")) ||
@@ -172,6 +183,16 @@
        else
          eet_write(ef, "app/info/startup_notify", tmp, 1, 0);
      }
+   if (set_wait_exit >= 0)
+     {
+       unsigned char tmp[1];
+       
+       tmp[0] = set_wait_exit;
+       if (set_wait_exit)
+         eet_write(ef, "app/info/wait_exit", tmp, 1, 0);
+       else
+         eet_write(ef, "app/info/wait_exit", tmp, 1, 0);
+     }
    if (del_name)
      {
        char **matches = NULL;
@@ -216,6 +237,8 @@
      eet_delete(ef, "app/window/class");
    if (del_startup_notify)
      eet_delete(ef, "app/info/startup_notify");
+   if (del_wait_exit)
+     eet_delete(ef, "app/info/wait_exit");
    
    eet_close(ef);
    eet_shutdown();
@@ -235,6 +258,7 @@
          "  -set-win-name WIN_NAME     Set the application window name\n"
          "  -set-win-class WIN_CLASS   Set the application window class\n"
          "  -set-startup-notify [1/0]  Set the application startup notify flag 
to on/off\n"
+         "  -set-wait-exit [1/0]       Set the application wait exit flag to 
on/off\n"
          "  -del-name                  Delete the application name\n"
          "  -del-generic               Delete the application generic name\n"
          "  -del-comment               Delete the application comment\n"
@@ -242,5 +266,6 @@
          "  -del-win-name              Delete the application window name\n"
          "  -del-win-class             Delete the application window class\n"
          "  -del-startup-notify        Delete the application startup notify 
flag\n"
+         "  -del-wait-exit             Delete the application wait exit flag\n"
          );
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_main.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- e_main.c    5 Dec 2004 09:34:59 -0000       1.9
+++ e_main.c    9 Dec 2004 13:56:06 -0000       1.10
@@ -56,14 +56,22 @@
    int i;
    char *display_name = NULL;
    int nosplash = 0;
-   
+   int after_restart = 0; 
+   char buf[1024];
+  
    if (getenv("NOSPLASH")) nosplash = 1;
+   if (getenv("RESTART"))
+     {
+       printf("after restart!!!\n");
+       after_restart = 1;
+     }
+   putenv("RESTART=1");
+   
    /* handle some command-line parameters */
    for (i = 1; i < argc; i++)
      {
        if ((!strcmp(argv[i], "-display")) && (i < (argc - 1)))
          {
-            char buf[1024];
             i++;
             
             snprintf(buf, sizeof(buf), "DISPLAY=%s", argv[i]);
@@ -257,10 +265,11 @@
    e_init_title_set("Enlightenment");
    e_init_version_set(VERSION);
    e_init_status_set("Enlightenment Starting. Please wait.");
-   /* FIXME: "faking" startup here. normally we would now execute background */
-   /* handlers, panels, initial clients, filemanager etc. and wait till they */
-   /* all have started and are "ready to go". */
-   if (nosplash)
+   
+   if (after_restart) e_startup(E_STARTUP_RESTART);
+   else e_startup(E_STARTUP_START);
+   
+   if ((nosplash) || (after_restart))
      {
        ecore_timer_add(0.0, _e_main_cb_startup_fake_end, NULL);
      }
@@ -373,6 +382,8 @@
        "%s/.e/e/applications/all",
        "%s/.e/e/applications/favorite",
        "%s/.e/e/applications/bar",
+       "%s/.e/e/applications/startup",
+       "%s/.e/e/applications/restart",
        "%s/.e/e/modules",
        "%s/.e/e/config"
      };
@@ -403,6 +414,7 @@
                 "(cd %s/.e/e/ ; tar -xf -)", 
                 PACKAGE_DATA_DIR,
                 homedir);
+       system(buf);
      }
    free(homedir);
    




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to