В пн, 2007-05-07 в 12:37 -0400, Enlightenment CVS написа:
> Enlightenment CVS committal
> 
> Author  : englebass
> Project : e17
> Module  : apps/e
> 
> Dir     : e17/apps/e/src/bin
> 
> 
> Modified Files:
>       e_shelf.c e_shelf.h 
> 
> 
> Log Message:
> Don't user timer to hide shelf.
What's the reason behind this?
> 
> ===================================================================
> RCS file: /cvs/e/e17/apps/e/src/bin/e_shelf.c,v
> retrieving revision 1.60
> retrieving revision 1.61
> diff -u -3 -r1.60 -r1.61
> --- e_shelf.c 6 May 2007 16:52:24 -0000       1.60
> +++ e_shelf.c 7 May 2007 16:37:54 -0000       1.61
> @@ -18,6 +18,7 @@
>  static void _e_shelf_cb_menu_items_append(void *data, E_Menu *mn);
>  static void _e_shelf_cb_mouse_down(void *data, Evas *evas, Evas_Object *obj, 
> void *event_info);
>  static void _e_shelf_cb_mouse_in(Ecore_Evas *ee);
> +static void _e_shelf_cb_mouse_out(Ecore_Evas *ee);
>  static int  _e_shelf_cb_id_sort(void *data1, void *data2);
>  static int  _e_shelf_cb_hide_timer(void *data);
>  static int  _e_shelf_cb_hide_animator(void *data);
> @@ -140,6 +141,7 @@
>     
>     evas_object_event_callback_add(es->o_event, EVAS_CALLBACK_MOUSE_DOWN, 
> _e_shelf_cb_mouse_down, es);
>     ecore_evas_callback_mouse_in_set(es->ee, _e_shelf_cb_mouse_in);
> +   ecore_evas_callback_mouse_out_set(es->ee, _e_shelf_cb_mouse_out);
>   
>     es->o_base = edje_object_add(es->evas);
>     es->name = evas_stringshare_add(name);
> @@ -271,29 +273,23 @@
>    E_OBJECT_CHECK(es);
>    E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE);
>  
> -  if ((!es->cfg->autohide) && (!es->hidden)) return;
> +  if (!es->cfg->autohide) return;
>  
> -  if (show)
> -    {
> -       if (!es->hide_timer) es->hide_timer = ecore_timer_add(0.3, 
> _e_shelf_cb_hide_timer, es);
> -
> -       if ((es->hidden) && (!es->instant_timer))
> -      {  
> -         es->hidden = 0;
> -         edje_object_signal_emit(es->o_base, "e,state,visible", "e");
> -         if (es->instant_delay >= 0.0)
> -           {
> -              if (!es->instant_timer)
> -                _e_shelf_cb_instant_hide_timer(es);
> -           }
> -         else
> -           {
> -              if (!es->hide_animator)
> -                es->hide_animator = 
> ecore_animator_add(_e_shelf_cb_hide_animator, es);
> -           }
> +  if ((show) && (es->hidden))
> +    {  
> +       es->hidden = 0;
> +       edje_object_signal_emit(es->o_base, "e,state,visible", "e");
> +       if (es->instant_delay >= 0.0)
> +      {
> +         _e_shelf_cb_instant_hide_timer(es);
> +      }
> +       else
> +      {
> +         if (!es->hide_animator)
> +           es->hide_animator = ecore_animator_add(_e_shelf_cb_hide_animator, 
> es);
>        }
>      }
> -  else if ((!show) && (es->cfg->autohide) && (!es->hidden) && 
> (!es->gadcon->editing))  
> +  else if ((!show) && (!es->hidden) && (!es->gadcon->editing))  
>      {
>         es->hidden = 1; 
>         edje_object_signal_emit(es->o_base, "e,state,hidden", "e");
> @@ -617,11 +613,6 @@
>  static void
>  _e_shelf_free(E_Shelf *es)
>  {
> -   if (es->hide_timer)
> -     {
> -     ecore_timer_del(es->hide_timer);
> -     es->hide_timer = NULL;
> -     }
>     if (es->hide_animator)
>       {
>       ecore_animator_del(es->hide_animator);
> @@ -632,7 +623,7 @@
>       ecore_timer_del(es->instant_timer);
>       es->instant_timer = NULL;
>       }
> -   
> +
>     if (es->menu)
>       {
>       e_menu_post_deactivate_callback_set(es->menu, NULL, NULL);
> @@ -1150,11 +1141,20 @@
>  
>     es = ecore_evas_data_get(ee, "e_shelf");
>     if (!es) return;
> -   es->last_in = ecore_time_get();
>     edje_object_signal_emit(es->o_base, "e,state,focused", "e");
>     e_shelf_toggle(es, 1);
>  }
>  
> +static void 
> +_e_shelf_cb_mouse_out(Ecore_Evas *ee)
> +{
> +   E_Shelf *es;
> +
> +   es = ecore_evas_data_get(ee, "e_shelf");
> +   if (!es) return;
> +   e_shelf_toggle(es, 0);
> +}
> +
>  static int
>  _e_shelf_cb_id_sort(void *data1, void *data2)
>  {
> @@ -1163,41 +1163,6 @@
>     es1 = data1;
>     es2 = data2;
>     return (es1->id) > (es2->id);
> -}
> -
> -static int 
> -_e_shelf_cb_hide_timer(void *data)
> -{
> -  Evas_Coord x, y, w, h, px, py;
> -
> -  E_Shelf *es = data;
> -
> -  evas_object_geometry_get(es->o_base, &x, &y, &w, &h);
> -  if (es->popup)
> -    ecore_x_pointer_xy_get(es->popup->evas_win, &px, &py);
> -  else
> -    ecore_x_pointer_xy_get(es->zone->black_win, &px, &py);
> -  
> -  if (E_INSIDE(px, py, x, y, w, h))
> -    {
> -      es->last_in = ecore_time_get();
> -      return 1;
> -    }
> -  else
> -    {
> -       if ((es->last_in + es->cfg->hide_timeout) < ecore_time_get()) 
> -      {
> -         e_shelf_toggle(es, 0);
> -         if (es->hide_timer)
> -           {    
> -              ecore_timer_del(es->hide_timer);
> -              es->hide_timer = NULL;
> -           }   
> -         return 0;
> -      }
> -       else
> -      return 1;
> -    }
>  }
>  
>  static int
> ===================================================================
> RCS file: /cvs/e/e17/apps/e/src/bin/e_shelf.h,v
> retrieving revision 1.21
> retrieving revision 1.22
> diff -u -3 -r1.21 -r1.22
> --- e_shelf.h 23 Apr 2007 17:21:38 -0000      1.21
> +++ e_shelf.h 7 May 2007 16:37:54 -0000       1.22
> @@ -37,10 +37,9 @@
>     Ecore_Animator      *hide_animator;
>     int                  hide_step;
>     int                  hidden_state_size;
> -   int                       hide_origin;
> +   int                  hide_origin;
>     float                instant_delay;
>     Ecore_Timer         *instant_timer;
> -   double               last_in; /* last time the pointer was in the shelf 
> */ 
>  };
>  
>  EAPI int              e_shelf_init(void);
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> enlightenment-cvs mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
-- 
Виктор Кожухаров /Viktor Kojouharov/

Attachment: signature.asc
Description: Това е цифрово подписана част от писмото

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to