Hello, I spent a few hours to learn a bit of the edje and embryo stuff to write an ACPI battery monitor. It's a lot like elapse right now.
you can find it and test it out here: http://www.hornecomputing.com/linux/battery-mon/ There is something I need a bit of help with though. Currently I am using edje_object_part_text_set to update the text in the edje. I would like to do the following: 1. Have a variable in the edje that stores the battery percentage. 2. Send a signal to the edje every time the percentage updates. 3. Have an embryo script catch this signal and update the text. I think I am doing it the right way but it doesn't seem to be working. So I have reverted to using edje_object_part_text_set() to update the meter. In the Callback(called every second): ... i = battery_percentage_get (); id = edje_object_variable_id_get(edje, "bat_cap"); edje_object_variable_float_set(edje, id, i); edje_object_signal_emit(edje, "update", "main_cb"); ... In EDC collections: ... script { public bat_cap; } ... In EDC collections.programs: ... program { name: "update_meter"; signal: "update"; source: "main_cb"; script { new buff[256]; snprintf(buff, 256, "Capacity: %f", bat_cap); set_text(PART:"percentage", buff); } } ... when I do it this way the only thing that shows up in the PART:"percentage" text is "Capacity: 0.00000". Why isn't the bat_cap variable being read in the edje? am I using snprintf incorrectly? Stafford ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ enlightenment-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
