- fix ui hang problem (freeze / thaw)
authorcodewarrior <codewarrior>
Wed, 19 Oct 2005 15:41:23 +0000 (15:41 +0000)
committercodewarrior <codewarrior@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 19 Oct 2005 15:41:23 +0000 (15:41 +0000)
SVN revision: 17684

src/bin/e_fileman.c
src/bin/e_fileman_smart.c

index 42bbc44..551b4af 100644 (file)
@@ -18,6 +18,7 @@ static void _e_fileman_reconf_cb(void *data, int type, void *event);
 static void _e_fileman_cb_resize(E_Win *win);
 static void _e_fileman_cb_delete(E_Win *win);
 static void _e_fileman_vscrollbar_show_cb(void *data, Evas_Object *obj, void *ev);
+static void _e_fileman_vscrollbar_hide_cb(void *data, Evas_Object *obj, void *ev);
 static void _e_fileman_free(E_Fileman *fileman);
 
 E_Fileman *
@@ -70,6 +71,7 @@ e_fileman_new(E_Container *con)
    e_scrollbar_direction_set(fileman->vscrollbar, E_SCROLLBAR_VERTICAL);
    e_scrollbar_callback_drag_add(fileman->vscrollbar, _e_fileman_vscrollbar_drag_cb, fileman);
    evas_object_event_callback_add(fileman->vscrollbar, EVAS_CALLBACK_SHOW, _e_fileman_vscrollbar_show_cb,fileman);
+   evas_object_event_callback_add(fileman->vscrollbar, EVAS_CALLBACK_HIDE, _e_fileman_vscrollbar_show_cb,fileman);
 
    e_win_resize_callback_set(fileman->win, _e_fileman_cb_resize);
    e_win_resize(fileman->win, 640, 480);
@@ -193,5 +195,15 @@ _e_fileman_vscrollbar_show_cb(void *data, Evas_Object *obj, void *ev)
    
    fileman = data;
    
-   e_fm_thaw(fileman->smart);      
+   e_fm_thaw(fileman->smart);
+}
+
+static void
+_e_fileman_vscrollbar_hide_cb(void *data, Evas_Object *obj, void *ev)
+{
+   E_Fileman *fileman;
+   
+   fileman = data;
+   
+   e_fm_thaw(fileman->smart);
 }
index a4c59b5..f009719 100644 (file)
@@ -455,7 +455,7 @@ e_fm_freeze(Evas_Object *object)
    
    if ((!object) || !(sd = evas_object_smart_data_get(object)))
      return;
-   
+
    sd->frozen++;
    evas_event_freeze(sd->evas);   
    return sd->frozen;
@@ -469,7 +469,7 @@ e_fm_thaw(Evas_Object *object)
    if ((!object) || !(sd = evas_object_smart_data_get(object)))
      return;
    
-   if(!sd->frozen) return 0;
+   if(!sd->frozen) return 0;   
    
    sd->frozen--;
    evas_event_thaw(sd->evas);
@@ -914,8 +914,8 @@ _e_fm_redraw_new(E_Fm_Smart_Data *sd)
    
    e_icon_layout_thaw(sd->layout);
 
-   if(sd->frozen)
-     return;
+   if(sd->frozen) 
+     return;   
       
    ev = E_NEW(E_Event_Fm_Reconfigure, 1);
    if (ev)