Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        config.c tooltips.c 


Log Message:
Minor tooltip thingy (preparing to enable avoiding (un)mapping of unused bubbles).
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/config.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -3 -r1.59 -r1.60
--- config.c    8 Jul 2003 02:32:39 -0000       1.59
+++ config.c    11 Jul 2003 17:44:15 -0000      1.60
@@ -2837,8 +2837,7 @@
        switch (i1)
          {
          case CONFIG_CLOSE:
-            if ((drawiclass) && (bubble1) && (bubble2) && (bubble3)
-                && (bubble4) && (tclass) && (name))
+            if ((drawiclass) && (tclass) && (name))
                tt = CreateToolTip(name, drawiclass, bubble1, bubble2,
                                   bubble3, bubble4, tclass, distance,
                                   tooltiphelppic);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/tooltips.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -3 -r1.48 -r1.49
--- tooltips.c  22 May 2003 19:15:03 -0000      1.48
+++ tooltips.c  11 Jul 2003 17:44:15 -0000      1.49
@@ -28,102 +28,51 @@
              ImageClass * ic2, ImageClass * ic3, ImageClass * ic4,
              TextClass * tclass, int dist, ImageClass * tooltippic)
 {
+   int                 i;
    ToolTip            *tt;
 
    EDBUG(5, "CreateToolTip");
 
+   if (ic0 == NULL || ic1 == NULL || ic2 == NULL || ic3 == NULL || ic4 == NULL
+       || tclass == NULL)
+      EDBUG_RETURN((ToolTip *) NULL);
+
    tt = Emalloc(sizeof(ToolTip));
    tt->name = duplicate(name);
    tt->iclass = ic0;
-   tt->tooltippic = NULL;
-
-   if (!tt->iclass)
-     {
-       if (tt->name)
-          Efree(tt->name);
-       if (tt)
-          Efree(tt);
-       EDBUG_RETURN((ToolTip *) NULL);
-     }
-
+   if (ic0)
+      ic0->ref_count++;
    tt->s_iclass[0] = ic1;
-   if (!tt->s_iclass[0])
-     {
-       if (tt->name)
-          Efree(tt->name);
-       if (tt)
-          Efree(tt);
-       EDBUG_RETURN((ToolTip *) NULL);
-     }
-
    tt->s_iclass[1] = ic2;
-   if (!tt->s_iclass[1])
-     {
-       if (tt->name)
-          Efree(tt->name);
-       if (tt)
-          Efree(tt);
-       EDBUG_RETURN((ToolTip *) NULL);
-     }
-
    tt->s_iclass[2] = ic3;
-   if (!tt->s_iclass[2])
-     {
-       if (tt->name)
-          Efree(tt->name);
-       if (tt)
-          Efree(tt);
-       EDBUG_RETURN((ToolTip *) NULL);
-     }
-
    tt->s_iclass[3] = ic4;
-   if (!tt->s_iclass[3])
-     {
-       if (tt->name)
-          Efree(tt->name);
-       if (tt)
-          Efree(tt);
-       EDBUG_RETURN((ToolTip *) NULL);
-     }
-
    tt->tclass = tclass;
-   if (!tt->tclass)
-     {
-       if (tt->name)
-          Efree(tt->name);
-       if (tt)
-          Efree(tt);
-       EDBUG_RETURN((ToolTip *) NULL);
-     }
-
+   if (tclass)
+      tclass->ref_count++;
+   tt->tooltippic = tooltippic;
    if (tooltippic)
-     {
-       tt->tooltippic = tooltippic;
-       tooltippic->ref_count++;
-     }
+      tooltippic->ref_count++;
 
    tt->dist = dist;
    tt->win = ECreateWindow(root.win, -10, -100, 1, 1, 1);
    tt->iwin = ECreateWindow(tt->win, -10, -100, 1, 1, 1);
-   tt->s_win[0] = ECreateWindow(root.win, -10, -100, 8, 8, 1);
-   tt->s_win[1] = ECreateWindow(root.win, -10, -100, 16, 16, 1);
-   tt->s_win[2] = ECreateWindow(root.win, -10, -100, 24, 24, 1);
-   tt->s_win[3] = ECreateWindow(root.win, -10, -100, 32, 32, 1);
-   tt->visible = 0;
 
-   if (ic0)
-      ic0->ref_count++;
-   if (ic1)
-      ic1->ref_count++;
-   if (ic2)
-      ic2->ref_count++;
-   if (ic3)
-      ic3->ref_count++;
-   if (ic4)
-      ic4->ref_count++;
-   if (tclass)
-      tclass->ref_count++;
+   for (i = 0; i < 4; i++)
+     {
+       Window              win;
+
+       win = 0;
+       if (tt->s_iclass[i])
+         {
+            int                 wh = (i + 1) * 8;
+
+            win = ECreateWindow(root.win, -10, -100, wh, wh, 1);
+            tt->s_iclass[i]->ref_count++;
+         }
+       tt->s_win[i] = win;
+     }
 
+   tt->visible = 0;
    tt->ref_count = 0;
 
    EDBUG_RETURN(tt);




-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to