Commit Graph

131 Commits

Author SHA1 Message Date
Al Poole 46764d5975 sysinfo: fix linux build. 2018-02-24 18:40:24 +00:00
Al Poole e33a14b7e8 sysinfo: fix cpuclock for BSD.
This lets us use the cpuclock gadget on FreeBSD machines.

@fix T6259
2018-02-24 18:19:48 +00:00
Mike Blumenkrantz 846c84639b use per-instance event handler for batman powersave eventing
==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)
2018-02-22 11:14:33 -05:00
Ross Vandegrift 629f7d41c8 clean up .desktop files and misc typos
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
2018-01-04 09:57:52 -05:00
Mike Blumenkrantz bd88282047 remove autotools 2017-11-20 07:05:36 -05:00
Mike Blumenkrantz 99db9e2557 more E_BITFIELD conversions 2017-11-08 09:22:24 -05:00
Mike Blumenkrantz 59fa0e418d use E_BITFIELD define for bitfield struct members
on release builds this will be a bitfield, on devel builds it will make
bools a normal unsigned char for easier debugging
2017-11-07 10:39:56 -05:00
Mike Blumenkrantz 753df97428 disable cpuclock powersave updating for demo gadgets 2017-11-02 07:31:57 -04:00
Carsten Haitzler 929037aaa0 battery modules - actually set ac power flag based on ac presence
this should fix T3649

@fix
2017-10-18 13:32:50 +09:00
Stephen Houston fdbf49af1b Sysinfo: Cpuclock, Netstatus, and Thermal now use progressbars in the popups to unify and match all sysinfo gadgets. 2017-09-27 17:19:47 -05:00
Stephen 'Okra' Houston 20a96271ca Update netstatus in/out in the same file read. Fix cpufreq to use powersave again. 2017-09-12 12:10:38 -05:00
Carsten Haitzler 14e1583cd0 Revert "Sysinfo gadgets: Revert all uses of faulty e_powersave_sleeper."
This reverts commit f8e17b67e4.
2017-09-12 11:03:42 +09:00
Stephen 'Okra' Houston f8e17b67e4 Sysinfo gadgets: Revert all uses of faulty e_powersave_sleeper. 2017-09-11 13:24:54 -05:00
Stephen 'Okra' Houston 3b7926a20a Netstatus: Average out throughput when time elapsed is greater than 1 second.
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.
2017-09-08 16:16:19 -05:00
Stephen 'Okra' Houston 7f3e7d933e Show netstatus output in bits per second while still polling based on ticks to avoid unnecessary wake ups. 2017-09-08 15:18:23 -05:00
Stephen 'Okra' Houston 6f6f344c0a Netstatus: Use proper label for throughput in config. 2017-09-08 14:11:00 -05:00
Stephen 'Okra' Houston ce61c37782 Netstatus: Don't show an incorrect unit on the popup label. 2017-09-08 09:29:53 -05:00
Mike Blumenkrantz b5e75eb264 formatting
lot of mixed spaces/tabs here made the code unreadable
2017-08-29 15:32:18 -04:00
Stephen 'Okra' Houston 4a22d2f178 Don't dereference NULL pointers in sysinfo and cpuclock.
This fixes @CID1379941 and @CID1379947
2017-08-25 15:01:39 -05:00
Stephen 'Okra' Houston 5bcdfb0421 CPUMonitor: Don't pack the box in sysinfo mode. 2017-08-24 19:39:20 -05:00
Stephen 'Okra' Houston 1af5125cc9 Batman: Set the demo gadget to have full battery. 2017-08-24 08:08:41 -05:00
Stephen 'Okra' Houston 30ee8c5284 CPUMonitor: Make sure to set the number of cores so aspect calcs. 2017-08-24 08:06:20 -05:00
Stephen 'Okra' Houston c7e6b52d2e CPUMonitor: Fix aspect by using correct theme names. This requires an EFL update too. 2017-08-23 19:02:46 -05:00
Stephen 'Okra' Houston ad46d041a8 Gadgets: Don't set gadgets to expand. 2017-08-23 09:55:59 -05:00
Stephen 'Okra' Houston 993f8ad519 Sysinfo Gadgets: Provide only demo data and don't poll/thread when gadgets are in demo mode.
This fixes T5816
2017-08-22 10:24:16 -05:00
Stephen 'Okra' Houston 12b8f482ed CPUMonitor: Don't try and delete objects after the gadget has been removed.
This fixes T5816
2017-08-22 10:24:16 -05:00
Mike Blumenkrantz c31cb51499 replace <br> with <ps/> for all text 2017-08-21 10:16:35 -04:00
Carsten Haitzler 16a702ac73 meson - make modules with helper binaries simpelr to build
this makes modules with a binary helper simpler to build using the
parent module build harness as much as possible. i probably could
simplify this down to a single binary only and it is either setuid or
not... define the deps and flags ... it could be a bit simpler. not
much. i also removed the if's in the build for battery and ifdefs in
src handle it instead (imho simpler to maintain in src). sysinfo still
uses the if's there.
2017-08-11 19:50:48 +09:00
Al Poole 6bd2d74cdc sysinfo: fix single-core OpenBSD results.
Summary:
Basically missed this one. CPU_STATES is 6 as it's still supposedly a work-in-progress. But we only need 5 for all
queries (for now).

Reviewers: stephenmhouston, zmike!

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5070
2017-08-04 17:22:32 -04:00
Carsten Haitzler ec37c5e7eb batman - fix buffer warning by hanving big enough stack buffer
makes gcc warnings happy but otherwise doesn't hurt us as the buffer
should be at the top of the stack (last pushed) and only bytes used
will be allocated.
2017-08-04 14:09:25 +09:00
Carsten Haitzler 03aeb1d463 fix fallthrough warnings 2017-08-04 12:35:27 +09:00
Carsten Haitzler 84bf48b3ed module build - clean up and fix meson install of pretty much all modules
so we';re missing installing desktop files. edj icon files, wizard
data files in the wrong place, and much more. this also cleans up the
module meson build of pretty much all modules and make their build
files cimple and consistent so it's far easier to re-use things from
one module to the next. we should aim for simplicity, consistency
between as much as possible so we can refactor and turn into maybe
functions later. imho that starts with consistency though. until i can
see all the common patterns clearly, i don't want to write functions
yet. it's easier to see if all the files are consistently using the
same vars and formatting etc. etc. etc.

but either way the installation needs fixing so it installs all files
in the right places with the right permissions etc. etc. etc.

this doesn't fix all module build files bt all the ones i found that
were broken installs and they use what i think is a cleaner/simpler
template, BUT there is far too much copy & pastage here... far too
much.i need to find a cleaner way to automate this.
2017-07-27 14:29:30 +09:00
Stephen 'Okra' Houston 59a6892984 Netstatus - Fix dupclicate Receiving labels. 2017-07-24 13:53:53 -05:00
Mike Blumenkrantz e8dc71cd48 meson. 2017-07-20 17:18:33 -04:00
Al Poole b57802b2c4 sysinfo: Fix BSD build.
Reviewers: stephenmhouston, zmike!, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5027
2017-07-19 08:55:09 -04:00
Carsten Haitzler e7eaef62f3 powersave usage - dont use usleep at all. pwoersave sleep replaces it
also... there isn't realy a need to track the screensaver state...
powersave sleep will drop back to an hour between sleeps if we're in
freeze mode (it could be longer or even be indefinite). it will be
woken up if powersave state changes...
2017-07-19 10:31:20 +09:00
Stephen 'Okra' Houston 5370793399 Sysinfo Gadget: More thread vs object lifetime work: Make threads no longer dependent on the main loop objects and vice versa. 2017-07-15 21:32:38 -05:00
Stephen 'Okra' Houston 139045c120 Sysinfo Gadget: Unify define macro checking. 2017-07-15 21:32:11 -05:00
Al 'netstar' Poole d7538011ec Modules: Fix compilation and remove warnings for BSD 2017-07-15 21:32:11 -05:00
Mike Blumenkrantz b7e8e886e9 do not generate module.desktop files
the purpose of this is to allow variable substitutions, but no desktop
files do this so it's a waste of build time for no reason
2017-07-14 18:40:50 -04:00
Stephen 'Okra' Houston 804f038f71 Sysinfo Gadget: Thread Lifetime vs Object Lifetime management.
This cleans up how sysinfo manages object vs thread lifetimes.  If thread is still alive dependent on aspects that need to be freed in the gadget removal process, it defers that cleanup from the remove callback to the thread end callback.  As for the combination sysinfo gadget, each gadget inside of sysinfo will set a done flag alerting that the cleanup of the combination gadget can happen once all threads are done.
This fixes T5694
2017-07-13 19:21:49 -05:00
Stephen 'Okra' Houston 739c1aa4b8 Sysinfo Gadgets: Thread handling improvement. Pause on Screensaver. Follow powersave. 2017-07-13 14:36:09 -05:00
Stephen 'Okra' Houston abfc0e8210 Gitignore the sysfs frequency bin. 2017-07-13 14:24:02 -05:00
Stephen 'Okra' Houston 392d12bafd Cpuclock: Don't debug print the exec string. 2017-07-12 16:07:58 -05:00
Stephen 'Okra' Houston 9e7b78ffab Gadgets: Make sure to avoid conflicts with functions and globals. 2017-07-12 16:03:06 -05:00
Stephen 'Okra' Houston b93849072a Thermal: Add units. 2017-07-12 15:44:01 -05:00
Stephen 'Okra' Houston ada1fdb71a CPUClock: Allow setting of governors. 2017-07-12 15:42:56 -05:00
Stephen 'Okra' Houston d4bc101866 Cpuclock: Clean up some governor handling code. 2017-07-12 13:32:56 -05:00
Stephen 'Okra' Houston 2fa8df456a Thermal: Add left click info popup 2017-07-12 13:31:22 -05:00
Stephen 'Okra' Houston 2bbdd999ed Sysinfo: Update Cpuclock and Thermal to the powersave api. 2017-07-12 01:24:03 -05:00