Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        evhandlers.c 


Log Message:
Put duplicated code in function.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/evhandlers.c,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -3 -r1.131 -r1.132
--- evhandlers.c        19 Dec 2003 00:05:36 -0000      1.131
+++ evhandlers.c        21 Dec 2003 12:13:41 -0000      1.132
@@ -86,6 +86,16 @@
 }
 
 void
+TooltipsHandleEvent(void)
+{
+   if (ttip)
+      HideToolTip(ttip);
+   RemoveTimerEvent("TOOLTIP_TIMEOUT");
+   if (mode.tooltips)
+      DoIn("TOOLTIP_TIMEOUT", mode.tiptime, ToolTipTimeout, 0, NULL);
+}
+
+void
 HandleClientMessage(XEvent * ev)
 {
    EDBUG(5, "HandleClientMessage");
@@ -215,12 +225,7 @@
 
    EDBUG(5, "HandleMotion");
 
-   if (ttip)
-      HideToolTip(ttip);
-   RemoveTimerEvent("TOOLTIP_TIMEOUT");
-   if (mode.tooltips)
-      DoIn("TOOLTIP_TIMEOUT", mode.tiptime, ToolTipTimeout, 0, NULL);
-
+   TooltipsHandleEvent();
    EdgeHandleMotion(ev);
    mode.px = mode.x;
    mode.py = mode.y;
@@ -1389,11 +1394,7 @@
          }
      }
 
-   if (ttip)
-      HideToolTip(ttip);
-   RemoveTimerEvent("TOOLTIP_TIMEOUT");
-   if (mode.tooltips)
-      DoIn("TOOLTIP_TIMEOUT", mode.tiptime, ToolTipTimeout, 0, NULL);
+   TooltipsHandleEvent();
 
    if ((((float)(ev->xbutton.time - last_time) / 1000) <
        mode_double_click_time)
@@ -1546,13 +1547,9 @@
           EDBUG_RETURN_;
      }
 
-   if (ttip)
-      HideToolTip(ttip);
-   RemoveTimerEvent("TOOLTIP_TIMEOUT");
-   if (mode.tooltips)
-      DoIn("TOOLTIP_TIMEOUT", mode.tiptime, ToolTipTimeout, 0, NULL);
-
+   TooltipsHandleEvent();
    UnGrabTheButtons();
+
    win2 = WindowAtXY(ev->xbutton.x_root, ev->xbutton.y_root);
    win = ev->xbutton.window;
 
@@ -1775,12 +1772,7 @@
 
    EDBUG(5, "HandleMouseIn");
 
-   if (ttip)
-      HideToolTip(ttip);
-   RemoveTimerEvent("TOOLTIP_TIMEOUT");
-   if (mode.tooltips)
-      DoIn("TOOLTIP_TIMEOUT", mode.tiptime, ToolTipTimeout, 0, NULL);
-
+   TooltipsHandleEvent();
    EdgeHandleEnter(ev);
    win = ev->xcrossing.window;
    mode.context_win = win;
@@ -1842,11 +1834,7 @@
 
    EDBUG(5, "HandleMouseOut");
 
-   if (ttip)
-      HideToolTip(ttip);
-   RemoveTimerEvent("TOOLTIP_TIMEOUT");
-   if (mode.tooltips)
-      DoIn("TOOLTIP_TIMEOUT", mode.tiptime, ToolTipTimeout, 0, NULL);
+   TooltipsHandleEvent();
 
    EdgeHandleLeave(ev);
 




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to