Enlightenment CVS committal

Author  : onefang
Project : misc
Module  : engage

Dir     : misc/engage/src


Modified Files:
        e_apps.c e_apps.h 


Log Message:
Updated to match E and ecore changes.

===================================================================
RCS file: /cvs/e/misc/engage/src/e_apps.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- e_apps.c    4 Sep 2006 20:48:32 -0000       1.10
+++ e_apps.c    7 Sep 2006 10:54:30 -0000       1.11
@@ -445,6 +445,7 @@
    Ecore_Exe *exe;
    E_App_Instance *inst;
    Evas_List *l;
+   char *command;
    
    E_OBJECT_CHECK_RETURN(a, 0);
    E_OBJECT_TYPE_CHECK_RETURN(a, E_APP_TYPE, 0);
@@ -453,16 +454,32 @@
     * the eapp file */
    inst = E_NEW(E_App_Instance, 1);
    if (!inst) return 0;
+
+   if (a->desktop)
+      command = ecore_desktop_get_command(a->desktop, NULL, 1);
+   else
+      command = strdup(a->exe);
+   if (!command)
+      {
+          free(inst);
+/*       e_util_dialog_show(_("Run Error"),
+                            _("Enlightenment was unable to process a command 
line:<br>"
+                            "<br>"
+                            "%s %s<br>"),
+                            a->exe, (a->exe_params != NULL) ? a->exe_params : 
"" ); */
+          return 0;
+      }
    /* We want the stdout and stderr as lines for the error dialog if it exits 
abnormally. */
    exe = ecore_exe_pipe_run(a->exe, ECORE_EXE_PIPE_AUTO | ECORE_EXE_PIPE_READ 
| ECORE_EXE_PIPE_ERROR | ECORE_EXE_PIPE_READ_LINE_BUFFERED | 
ECORE_EXE_PIPE_ERROR_LINE_BUFFERED, inst);
 /*   if (!exe)
      {
+        free(command);
        free(inst);
        e_util_dialog_show(_("Run Error"),
                           _("Enlightenment was unable to fork a child 
process:<br>"
                             "<br>"
-                            "%s<br>"),
-                          a->exe);
+                            "%s %s<br>"),
+                            a->exe, (a->exe_params != NULL) ? a->exe_params : 
"" );
        return 0;
      }*/
    /* 20 lines at start and end, 20x100 limit on bytes at each end. */
@@ -484,6 +501,7 @@
        _e_app_change(a2, E_APP_EXEC);
      }
    _e_app_change(a, E_APP_EXEC);
+   free(command);
    return 1;
 }
 
@@ -1159,11 +1177,13 @@
       desktop = ecore_desktop_get(path, lang);
       if (desktop)
         {
+          a->desktop = desktop;
           if (desktop->name)  a->name = evas_stringshare_add(desktop->name);
           if (desktop->generic)  a->generic = 
evas_stringshare_add(desktop->generic);
           if (desktop->comment)  a->comment = 
evas_stringshare_add(desktop->comment);
 
           if (desktop->exec)  a->exe = evas_stringshare_add(desktop->exec);
+          if (desktop->exec_params)  a->exe = 
evas_stringshare_add(desktop->exec_params);
           if (desktop->icon_class)  a->icon_class = 
evas_stringshare_add(desktop->icon_class);
           if (desktop->icon_path)  a->icon_path = 
evas_stringshare_add(desktop->icon_path);
           if (desktop->window_class)  a->win_class = 
evas_stringshare_add(desktop->window_class);
@@ -1292,6 +1312,7 @@
               desktop->comment = (char *) a->comment;
 
               desktop->exec = (char *) a->exe;
+              desktop->exec_params = (char *) a->exe_params;
               desktop->icon_class = (char *) a->icon_class;
                desktop->icon_path = (char *) a->icon_path;
               desktop->window_class = (char *) a->win_class;
@@ -1438,6 +1459,7 @@
    if (a->generic) evas_stringshare_del(a->generic);
    if (a->comment) evas_stringshare_del(a->comment);
    if (a->exe) evas_stringshare_del(a->exe);
+   if (a->exe_params) evas_stringshare_del(a->exe_params);
    if (a->icon_class) evas_stringshare_del(a->icon_class);
    if (a->icon_path) evas_stringshare_del(a->icon_path);
    if (a->win_name) evas_stringshare_del(a->win_name);
@@ -1448,6 +1470,7 @@
    a->generic = NULL;
    a->comment = NULL;
    a->exe = NULL;
+   a->exe_params = NULL;
    a->icon_class = NULL;
    a->icon_path = NULL;
    a->win_name = NULL;
@@ -2197,6 +2220,7 @@
    dst->generic = src->generic;
    dst->comment = src->comment;
    dst->exe = src->exe;
+   dst->exe_params = src->exe_params;
    dst->path = src->path;
    dst->win_name = src->win_name;
    dst->win_class = src->win_class;
===================================================================
RCS file: /cvs/e/misc/engage/src/e_apps.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- e_apps.h    3 Sep 2006 15:14:51 -0000       1.5
+++ e_apps.h    7 Sep 2006 10:54:30 -0000       1.6
@@ -31,11 +31,13 @@
    
    E_App              *parent; /* the parent e_app node */
    E_App              *orig; /* if this is a copy, point to the original */
+   Ecore_Desktop      *desktop; /* if this came from a .desktop file. */
    
    const char         *name; /* app name */
    const char         *generic; /* generic app name */
    const char         *comment; /* a longer description */
    const char         *exe; /* command to execute, NULL if directory */
+   const char         *exe_params; /* command params to execute, NULL if 
directory */
    
    const char         *path; /* path to .eet containing icons etc. etc. */
 //   const char         *icon_path; /* path to icon file, in case it is 
different from path. */



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to