Enlightenment CVS committal

Author  : metrics
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/modules/ibar


Modified Files:
        e_mod_main.c 


Log Message:
Allow dropping to the end location for autoscrolling ibars.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/modules/ibar/e_mod_main.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -3 -r1.158 -r1.159
--- e_mod_main.c        17 Nov 2006 07:05:45 -0000      1.158
+++ e_mod_main.c        18 Nov 2006 04:56:12 -0000      1.159
@@ -531,7 +531,7 @@
 {
    Evas_List *l;
    IBar_Icon *ic;
-   
+
    for (l = b->icons; l; l = l->next)
      {
         Evas_Coord dx, dy, dw, dh;
@@ -1088,6 +1088,27 @@
    evas_object_geometry_get(inst->ibar->o_box, &xx, &yy, NULL, NULL);
    e_box_align_pixel_offset_get(inst->gcc->o_box, &ox, &oy);
    ic = _ibar_icon_at_coord(inst->ibar, x + xx + ox, y + yy + oy);
+
+   /* This handles autoscrolling bars that would otherwise prevent us
+    * from dropping in the very last spot in the ibar. This is not
+    * necessarily a good way to solve the problem however it is by far
+    * the simplest. */
+   if (inst->gcc->autoscroll && ic)
+     {
+        Evas_Coord ix, iy, iw, ih;
+        double ax,ay;
+
+        e_box_align_get(inst->gcc->o_box, &ax, &ay);
+        if (e_box_orientation_get(inst->ibar->o_box))
+          {
+             if (ax < .01) ic = NULL;
+          }
+        else
+          {
+             if (ay < .01) ic = NULL;
+          }
+     }
+
    inst->ibar->ic_drop_before = ic;
    if (ic)
      {



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to