There is no fallback mechanism for BSD systems. We need to avoid
polling here as it will break E on first poll of data.
Essentially, if we fail to find a battery, we use a broken
fallback mechanism which breaks E. Don't do this :)
detail work on pager(gadget) settings
- changed indicator format to slider format
- changed steps to make more sence
Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D11693
The battery status is shared between instances. The only time
this should be freed is when only one instance remains. Now
multiple instances can be added or removed without hindering
the display of sysinfo and batman instances. Inline with
recent FreeBSD and OpenBSD fixes.
When we add a batman gadget to the desktop it previously would
reset the values of all existing batman instances. Here we
ignore the dummy instance used when adding to desktop or
a gadget bar.
After the work on the sysinfo gadgets for Linux the BSD variant
code was a little bit of an afterthought. These changes provide
us with unlimited battery/sysinfo gadgets and reliable status
for our battery or batteries and our power supply.
This patch allows us to add and remove (many) batman gadgets to
the desktop without negatively affecting existing instances.
It also takes into account additional sysinfo gadgets that include
a batman instance.
Iterating through the existing array of sysinfo gadgets to find
multiple instances and apply changes it not ideal but it does
not affect the Linux code, and keeps this change relatively
simple.
Tested on FreeBSD and OpenBSD with various hardware setups.
Thanks to Peter2121 (Quelrond) for his testing.
There is work to now improve batman's Linux behaviour to match that
of the behaviour on BSD systems.
This adds support for multiple batteries on FreeBSD in line with
Linux and OpenBSD. Also display the vendor and model where
applicable. There are also fixes specific to the sysctl interface.
Fixes a potential crash and let's us have 100 batman gadgets if
wanted.
Summary:
This finally got unified. Fix for the CPU gadget within
sysinfo. One API for MP and SP machines.
Reviewers: raster, cedric, stephenmhouston, devilhorns
Subscribers: zmike
Tags: #enlightenment-git
Differential Revision: https://phab.enlightenment.org/D9023
Summary: This fixes issues where erroneous udev detections of batteries are included. @bu5hm4n and I both have had issues where udev thinks we have two batteries because our hid/touchscreens report a battery even though they are not accurate. The problem is batman will then think there are two batteries and calculate battery percentage based off both batteries. For instance if the laptop battery is 100% and it is detecting this phony hid battery, the result is batman thinks you are at 50% battery life. This also fixes the battery removal code which should only remove the battery with the syspath the function is called with. The code was actually removing every single battery.
Test Plan: You have to have a device that udev reports two batteries for when there aren't two. It should be harmless to not include batteries that have never been charged, have no charge, and have unknown for their status.
Reviewers: bu5hm4n, raster, zmike!, devilhorns
Reviewed By: raster
Subscribers: cedric, bu5hm4n
Tags: #enlightenment-git
Differential Revision: https://phab.enlightenment.org/D7736
now right click on any gagdte in bryce and they ALL have a menu that
allows removal of the gagdte bar or the gadget as well as access to
gadget settings AND the ability for gadgets to extendthis menu like
lunhcer does per icon. now it's standard behavior everywhere which is
much easier to use and discover. it also removes code from every
gadget to do their own "button 3" handling as its handled centrally
making the code in gadgets simpler.
this is part of my effort to improve usability (mostly discoverability
and accessibility of settings/features).
also long press left mouse gets u gadget right click menu
this has to move many modules/gadgets actions to mouse up instead of
mouse down so the bryce has a chance to trap the events first and set
hold flags. but now long press for 0.5 sec and bryce menu come sup
(with left mouse .. so touch friendly).
in addition move context menu hanbdling to e_gadget instead of in
bryce and in e_gadget. a context callback is called so different
systems can still do different things. this should probably change to
always pop up a mnenu and simple call populate callbacks for site
owner specific content.
all in all it makes the new gagdtes more consistent, easier to use
(without a right mouse button), doesn't need special action bindings
etc. etc.
==19679== Invalid read of size 4
==19679== at 0x5CC90EF: _ecore_event_message_handler_handler_del (ecore_event_message_handler.c:194)
==19679== by 0x5CCA332: ecore_event_message_handler_del (ecore_event_message_handler.eo.c:22)
==19679== by 0x5CBC7E3: ecore_event_handler_del (ecore_events.c:51)
==19679== by 0x2A23F4F1: _batman_removed_cb (batman.c:579)
==19679== by 0x6A9A33D: _eo_evas_smart_cb (evas_object_smart.c:78)
==19679== by 0xC166F4D: _event_callback_call (eo_base_class.c:1560)
==19679== by 0xC16728E: _efl_object_event_callback_legacy_call (eo_base_class.c:1633)
==19679== by 0xC167334: efl_event_callback_legacy_call (eo_base_class.c:1636)
==19679== by 0x6A889CA: _efl_canvas_object_efl_object_event_callback_legacy_call (evas_object_main.c:1157)
==19679== by 0xC167334: efl_event_callback_legacy_call (eo_base_class.c:1636)
==19679== by 0x6A9CBA7: evas_object_smart_callback_call (evas_object_smart.c:1037)
==19679== by 0x500B1D: _gadget_remove (e_gadget.c:426)
==19679== by 0x5037A9: _gadget_menu_remove (e_gadget.c:1263)
==19679== by 0x552600: _e_menu_active_call (e_menu.c:2066)
==19679== by 0x55445E: _e_menu_cb_mouse_up (e_menu.c:2809)
==19679== by 0x5CC9933: _ecore_event_message_handler_efl_loop_message_handler_message_call (ecore_event_message_handler.c:359)
==19679== by 0x5CD31D1: efl_loop_message_handler_message_call (efl_loop_message_handler.eo.c:14)
==19679== by 0x5CCDA73: _efl_loop_message_process (efl_loop.c:681)
==19679== by 0x5CCDC64: efl_loop_message_process (efl_loop.c:711)
==19679== by 0x5CC7453: _ecore_main_loop_iterate_internal (ecore_main.c:2444)
==19679== by 0x5CC457E: _ecore_main_loop_begin (ecore_main.c:1173)
==19679== by 0x5CCC0CD: _efl_loop_begin (efl_loop.c:97)
==19679== by 0x5CCED13: efl_loop_begin (efl_loop.eo.c:50)
==19679== by 0x5CC46F7: ecore_main_loop_begin (ecore_main.c:1246)
==19679== by 0x5476B6: main (e_main.c:1092)
==19679== Address 0x212af268 is 40 bytes inside a block of size 48 free'd
==19679== at 0x4C30D18: free (vg_replace_malloc.c:530)
==19679== by 0x5CC9BE6: _ecore_event_message_handler_efl_loop_message_handler_message_call (ecore_event_message_handler.c:389)
==19679== by 0x5CD31D1: efl_loop_message_handler_message_call (efl_loop_message_handler.eo.c:14)
==19679== by 0x5CCDA73: _efl_loop_message_process (efl_loop.c:681)
==19679== by 0x5CCDC64: efl_loop_message_process (efl_loop.c:711)
==19679== by 0x5CC7453: _ecore_main_loop_iterate_internal (ecore_main.c:2444)
==19679== by 0x5CC457E: _ecore_main_loop_begin (ecore_main.c:1173)
==19679== by 0x5CCC0CD: _efl_loop_begin (efl_loop.c:97)
==19679== by 0x5CCED13: efl_loop_begin (efl_loop.eo.c:50)
==19679== by 0x5CC46F7: ecore_main_loop_begin (ecore_main.c:1246)
==19679== by 0x5476B6: main (e_main.c:1092)
==19679== Block was alloc'd at
==19679== at 0x4C31A1E: calloc (vg_replace_malloc.c:711)
==19679== by 0x5CC8EE1: _ecore_event_message_handler_handler_add (ecore_event_message_handler.c:148)
==19679== by 0x5CCA0FB: ecore_event_message_handler_add (ecore_event_message_handler.eo.c:14)
==19679== by 0x5CBC790: ecore_event_handler_add (ecore_events.c:35)
==19679== by 0x2A23FB87: _batman_created_cb (batman.c:661)
==19679== by 0x6A9A33D: _eo_evas_smart_cb (evas_object_smart.c:78)
==19679== by 0xC166F4D: _event_callback_call (eo_base_class.c:1560)
==19679== by 0xC16728E: _efl_object_event_callback_legacy_call (eo_base_class.c:1633)
==19679== by 0xC167334: efl_event_callback_legacy_call (eo_base_class.c:1636)
==19679== by 0x6A889CA: _efl_canvas_object_efl_object_event_callback_legacy_call (evas_object_main.c:1157)
==19679== by 0xC167334: efl_event_callback_legacy_call (eo_base_class.c:1636)
==19679== by 0x6A9CBA7: evas_object_smart_callback_call (evas_object_smart.c:1037)
==19679== by 0x501172: _gadget_object_create (e_gadget.c:548)
==19679== by 0x506B90: e_gadget_type_add (e_gadget.c:2056)
==19679== by 0x2A23CA44: sysinfo_init (mod.c:161)
==19679== by 0x2A23CCF5: e_modapi_init (mod.c:203)
==19679== by 0x556814: e_module_enable (e_module.c:524)
==19679== by 0x555DF9: e_module_all_load (e_module.c:324)
==19679== by 0x554EFF: _module_done_cb (e_module.c:73)
==19679== by 0x73531C1: eio_async_end (eio_file.c:510)
==19679== by 0x5CF8D67: _ecore_thread_kill (ecore_thread.c:229)
==19679== by 0x5CF8E1C: _ecore_thread_handler (ecore_thread.c:256)
==19679== by 0x5CB97D0: _ecore_main_call_flush (ecore.c:1090)
==19679== by 0x5CB9858: _thread_callback (ecore.c:1101)
==19679== by 0x5CF51F3: _ecore_pipe_handler_call (ecore_pipe.c:602)
==19679== by 0x5CF5529: _ecore_pipe_read (ecore_pipe.c:725)
==19679== by 0x5CC3677: _ecore_call_fd_cb (ecore_private.h:476)
==19679== by 0x5CC6793: _ecore_main_fd_handlers_call (ecore_main.c:2051)
==19679== by 0x5CC7414: _ecore_main_loop_iterate_internal (ecore_main.c:2439)
==19679== by 0x5CC457E: _ecore_main_loop_begin (ecore_main.c:1173)
==19679== by 0x5CCC0CD: _efl_loop_begin (efl_loop.c:97)
==19679== by 0x5CCED13: efl_loop_begin (efl_loop.eo.c:50)
==19679== by 0x5CC46F7: ecore_main_loop_begin (ecore_main.c:1246)
==19679== by 0x5476B6: main (e_main.c:1092)
Summary:
Drop deprecated Encoding key from desktop files
The Encoding key is no longer required, all desktop files are assumed to
be UTF-8 encoded. See details at:
https://standards.freedesktop.org/desktop-entry-spec/1.1/apc.html
Fix various typos and misspellings
lintian, Debian's package checker, uses strings to check for common typos
in compiled binaries. This change fixes the ones it identified in 0.22.1.
Reviewers: zmike!
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D5585
This isn't very accurate but seems to be what other tools that check at slower rates than every second do. For instance if you are checking every 10 seconds and in that time frame 500 kb was received, was the throughput for each second 50 kb? No, not likely, but that is the result you will see here. I guess this is one of those close enough things. Thanks to @davemds for reporting this issue.