Enlightenment CVS committal

Author  : devilhorns
Project : e17
Module  : apps/e_utils

Dir     : e17/apps/e_utils/src/bin/e17setroot


Modified Files:
        e17setroot.c 


Log Message:
Make e17setroot work without e_lib by using enlightenment_remote.

===================================================================
RCS file: /cvs/e/e17/apps/e_utils/src/bin/e17setroot/e17setroot.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- e17setroot.c        7 Jan 2006 10:41:05 -0000       1.32
+++ e17setroot.c        9 Jul 2006 23:13:39 -0000       1.33
@@ -6,7 +6,6 @@
 #include <unistd.h>
 #include <limits.h>
 #include <Imlib2.h>
-#include <E_Lib.h>
 #include <Engrave.h>
 #include <Ecore.h>
 #include <Ecore_X.h>
@@ -51,12 +50,11 @@
    printf(" -h                         Show this help screen.\n");
 }
 
-static int _e_bg_bg_get(void *data, int type, void *event) {
-   E_Response_Background_Get *bg;
-   bg = event;
-   printf("Current bg file: %s\n", bg->file);
-   ecore_main_loop_quit();
-   return 0;
+void _e_bg_bg_get() {
+   char buf[4096];
+   
+   snprintf(buf, sizeof(buf), "enlightenment_remote -default-bg-get");
+   system(buf);
 }
 
 /* parse command line options */
@@ -158,8 +156,10 @@
 }
 
 int _e_bg_bg_set(char *filename) {
-
-   e_lib_background_set(filename);
+   char buf[4096];
+   
+   snprintf(buf, sizeof(buf), "enlightenment_remote -default-bg-set %s", 
filename);
+   system(buf);
    return 1;
 }
 
@@ -204,7 +204,6 @@
           snprintf(esetroot_s, PATH_MAX, "Esetroot %s %s ", esetroot_opt, 
filename_s);
           system(esetroot_s);
        }
-      ecore_main_loop_quit();
       return;
    }
 
@@ -302,24 +301,10 @@
    
    _e_bg_bg_parseargs(argc, argv);
 
-   if (!e_bg_no_load) {
-      if (!e_lib_init(getenv("DISPLAY"))) {
-         printf("Can't connect to enlightenment, perhaps we are not on 
:0.0!\n");
-         return 0;
-      }
-   }
-
    if (e_bg_type == E_BG_GET) {
-      ecore_init();
-      ecore_event_handler_add(E_RESPONSE_BACKGROUND_GET, _e_bg_bg_get, NULL);
-      e_lib_background_get();
-      ecore_main_loop_begin();
-      ecore_shutdown();
+      _e_bg_bg_get();
    } else
      _e_bg_bg_edj_gen(e_bg_img_file);
-
-   if (!e_bg_no_load)
-      e_lib_shutdown();
 
    return 0;
 }




-------------------------------------------------------------------------
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