Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_bg.c e_bg.h e_config.c e_config.h e_ipc_handlers.h 


Log Message:


use desk x,y as ints

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_bg.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_bg.c      30 Jun 2005 14:07:27 -0000      1.3
+++ e_bg.c      30 Jun 2005 14:35:18 -0000      1.4
@@ -73,10 +73,9 @@
            (zone->container->num != cfbg->container)) continue;
        if ((cfbg->zone >= 0) &&
            (zone->num != cfbg->zone)) continue;
-       if ((!cfbg->desk) || (strlen(cfbg->desk) == 0)) continue;
        desk = e_desk_current_get(zone);
        if (!desk) continue;
-       if (strcmp(cfbg->desk, desk->name)) continue;
+       if ((cfbg->desk_x != desk->x) || (cfbg->desk_y != desk->y)) continue;
        ok = edje_object_file_set(o, cfbg->file,
                                  "desktop/background");
        break;
@@ -119,21 +118,22 @@
 }
 
 void
-e_bg_add(int container, int zone, char *desk, char *file)
+e_bg_add(int container, int zone, int desk_x, int desk_y, char *file)
 {
    E_Config_Desktop_Background *cfbg;
    
-   e_bg_del(container, zone, desk);
+   e_bg_del(container, zone, desk_x, desk_y);
    cfbg = E_NEW(E_Config_Desktop_Background, 1);
    cfbg->container = container;
    cfbg->zone = zone;
-   cfbg->desk = strdup(desk);
+   cfbg->desk_x = desk_x;
+   cfbg->desk_y = desk_y;
    cfbg->file = strdup(file);
    e_config->desktop_backgrounds = 
evas_list_append(e_config->desktop_backgrounds, cfbg);
 }
 
 void
-e_bg_del(int container, int zone, char *desk)
+e_bg_del(int container, int zone, int desk_x, int desk_y)
 {
    Evas_List *l;
    
@@ -143,10 +143,9 @@
        
        cfbg = l->data;
        if ((cfbg->container == container) && (cfbg->zone == zone) &&
-           (!strcmp(cfbg->desk, desk)))
+           (cfbg->desk_x == desk_x) && (cfbg->desk_y == desk_y))
          {
             e_config->desktop_backgrounds = 
evas_list_remove_list(e_config->desktop_backgrounds, l);
-            IF_FREE(cfbg->desk);
             IF_FREE(cfbg->file);
             free(cfbg);
             break;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_bg.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_bg.h      30 Jun 2005 14:07:28 -0000      1.3
+++ e_bg.h      30 Jun 2005 14:35:18 -0000      1.4
@@ -15,8 +15,8 @@
 #define E_BG_H
 
 EAPI void e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition);
-EAPI void e_bg_add(int container, int zone, char *desk, char *file);
-EAPI void e_bg_del(int container, int zone, char *desk);
+EAPI void e_bg_add(int container, int zone, int desk_x, int desk_y, char 
*file);
+EAPI void e_bg_del(int container, int zone, int desk_x, int desk_y);
 EAPI void e_bg_update(void);
     
 #endif
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -3 -r1.71 -r1.72
--- e_config.c  30 Jun 2005 14:07:28 -0000      1.71
+++ e_config.c  30 Jun 2005 14:35:18 -0000      1.72
@@ -45,7 +45,8 @@
 #define D _e_config_desktop_bg_edd
    E_CONFIG_VAL(D, T, container, INT);
    E_CONFIG_VAL(D, T, zone, INT);
-   E_CONFIG_VAL(D, T, desk, STR);
+   E_CONFIG_VAL(D, T, desk_x, INT);
+   E_CONFIG_VAL(D, T, desk_y, INT);
    E_CONFIG_VAL(D, T, file, STR);
    
    _e_config_path_append_edd = E_CONFIG_DD_NEW("E_Path_Dir", E_Path_Dir);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- e_config.h  30 Jun 2005 14:07:28 -0000      1.37
+++ e_config.h  30 Jun 2005 14:35:19 -0000      1.38
@@ -172,7 +172,8 @@
 {
    int            container;
    int            zone;
-   char          *desk;
+   int            desk_x;
+   int            desk_y;
    char          *file;
 };
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_ipc_handlers.h,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -3 -r1.45 -r1.46
--- e_ipc_handlers.h    30 Jun 2005 10:43:21 -0000      1.45
+++ e_ipc_handlers.h    30 Jun 2005 14:35:19 -0000      1.46
@@ -2844,16 +2844,16 @@
 /****************************************************************************/
 #define HDL E_IPC_OP_DESKTOP_BG_ADD
 #if (TYPE == E_REMOTE_OPTIONS)
-   OP("-desktop-bg-add", 4, "Add a desktop bg definition. OPT1 = container no. 
OPT2 = zone no. OPT3 = desktop name OPT4 = bg file path", 0, HDL)
+   OP("-desktop-bg-add", 5, "Add a desktop bg definition. OPT1 = container no. 
OPT2 = zone no. OPT3 = desk_x. OPT4 = desk_y. OPT5 = bg file path", 0, HDL)
 #elif (TYPE == E_REMOTE_OUT)
-   REQ_3INT_3STRING_START(HDL);
-   REQ_3INT_3STRING_END(atoi(params[0]), atoi(params[1]), 0, params[2], 
params[3], "", HDL);
+   REQ_4INT_2STRING_START(HDL);
+   REQ_4INT_2STRING_END(atoi(params[0]), atoi(params[1]), atoi(params[2]), 
atoi(params[3]), params[4], "", HDL);
 #elif (TYPE == E_WM_IN)
-   INT3_STRING3(v, HDL);
-   e_bg_add(v->val1, v->val2, v->str1, v->str2);
+   INT4_STRING2(v, HDL);
+   e_bg_add(v->val1, v->val2, v->val3, v->val4, v->str1);
    e_bg_update();
    SAVE;
-   END_INT3_STRING3(v);
+   END_INT4_STRING2(v);
 #elif (TYPE == E_REMOTE_IN)
 #endif
 #undef HDL
@@ -2861,16 +2861,16 @@
 /****************************************************************************/
 #define HDL E_IPC_OP_DESKTOP_BG_DEL
 #if (TYPE == E_REMOTE_OPTIONS)
-   OP("-desktop-bg-del", 3, "Delete a desktop bg definition. OPT1 = container 
no. OPT2 = zone no. OPT3 = desktop name", 0, HDL)
+   OP("-desktop-bg-del", 4, "Delete a desktop bg definition. OPT1 = container 
no. OPT2 = zone no. OPT3 = desk_x. OPT4 = desk_y.", 0, HDL)
 #elif (TYPE == E_REMOTE_OUT)
-   REQ_3INT_3STRING_START(HDL);
-   REQ_3INT_3STRING_END(atoi(params[0]), atoi(params[1]), 0, params[2], "", 
"", HDL);
+   REQ_4INT_2STRING_START(HDL);
+   REQ_4INT_2STRING_END(atoi(params[0]), atoi(params[1]), atoi(params[2]), 
atoi(params[3]), "", "", HDL);
 #elif (TYPE == E_WM_IN)
-   INT3_STRING3(v, HDL);
-   e_bg_del(v->val1, v->val2, v->str1);
+   INT4_STRING2(v, HDL);
+   e_bg_del(v->val1, v->val2, v->val3, v->val4);
    e_bg_update();
    SAVE;
-   END_INT3_STRING3(v);
+   END_INT4_STRING2(v);
 #elif (TYPE == E_REMOTE_IN)
 #endif
 #undef HDL
@@ -2882,14 +2882,14 @@
 #elif (TYPE == E_REMOTE_OUT)
    REQ_NULL(HDL);
 #elif (TYPE == E_WM_IN)
-   SEND_INT3_STRING3_LIST(e_config->desktop_backgrounds, 
E_Config_Desktop_Background, cfbg, v, HDL);
+   SEND_INT4_STRING2_LIST(e_config->desktop_backgrounds, 
E_Config_Desktop_Background, cfbg, v, HDL);
    v->val1 = cfbg->container;
    v->val2 = cfbg->zone;
-   v->val3 = 0;
-   v->str1 = cfbg->desk;
-   v->str2 = cfbg->file;
-   v->str3 = "";
-   END_SEND_INT3_STRING3_LIST(v, E_IPC_OP_DESKTOP_BG_LIST_REPLY);
+   v->val3 = cfbg->desk_x;
+   v->val4 = cfbg->desk_y;
+   v->str1 = cfbg->file;
+   v->str2 = "";
+   END_SEND_INT4_STRING2_LIST(v, E_IPC_OP_DESKTOP_BG_LIST_REPLY);
 #elif (TYPE == E_REMOTE_IN)
 #endif
 #undef HDL
@@ -2900,10 +2900,10 @@
 #elif (TYPE == E_REMOTE_OUT)
 #elif (TYPE == E_WM_IN)
 #elif (TYPE == E_REMOTE_IN)
-   INT3_STRING3_LIST(v, HDL);
-   printf("REPLY: BG CONTAINER=%i ZONE=%i DESK=\"%s\" FILE=\"%s\"\n",
-         v->val1, v->val2, v->str1, v->str2);
-   END_INT3_STRING3_LIST(v);
+   INT4_STRING2_LIST(v, HDL);
+   printf("REPLY: BG CONTAINER=%i ZONE=%i DESK_X=%i DESK_Y=%i FILE=\"%s\"\n",
+         v->val1, v->val2, v->val3, v->val4, v->str1);
+   END_INT4_STRING2_LIST(v);
 #endif
 #undef HDL
 




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to