Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
      Tag: branch-exp
        E.h actions.c dialog.c ewin-ops.c ewins.c finders.c hints.c 
        icccm.c ipc.c menus.c pager.c snaps.c 


Log Message:
Cleanups.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.314.2.31
retrieving revision 1.314.2.32
diff -u -3 -r1.314.2.31 -r1.314.2.32
--- E.h 27 Aug 2004 21:31:51 -0000      1.314.2.31
+++ E.h 27 Aug 2004 23:27:41 -0000      1.314.2.32
@@ -839,11 +839,8 @@
    char                focusclick;
    char                neverfocus;
    char                no_actions;
-   void               *data;
-   Menu               *menu;
+   void               *data;   /* Data hook for internal windows */
    Window              shownmenu;
-   Dialog             *dialog;
-   Pager              *pager;
    int                 area_x;
    int                 area_y;
    char               *session_id;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/actions.c,v
retrieving revision 1.174.2.12
retrieving revision 1.174.2.13
diff -u -3 -r1.174.2.12 -r1.174.2.13
--- actions.c   26 Aug 2004 22:12:47 -0000      1.174.2.12
+++ actions.c   27 Aug 2004 23:27:41 -0000      1.174.2.13
@@ -1463,146 +1463,142 @@
             method = ARRANGE_BY_POSITION;
          }
      }
+
    lst = EwinListGetAll(&num);
-   if (lst)
+   if (!lst)
+      goto done;
+
+   fixed = NULL;
+   floating = Emalloc(sizeof(RectBox) * num);
+   ret = Emalloc(sizeof(RectBox) * (num));
+   j = 0;
+   k = 0;
+   for (i = 0; i < num; i++)
      {
-       fixed = NULL;
-       floating = Emalloc(sizeof(RectBox) * num);
-       ret = Emalloc(sizeof(RectBox) * (num));
-       j = 0;
-       k = 0;
-       for (i = 0; i < num; i++)
-         {
-            ewin = lst[i];
-            if ((ewin->desktop == desks.current)
-                && (!ewin->sticky)
-                && (!ewin->floating)
-                && (!ewin->iconified)
-                && (!ewin->ignorearrange)
-                && (!ewin->menu)
-                && (ewin->area_x ==
-                    desks.desk[ewin->desktop].current_area_x)
-                && (ewin->area_y == desks.desk[ewin->desktop].current_area_y))
+       ewin = lst[i];
+       if ((ewin->desktop == desks.current) &&
+           (!ewin->sticky) && (!ewin->floating) && (!ewin->iconified) &&
+           (!ewin->ignorearrange) && (ewin->type != EWIN_TYPE_MENU) &&
+           (ewin->area_x == desks.desk[ewin->desktop].current_area_x) &&
+           (ewin->area_y == desks.desk[ewin->desktop].current_area_y))
+         {
+            floating[j].data = lst[i];
+            floating[j].x = ewin->x;
+            floating[j].y = ewin->y;
+            floating[j].w = ewin->w;
+            floating[j].p = ewin->layer;
+            floating[j++].h = ewin->h;
+         }
+       else if (((ewin->desktop == desks.current) || (ewin->sticky)) &&
+                (ewin->layer != 4) && (ewin->layer != 0) &&
+                (ewin->type != EWIN_TYPE_MENU))
+         {
+            fixed = Erealloc(fixed, sizeof(RectBox) * (k + 1));
+            fixed[k].data = lst[i];
+            fixed[k].x = ewin->x;
+            fixed[k].y = ewin->y;
+            fixed[k].w = ewin->w;
+            fixed[k].h = ewin->h;
+            if (fixed[k].x < 0)
               {
-                 floating[j].data = lst[i];
-                 floating[j].x = ewin->x;
-                 floating[j].y = ewin->y;
-                 floating[j].w = ewin->w;
-                 floating[j].p = ewin->layer;
-                 floating[j++].h = ewin->h;
+                 fixed[k].x += fixed[k].w;
+                 fixed[k].x = 0;
               }
-            else if (((ewin->desktop == desks.current)
-                      || (ewin->sticky))
-                     && (ewin->layer != 4)
-                     && (ewin->layer != 0) && (!ewin->menu))
+            if ((fixed[k].x + fixed[k].w) > VRoot.w)
+               fixed[k].w = VRoot.w - fixed[k].x;
+            if (fixed[k].y < 0)
               {
-                 fixed = Erealloc(fixed, sizeof(RectBox) * (k + 1));
-                 fixed[k].data = lst[i];
-                 fixed[k].x = ewin->x;
-                 fixed[k].y = ewin->y;
-                 fixed[k].w = ewin->w;
-                 fixed[k].h = ewin->h;
-                 if (fixed[k].x < 0)
-                   {
-                      fixed[k].x += fixed[k].w;
-                      fixed[k].x = 0;
-                   }
-                 if ((fixed[k].x + fixed[k].w) > VRoot.w)
-                    fixed[k].w = VRoot.w - fixed[k].x;
-                 if (fixed[k].y < 0)
-                   {
-                      fixed[k].y += fixed[k].h;
-                      fixed[k].y = 0;
-                   }
-                 if ((fixed[k].y + fixed[k].h) > VRoot.h)
-                    fixed[k].h = VRoot.h - fixed[k].y;
-                 if ((fixed[k].w > 0) && (fixed[k].h > 0))
-                   {
-                      if (!ewin->never_use_area)
-                         fixed[k].p = ewin->layer;
-                      else
-                         fixed[k].p = 99;
-                      k++;
-                   }
+                 fixed[k].y += fixed[k].h;
+                 fixed[k].y = 0;
+              }
+            if ((fixed[k].y + fixed[k].h) > VRoot.h)
+               fixed[k].h = VRoot.h - fixed[k].y;
+            if ((fixed[k].w > 0) && (fixed[k].h > 0))
+              {
+                 if (!ewin->never_use_area)
+                    fixed[k].p = ewin->layer;
+                 else
+                    fixed[k].p = 99;
+                 k++;
               }
          }
+     }
 
-       blst = (Button **) ListItemType(&num, LIST_TYPE_BUTTON);
-       if (blst)
+   blst = (Button **) ListItemType(&num, LIST_TYPE_BUTTON);
+   if (blst)
+     {
+       fixed = Erealloc(fixed, sizeof(RectBox) * (num + k));
+       ret = Erealloc(ret, sizeof(RectBox) * ((num + j) + 1 + k));
+       for (i = 0; i < num; i++)
          {
-            fixed = Erealloc(fixed, sizeof(RectBox) * (num + k));
-            ret = Erealloc(ret, sizeof(RectBox) * ((num + j) + 1 + k));
-            for (i = 0; i < num; i++)
-              {
-                 if (ButtonGetInfo(blst[i], &fixed[k], desks.current))
-                    continue;
+            if (ButtonGetInfo(blst[i], &fixed[k], desks.current))
+               continue;
 
-                 if (fixed[k].x < 0)
-                   {
-                      fixed[k].x += fixed[k].w;
-                      fixed[k].x = 0;
-                   }
-                 if ((fixed[k].x + fixed[k].w) > VRoot.w)
-                    fixed[k].w = VRoot.w - fixed[k].x;
-                 if (fixed[k].y < 0)
-                   {
-                      fixed[k].y += fixed[k].h;
-                      fixed[k].y = 0;
-                   }
-                 if ((fixed[k].y + fixed[k].h) > VRoot.h)
-                    fixed[k].h = VRoot.h - fixed[k].y;
-                 if ((fixed[k].w <= 0) || (fixed[k].h <= 0))
-                    continue;
-
-                 if (fixed[k].p)       /* Sticky */
-                    fixed[k].p = 50;
-                 else
-                    fixed[k].p = 0;
-                 k++;
+            if (fixed[k].x < 0)
+              {
+                 fixed[k].x += fixed[k].w;
+                 fixed[k].x = 0;
               }
-            Efree(blst);
+            if ((fixed[k].x + fixed[k].w) > VRoot.w)
+               fixed[k].w = VRoot.w - fixed[k].x;
+            if (fixed[k].y < 0)
+              {
+                 fixed[k].y += fixed[k].h;
+                 fixed[k].y = 0;
+              }
+            if ((fixed[k].y + fixed[k].h) > VRoot.h)
+               fixed[k].h = VRoot.h - fixed[k].y;
+            if ((fixed[k].w <= 0) || (fixed[k].h <= 0))
+               continue;
+
+            if (fixed[k].p)    /* Sticky */
+               fixed[k].p = 50;
+            else
+               fixed[k].p = 0;
+            k++;
          }
+       Efree(blst);
+     }
 
-       ArrangeRects(fixed, k, floating, j, ret, 0, 0, VRoot.w, VRoot.h, method,
-                    0);
+   ArrangeRects(fixed, k, floating, j, ret, 0, 0, VRoot.w, VRoot.h, method, 0);
 
-       for (i = 0; i < (j + k); i++)
+   for (i = 0; i < (j + k); i++)
+     {
+       if (ret[i].data)
          {
-            if (ret[i].data)
+            if (doslide)
               {
-                 if (doslide)
+                 ewin = (EWin *) ret[i].data;
+                 if (ewin)
                    {
-                      ewin = (EWin *) ret[i].data;
-                      if (ewin)
+                      if ((ewin->x != ret[i].x) || (ewin->y != ret[i].y))
                         {
-                           if ((ewin->x != ret[i].x) || (ewin->y != ret[i].y))
-                             {
-                                SlideEwinTo(ewin, ewin->x, ewin->y, ret[i].x,
-                                            ret[i].y, speed);
-                                ICCCM_Configure(ewin);
-                             }
+                           SlideEwinTo(ewin, ewin->x, ewin->y, ret[i].x,
+                                       ret[i].y, speed);
+                           ICCCM_Configure(ewin);
                         }
                    }
-                 else
+              }
+            else
+              {
+                 ewin = (EWin *) ret[i].data;
+                 if (ewin)
                    {
-                      ewin = (EWin *) ret[i].data;
-                      if (ewin)
-                        {
-                           if ((ewin->x != ret[i].x) || (ewin->y != ret[i].y))
-                              MoveEwin((EWin *) ret[i].data, ret[i].x,
-                                       ret[i].y);
-                        }
+                      if ((ewin->x != ret[i].x) || (ewin->y != ret[i].y))
+                         MoveEwin((EWin *) ret[i].data, ret[i].x, ret[i].y);
                    }
               }
          }
-
-       if (fixed)
-          Efree(fixed);
-       if (ret)
-          Efree(ret);
-       if (floating)
-          Efree(floating);
      }
+
+   if (fixed)
+      Efree(fixed);
+   if (ret)
+      Efree(ret);
+   if (floating)
+      Efree(floating);
+
+ done:
    return 0;
 }
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/dialog.c,v
retrieving revision 1.91.2.7
retrieving revision 1.91.2.8
diff -u -3 -r1.91.2.7 -r1.91.2.8
--- dialog.c    22 Aug 2004 20:03:49 -0000      1.91.2.7
+++ dialog.c    27 Aug 2004 23:27:42 -0000      1.91.2.8
@@ -446,7 +446,7 @@
 static void
 DialogEwinMoveResize(EWin * ewin, int resize)
 {
-   Dialog             *d = ewin->dialog;
+   Dialog             *d = ewin->data;
 
    if (!d)
       return;
@@ -466,14 +466,14 @@
 static void
 DialogEwinClose(EWin * ewin)
 {
-   DialogClose(ewin->dialog);
-   ewin->dialog = NULL;
+   DialogClose(ewin->data);
+   ewin->data = NULL;
 }
 
 static void
 DialogEwinInit(EWin * ewin, void *ptr)
 {
-   ewin->dialog = (Dialog *) ptr;
+   ewin->data = ptr;
    ewin->MoveResize = DialogEwinMoveResize;
    ewin->Refresh = DialogEwinRefresh;
    ewin->Close = DialogEwinClose;
@@ -2474,7 +2474,7 @@
    ewins = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
      {
-       if (ewins[i]->dialog == d)
+       if ((Dialog *) (ewins[i]->data) == d)
           return ewins[i];
      }
 
@@ -2492,7 +2492,7 @@
    ewins = EwinListGetAll(&num);
    for (i = n = 0; i < num; i++)
      {
-       if (ewins[i]->dialog)
+       if (ewins[i]->type == EWIN_TYPE_DIALOG)
           n++;
      }
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/ewin-ops.c,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -3 -r1.1.2.2 -r1.1.2.3
--- ewin-ops.c  27 Aug 2004 21:31:53 -0000      1.1.2.2
+++ ewin-ops.c  27 Aug 2004 23:27:43 -0000      1.1.2.3
@@ -119,7 +119,7 @@
                  tmpy = y[i];
                  tmpw = ewin[i]->client.w;
                  tmph = ewin[i]->client.h;
-                 if (ewin[i]->menu)
+                 if (ewin[i]->type == EWIN_TYPE_MENU)
                     EMoveWindow(disp, ewin[i]->win, tmpx, tmpy);
                  else
                     DrawEwinShape(ewin[i], 0, tmpx, tmpy, tmpw, tmph,
@@ -725,7 +725,7 @@
        XChangeWindowAttributes(disp, ewin->client.win, CWWinGravity, &att);
        EwinBorderMinShadeSize(ewin, &b, &d);
        a = ewin->w;
-       if ((Conf.animate_shading) || (ewin->menu))
+       if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
           for (k = 0; k <= 1024; k += spd)
             {
                gettimeofday(&timev1, NULL);
@@ -777,7 +777,7 @@
        a = ewin->w;
        c = ewin->x;
        d = ewin->x + ewin->w - b;
-       if ((Conf.animate_shading) || (ewin->menu))
+       if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
           for (k = 0; k <= 1024; k += spd)
             {
                gettimeofday(&timev1, NULL);
@@ -830,7 +830,7 @@
        a = ewin->h;
        EwinBorderMinShadeSize(ewin, &b, &d);
        b = d;
-       if ((Conf.animate_shading) || (ewin->menu))
+       if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
           for (k = 0; k <= 1024; k += spd)
             {
                gettimeofday(&timev1, NULL);
@@ -884,7 +884,7 @@
        b = d;
        c = ewin->y;
        d = ewin->y + ewin->h - b;
-       if ((Conf.animate_shading) || (ewin->menu))
+       if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
           for (k = 0; k <= 1024; k += spd)
             {
                gettimeofday(&timev1, NULL);
@@ -997,7 +997,7 @@
                          ewin->client.w, ewin->client.h);
        EMapWindow(disp, ewin->client.win);
        EMapWindow(disp, ewin->win_container);
-       if ((Conf.animate_shading) || (ewin->menu))
+       if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
           for (k = 0; k <= 1024; k += spd)
             {
                gettimeofday(&timev1, NULL);
@@ -1054,7 +1054,7 @@
                          ewin->client.h);
        EMapWindow(disp, ewin->client.win);
        EMapWindow(disp, ewin->win_container);
-       if ((Conf.animate_shading) || (ewin->menu))
+       if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
           for (k = 0; k <= 1024; k += spd)
             {
                gettimeofday(&timev1, NULL);
@@ -1107,7 +1107,7 @@
                          ewin->client.w, ewin->client.h);
        EMapWindow(disp, ewin->client.win);
        EMapWindow(disp, ewin->win_container);
-       if ((Conf.animate_shading) || (ewin->menu))
+       if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
           for (k = 0; k <= 1024; k += spd)
             {
                gettimeofday(&timev1, NULL);
@@ -1164,7 +1164,7 @@
                          ewin->client.h);
        EMapWindow(disp, ewin->client.win);
        EMapWindow(disp, ewin->win_container);
-       if ((Conf.animate_shading) || (ewin->menu))
+       if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
           for (k = 0; k <= 1024; k += spd)
             {
                gettimeofday(&timev1, NULL);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/ewins.c,v
retrieving revision 1.1.2.7
retrieving revision 1.1.2.8
diff -u -3 -r1.1.2.7 -r1.1.2.8
--- ewins.c     27 Aug 2004 21:31:53 -0000      1.1.2.7
+++ ewins.c     27 Aug 2004 23:27:43 -0000      1.1.2.8
@@ -337,7 +337,7 @@
 #endif
 
    ewin = Mode.focuswin;
-   if (ewin && !ewin->menu)
+   if (ewin && ewin->type != EWIN_TYPE_MENU)
       EDBUG_RETURN(ewin);
 
    return NULL;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/finders.c,v
retrieving revision 1.31.2.1
retrieving revision 1.31.2.2
diff -u -3 -r1.31.2.1 -r1.31.2.2
--- finders.c   9 Aug 2004 22:35:20 -0000       1.31.2.1
+++ finders.c   27 Aug 2004 23:27:43 -0000      1.31.2.2
@@ -166,24 +166,6 @@
    EDBUG_RETURN(NULL);
 }
 
-EWin               *
-FindEwinByMenu(Menu * m)
-{
-   EWin               *const *ewins;
-   int                 i, num;
-
-   EDBUG(6, "FindEwinByMenu");
-
-   ewins = EwinListGetAll(&num);
-   for (i = 0; i < num; i++)
-     {
-       if (ewins[i]->menu == m)
-          return ewins[i];
-     }
-
-   EDBUG_RETURN(NULL);
-}
-
 Group             **
 ListWinGroups(EWin * ewin, char group_select, int *num)
 {
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/hints.c,v
retrieving revision 1.25.2.2
retrieving revision 1.25.2.3
diff -u -3 -r1.25.2.2 -r1.25.2.3
--- hints.c     23 Aug 2004 21:14:43 -0000      1.25.2.2
+++ hints.c     27 Aug 2004 23:27:43 -0000      1.25.2.3
@@ -191,7 +191,7 @@
    GNOME_SetEwinDesk(ewin);
 #endif
 #if ENABLE_EWMH
-   if (!ewin->menu)
+   if (ewin->type != EWIN_TYPE_MENU)
       EWMH_SetWindowDesktop(ewin);
 #endif
    EDBUG_RETURN_;
@@ -216,7 +216,7 @@
    GNOME_SetHint(ewin);
 #endif
 #if ENABLE_EWMH
-   if (!ewin->menu)
+   if (ewin->type != EWIN_TYPE_MENU)
       EWMH_SetWindowState(ewin);
 #endif
    EDBUG_RETURN_;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/icccm.c,v
retrieving revision 1.76.2.3
retrieving revision 1.76.2.4
diff -u -3 -r1.76.2.3 -r1.76.2.4
--- icccm.c     26 Aug 2004 22:06:38 -0000      1.76.2.3
+++ icccm.c     27 Aug 2004 23:27:43 -0000      1.76.2.4
@@ -339,7 +339,7 @@
    xwc.y = 0;
    XConfigureWindow(disp, ewin->client.win, CWX | CWY | CWWidth | CWHeight,
                    &xwc);
-   if ((ewin->menu) || (ewin->dialog))
+   if ((ewin->type == EWIN_TYPE_MENU) || (ewin->type == EWIN_TYPE_DIALOG))
       EDBUG_RETURN_;
 
    ev.type = ConfigureNotify;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ipc.c,v
retrieving revision 1.174.2.16
retrieving revision 1.174.2.17
diff -u -3 -r1.174.2.16 -r1.174.2.17
--- ipc.c       26 Aug 2004 23:21:00 -0000      1.174.2.16
+++ ipc.c       27 Aug 2004 23:27:43 -0000      1.174.2.17
@@ -1032,81 +1032,6 @@
 }
 
 static void
-IPC_InternalList(const char *params, Client * c)
-{
-   char                buf[FILEPATH_LEN_MAX];
-   char                buf2[FILEPATH_LEN_MAX];
-
-   buf[0] = 0;
-   buf2[0] = 0;
-
-   if (params)
-     {
-       EWin               *const *lst;
-       int                 num, i;
-
-       lst = EwinListGetAll(&num);
-       if (!strcmp(params, "pagers"))
-         {
-            for (i = 0; i < num; i++)
-              {
-                 if (lst[i]->pager)
-                   {
-                      Esnprintf(buf2, sizeof(buf2), "%8x\n",
-                                (unsigned)lst[i]->client.win);
-                      strcat(buf, buf2);
-                   }
-              }
-         }
-       else if (!strcmp(params, "menus"))
-         {
-            for (i = 0; i < num; i++)
-              {
-                 if (lst[i]->menu)
-                   {
-                      Esnprintf(buf2, sizeof(buf2), "%8x\n",
-                                (unsigned)lst[i]->client.win);
-                      strcat(buf, buf2);
-                   }
-              }
-         }
-       else if (!strcmp(params, "dialogs"))
-         {
-            for (i = 0; i < num; i++)
-              {
-                 if (lst[i]->dialog)
-                   {
-                      Esnprintf(buf2, sizeof(buf2), "%8x\n",
-                                (unsigned)lst[i]->client.win);
-                      strcat(buf, buf2);
-                   }
-              }
-         }
-       else if (!strcmp(params, "internal_ewin"))
-         {
-            for (i = 0; i < num; i++)
-              {
-                 if (lst[i]->internal)
-                   {
-                      Esnprintf(buf2, sizeof(buf2), "%8x\n",
-                                (unsigned)lst[i]->client.win);
-                      strcat(buf, buf2);
-                   }
-              }
-         }
-       else
-         {
-            Esnprintf(buf, sizeof(buf),
-                      "Error: unknown internal list specified");
-         }
-     }
-   if (buf[0])
-      CommsSend(c, buf);
-   else
-      CommsSend(c, "");
-}
-
-static void
 IPC_Pager(const char *params, Client * c)
 {
    char                buf[FILEPATH_LEN_MAX];
@@ -3762,14 +3687,6 @@
     "use \"pager title <on/off>\" to toggle title display in the pager\n"
     "use \"pager scanrate <#>\" to toggle number of line update " "per second"},
    {
-    IPC_InternalList,
-    "internal_list", "il",
-    "Retrieve a list of internal items",
-    "use \"internal_list <pagers/menus/dialogs/internal_ewin>\"\n"
-    "to retrieve a list of various internal window types.\n"
-    "(note that listing internal_ewin  doesn't retrieve "
-    "dialogs currently)\n"},
-   {
     IPC_SetFocus,
     "set_focus", "wf",
     "Set/Retrieve focused window",
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/menus.c,v
retrieving revision 1.147.2.9
retrieving revision 1.147.2.10
diff -u -3 -r1.147.2.9 -r1.147.2.10
--- menus.c     25 Aug 2004 21:56:58 -0000      1.147.2.9
+++ menus.c     27 Aug 2004 23:27:43 -0000      1.147.2.10
@@ -151,6 +151,24 @@
    EDBUG_RETURN(ewin);
 }
 
+EWin               *
+FindEwinByMenu(Menu * m)
+{
+   EWin               *const *ewins;
+   int                 i, num;
+
+   EDBUG(6, "FindEwinByMenu");
+
+   ewins = EwinListGetAll(&num);
+   for (i = 0; i < num; i++)
+     {
+       if (ewins[i]->data == (void *)m)
+          return ewins[i];
+     }
+
+   EDBUG_RETURN(NULL);
+}
+
 void
 MenuHide(Menu * m)
 {
@@ -180,7 +198,7 @@
 static void
 MenuEwinMoveResize(EWin * ewin, int resize __UNUSED__)
 {
-   Menu               *m = ewin->menu;
+   Menu               *m = ewin->data;
 
    if (!m)
       return;
@@ -201,20 +219,20 @@
 static void
 MenuEwinClose(EWin * ewin)
 {
-   if (ewin->menu == active_menu)
+   if ((Menu *) (ewin->data) == active_menu)
      {
        UngrabKeyboard();
        active_menu = NULL;
        active_item = NULL;
      }
 
-   ewin->menu = NULL;
+   ewin->data = NULL;
 }
 
 static void
 MenuEwinInit(EWin * ewin, void *ptr)
 {
-   ewin->menu = (Menu *) ptr;
+   ewin->data = ptr;
    ewin->MoveResize = MenuEwinMoveResize;
    ewin->Refresh = MenuEwinRefresh;
    ewin->Close = MenuEwinClose;
@@ -1504,10 +1522,10 @@
                    {
                       if (ww == ewin->bits[i].win)
                         {
-                           if ((ewin->border->part[i].flags & FLAG_TITLE)
-                               && (ewin->menu))
+                           if ((ewin->border->part[i].flags & FLAG_TITLE) &&
+                               (ewin->type == EWIN_TYPE_MENU))
                              {
-                                ewin->menu->stuck = 1;
+                                ((Menu *) (ewin->data))->stuck = 1;
                                 i = ewin->border->num_winparts;
                              }
                         }
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/pager.c,v
retrieving revision 1.103.2.10
retrieving revision 1.103.2.11
diff -u -3 -r1.103.2.10 -r1.103.2.11
--- pager.c     27 Aug 2004 21:31:54 -0000      1.103.2.10
+++ pager.c     27 Aug 2004 23:27:44 -0000      1.103.2.11
@@ -179,7 +179,7 @@
 static void
 PagerEwinMoveResize(EWin * ewin, int resize)
 {
-   Pager              *p = ewin->pager;
+   Pager              *p = ewin->data;
    int                 w, h;
    int                 ax, ay, cx, cy;
    char                pq;
@@ -256,17 +256,19 @@
 static void
 PagerEwinClose(EWin * ewin)
 {
-   PagerDestroy(ewin->pager);
-   ewin->pager = NULL;
+   PagerDestroy(ewin->data);
+   ewin->data = NULL;
 }
 
 static void
 PagerEwinInit(EWin * ewin, void *ptr)
 {
-   ewin->pager = (Pager *) ptr;
+   ewin->data = ptr;
    ewin->MoveResize = PagerEwinMoveResize;
    ewin->Refresh = PagerEwinRefresh;
    ewin->Close = PagerEwinClose;
+
+   ewin->props.autosave = 1;
 }
 
 void
@@ -1561,7 +1563,7 @@
    gwins = ListWinGroupMembersForEwin(ewin, ACTION_MOVE, Mode.nogroup, &num);
    for (i = 0; i < num; i++)
      {
-       if (gwins[i]->pager || gwins[i]->fixedpos)
+       if (gwins[i]->type == EWIN_TYPE_PAGER || gwins[i]->fixedpos)
           continue;
 
        if (newdesk)
@@ -1633,7 +1635,8 @@
        if (!FindItem((char *)p->hi_ewin, 0, LIST_FINDBY_POINTER,
                      LIST_TYPE_EWIN))
           p->hi_ewin = NULL;
-       if ((!p->hi_ewin) || (p->hi_ewin->pager) || (p->hi_ewin->fixedpos))
+       if ((!p->hi_ewin) ||
+           (p->hi_ewin->type == EWIN_TYPE_PAGER) || (p->hi_ewin->fixedpos))
           break;
 
        PagerEwinMove(p, p);
@@ -1682,7 +1685,7 @@
    else if ((int)ev->xbutton.button == Conf.pagers.win_button)
      {
        ewin = EwinInPagerAt(p, px, py);
-       if ((ewin) && (!ewin->pager))
+       if ((ewin) && (ewin->type != EWIN_TYPE_PAGER))
          {
             Window              dw;
             int                 wx, wy, ww, wh, ax, ay, cx, cy;
@@ -1763,9 +1766,9 @@
 
             /* Find which pager or iconbox we are in (if any) */
             ewin = GetEwinPointerInClient();
-            if ((ewin) && (ewin->pager))
+            if ((ewin) && (ewin->type == EWIN_TYPE_PAGER))
               {
-                 PagerEwinMove(p, ewin->pager);
+                 PagerEwinMove(p, ewin->data);
               }
             else if ((ewin) && (ewin->type == EWIN_TYPE_ICONBOX))
               {
@@ -1780,7 +1783,7 @@
                                                     Mode.nogroup, &num);
                  for (i = 0; i < num; i++)
                    {
-                      if (!gwins[i]->pager)
+                      if (gwins[i]->type != EWIN_TYPE_PAGER)
                         {
                            MoveEwin(gwins[i], gwin_px[i], gwin_py[i]);
                            EwinIconify(gwins[i]);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/snaps.c,v
retrieving revision 1.72.2.2
retrieving revision 1.72.2.3
diff -u -3 -r1.72.2.2 -r1.72.2.3
--- snaps.c     27 Aug 2004 21:31:54 -0000      1.72.2.2
+++ snaps.c     27 Aug 2004 23:27:44 -0000      1.72.2.3
@@ -1258,7 +1258,7 @@
 void
 RememberImportantInfoForEwin(EWin * ewin)
 {
-   if (!ewin->props.autosave && !ewin->pager)
+   if (!ewin->props.autosave)
       return;
 
    if (EventDebug(EDBUG_TYPE_SNAPS))




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to