On 01/27/2011 10:23 PM, Christopher Michael wrote:
> On 01/27/2011 04:14 PM, Enlightenment SVN wrote:
>> Log:
>> Wait for cache update before e_startup
>>
>>     We need to wait for the cache build to complete, else we might have no
>>     cache, and get no startup apps.
>>
>> Author:       englebass
>> Date:         2011-01-27 13:14:30 -0800 (Thu, 27 Jan 2011)
>> New Revision: 56332
>> Trac:         http://trac.enlightenment.org/e/changeset/56332
>>
>> Modified:
>>     trunk/e/src/bin/e_startup.c
>>
>> Modified: trunk/e/src/bin/e_startup.c
>> ===================================================================
>> --- trunk/e/src/bin/e_startup.c      2011-01-27 21:08:59 UTC (rev 56331)
>> +++ trunk/e/src/bin/e_startup.c      2011-01-27 21:14:30 UTC (rev 56332)
>> @@ -8,10 +8,12 @@
>>    /* local subsystem functions */
>>    static void _e_startup(void);
>>    static void _e_startup_next_cb(void *data);
>> +static Eina_Bool _e_startup_event_cb(void *data, int ev_type, void *ev);
>>
>>    /* local subsystem globals */
>>    static E_Order *startup_apps = NULL;
>>    static int start_app_pos = -1;
>> +static Ecore_Event_Handler *desktop_cache_update_handler = NULL;
>>
>>    /* externally accessible functions */
>>    EAPI void
>> @@ -31,11 +33,11 @@
>>      if (!ecore_file_exists(buf))
>>        e_prefix_data_concat_static(buf, "data/applications/restart/.order");
>>         }
>> -   startup_apps = e_order_new(buf);
>> -   if (!startup_apps) return;
>> -   start_app_pos = 0;
>> +   desktop_cache_update_handler =
>> +      ecore_event_handler_add(EFREET_EVENT_DESKTOP_CACHE_UPDATE,
>> +                              _e_startup_event_cb,
>> +                              strdup(buf));
>>       e_init_undone();
>> -   _e_startup();
>>    }
>>
>>    /* local subsystem functions */
>> @@ -71,3 +73,18 @@
>>    {
>>       _e_startup();
>>    }
>> +
>> +static Eina_Bool
>> +_e_startup_event_cb(void *data, int ev_type __UNUSED__, void *ev __UNUSED__)
>> +{
>> +   char *buf;
>> +
>> +   ecore_event_handler_del(desktop_cache_update_handler);
>> +   buf = data;
>> +   startup_apps = e_order_new(buf);
>> +   if (startup_apps)
>> +      start_app_pos = 0;
>> +   free(buf);
>> +   _e_startup();
>> +   return ECORE_CALLBACK_PASS_ON;
>> +}
>>
>
> Wouldn't ECORE_CALLBACK_CANCEL be better here ?

ECORE_CALLBACK_CANCEL isn't an option here, either pass on the callback, 
or stop the callback from propagating (ECORE_CALLBACK_DONE).

S.

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to