Commit Graph

19 Commits

Author SHA1 Message Date
Carsten Haitzler 8bf18495f4 bz5 mod - fix coverity warning about scanf
while this will never be a problem as its internal messages that are
well formatted... this does make coverity happy

fix CID 1425458
2020-04-23 00:51:53 +01:00
Carsten Haitzler a59d3c2a68 typo-- 2020-04-13 21:07:33 +01:00
Christopher Michael 4e626b8f04 bluez: Fix typo spotted by jf_simon 2020-04-13 14:48:08 -04:00
Carsten Haitzler 689dfde91b bluez5 - move from enlightenment_sys to e_system for l2ping and rfkill 2020-01-15 11:33:55 +00:00
Carsten Haitzler acee84c8eb bz5 - ensure we unref bluez dbus objects to free them 2019-10-08 23:20:26 +01:00
Carsten Haitzler 48a83c733c bluez5 - track rfkill sysaction exe to tell user if something went wrong
IF we don't do this, the error will be "silent" and the user never
know. The user should know if things are configured incorrectly.
2019-07-23 00:20:58 +01:00
Carsten Haitzler 10c4a25aa8 bluez5 - comment out unused discovery filter cb now its not used 2019-06-05 09:19:27 +01:00
Carsten Haitzler 6af9d75293 error messages - let's be less ramatic and have fewer of these on start
various errors we have are not actual errors but mostly information or
debug or status messages, so don't use ERR or just don't do the thing
that triggers it as it's useless. This leads to a less
noisy/error-like start output. cleaner for a release for sure.
2019-06-04 14:14:18 +01:00
Carsten Haitzler 32f5bb93ce bz5 -> genlist item flip on press of an option button to see main view
it isn't obvious you should flip back once u press a button to pair or
unpair or connect etc. you you can see the pair requests etc. that are
displayed in normal mode, not flipped mode.
2019-04-09 17:34:15 +01:00
Carsten Haitzler 024bfe09b5 bz5: fix typo in tooltip 2019-01-03 19:10:30 +00:00
Carsten Haitzler 22031a74bb bluez5 - rfkill off when powering on from config - hope it fixes init
so there are a bunch of nasties that bluez itself doent take care of -
like rfkill. some devices (many i seem to find) have rfkill enabled by
default at boot. the gui which select power on or off is largely
useless as asking bluze to do this has no effect or fails because a
separate rfkill subsystem is forcing things off. this is bizarre that
bluez doesnt take care of it, but since it doesn't, we hve to. we
already swizzled rfkill when u toggle the power checkbox, but not at
init power on on loging (based oon last known power state of the bt
adapter that was saved in config). i found the log saying power on
error due to rfkill, so adding an explicit rfkill unblock should...
help. and then if you have bt powered on - next boot it should be too.
power it off if you dont want ti on. then it will be explicitly
powrred off at init/boot/login.
2018-12-24 14:27:33 +00:00
Carsten Haitzler 22f00acfc8 bluez5 - add debug to find power on issue
the power on logic doesnt seem to always work and i don't know why. so
add debug to find out...
2018-12-19 12:12:56 +00:00
Carsten Haitzler 7d39369434 bluez5 - add device specific options like unlock and force connect
i added 2 more device specific options, so i had to move all of the
device controls to an expandable button set. it's not brilliant
actually. the icons are poor and these probably should become toggle
like states rather than a button with an action. it's just not that
intuitive. this i think needs more theme styles in elm core theme
though, so for now keep what's there. but this was necessary due to
the ever expanding set to keep space usage sane.

now the 2 features are "force connect" for any device that is
discovered and responds to pings - connect to it if not connected.
this seems to not always work and maybe this should eventually be
removed, but this leads to there needing to be config per device so we
now have config storage for that like adapters.

the other feature which is much more interesting is the unlock
feature. this means if that bt device is around and responds to pings,
e will unlock (and only explicit manual locking will lock it), but
when that bt device stops responding to pings, e will lock. you could
use your phone, or smartwatch or any other bt device you have on your
all the time as some unlock device.

this required the fixing of the l2ping support in e_sys and i've fixed
it to properly work now and added an optional timeout value as input.
the unlock feature uses this and it pings bt devices on a frequency
that depends on e's powersave state which is dependent on if on ac, or
battery and what battery level is if you have the battery module
running. a handy feature to have just there at the click of a button.

i've kept the printf logging in for now so people trying it out get
some semblance of logging and state so they could figure out why
things are doing what they do and maybe debug it more easily.
2018-12-15 16:13:28 +00:00
Carsten Haitzler d72a7e6800 bluez5 - fix adapter auto-power on if enabled by user
the auto power-on wasn;'t working. what the module did was power the
bt adapoter on if the user last powered it on by default hen it
sees/detects the adapter. if the user last powered it off it will do
the reverse (power it off too). this is kind of a workartound because
bluez5 itself wont power the bt on.
2018-12-11 17:50:25 +00:00
Carsten Haitzler e4339f4819 bryce - improve usability from code and user by having std right menu
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.
2018-10-11 16:25:10 +01:00
Carsten Haitzler 3cb7d8868f bluez5 - finally add signals to show global adapter state
this adds signals that go to the bz5 gadget object so you know if you
have a bt adatper on at all, if any are powered on, scanning, visible
etc.
2018-07-16 21:10:43 +09:00
Carsten Haitzler 0c61b092bb bluez5 - remember pwr and pairable states and restore them on adapt add
bluez wont remember powered state for adapyters so for usability, do
it for bluez so users get their last state as you might expect.
2018-05-21 22:41:14 +09:00
Carsten Haitzler 401becb78e bluez5 - add support to unblock rfkill if bt adatper power is on
so users will be mucho displeased and bewildered when the bt adatper
is powered on but nothing happens... it ends up that with some bt adatpers
it will be rfkill blocked by default. this is highly unfriendly. at
least if you have bluez5 module loaded and configured the adatper to
be powered on... i see no reason why it shouldn't be unblocked if the
adatper is powered on. i have considerted making it an option but for
now can't think of good reasons to really do that.
2018-05-18 21:45:20 +09:00
Carsten Haitzler 2e5be79c45 bluez5 support - a new module with gadget etc.
Summary:
bluez4 support is now basically dead. nothing ships it anymore. bluez5
is a new api that is rather different so new code. also a new gui with
more complete features etc.

not everything is done as i'd like. need:

1. many more icons for device types (60-70 maybe?)
2. a few specific custom icons for some action buttons (like
pair/unpair)
3. icons for group headers
4. gadget status - the gagdte itself displays zero status. it's a
button to display a popup. that's all.

Reviewers: zmike!

Subscribers: devilhorns, cedric

Tags: #enlightenment-git

Differential Revision: https://phab.enlightenment.org/D6148
2018-05-18 21:45:20 +09:00