Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_order.c 


Log Message:


during startup ibar keeps re-filling all icons in a tight loop (though still
looping ecore) because efreet's idler keeps scanning icons and issuing change
events for everything. this slows things down a lot and causes ibar to be
inactive for a few seconds because icons are being deleted and re-created. i
have "paused" e_order updates until the first list change - that means the
idle scan cache fetch is over and operation is "normal" again - issue a big
change then anyway and so be up to date, but only on scan completion.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_order.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- e_order.c   6 Apr 2007 11:42:09 -0000       1.18
+++ e_order.c   9 Apr 2007 23:12:24 -0000       1.19
@@ -10,6 +10,7 @@
 static void _e_order_save       (E_Order *eo);
 
 static int  _e_order_cb_efreet_desktop_change(void *data, int ev_type, void 
*ev);
+static int  _e_order_cb_efreet_desktop_list_change(void *data, int ev_type, 
void *ev);
 
 static Evas_List *orders = NULL;
 static Evas_List *handlers = NULL;
@@ -19,6 +20,7 @@
 e_order_init(void)
 {
    handlers = evas_list_append(handlers, 
ecore_event_handler_add(EFREET_EVENT_DESKTOP_CHANGE, 
_e_order_cb_efreet_desktop_change, NULL));
+   handlers = evas_list_append(handlers, 
ecore_event_handler_add(EFREET_EVENT_DESKTOP_LIST_CHANGE, 
_e_order_cb_efreet_desktop_list_change, NULL));
 
    return 1;
 }
@@ -245,6 +247,8 @@
    fclose(f);
 }
 
+static int list_changed = 0;
+
 static int
 _e_order_cb_efreet_desktop_change(void *data, int ev_type, void *ev)
 {
@@ -252,6 +256,7 @@
    Evas_List *l;
 
    event = ev;
+   if (!list_changed) return 1;
    switch (event->change)
      {
       case EFREET_DESKTOP_CHANGE_ADD:
@@ -305,6 +310,25 @@
              if ((changed) && (eo->cb.update)) eo->cb.update(eo->cb.data, eo);
           }
         break;
+     }
+   return 1;
+}
+
+static int
+_e_order_cb_efreet_desktop_list_change(void *data, int ev_type, void *ev)
+{
+   Evas_List *l;
+   
+   if (!list_changed)
+     {
+       list_changed = 1;
+       for (l = orders; l; l = l->next)
+         {
+            E_Order *eo;
+            
+            eo = l->data;
+            if (eo->cb.update) eo->cb.update(eo->cb.data, eo);
+         }
      }
    return 1;
 }



-------------------------------------------------------------------------
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