Commit Graph

165 Commits

Author SHA1 Message Date
Elyes HAOUAS 3524bc167c tree-wide: get rid of trailing whitespace (part 1)
Remove trailing white spaces.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11780
2020-05-14 12:30:31 +02:00
Carsten Haitzler b5a6635137 gad bar - make right menu items more obvious and simple 2020-04-08 10:55:31 +01:00
Christopher Michael d85d0194a9 e_gadget: Check for valid gadget config before trying to remove it
Should fix crash when trying to add a gadget to a gadget bar

https://nopaste.linux-dev.org/?1295161
2020-03-18 13:28:52 -04:00
Carsten Haitzler c49f49829f gadgets - get long press plus dnd to behave nice
we had multiple drag resistance values here - unify with 1 and make it
work, now it gets it right deciding between dnd and a long press menu
etc. etc. ...
2018-10-29 17:32:51 +00:00
Carsten Haitzler 63a4475497 Revert "Gadget Menu: Cancel menu after a drag *EITHER* vertically or horizontally, not *BOTH*. Fixes longpress menu interrupting drag in gadgets such as pager."
This reverts commit f56a228e70.
2018-10-26 16:10:01 +01:00
Carsten Haitzler 326271e009 gadget/bryce - add cancellation cb for the context menu 2018-10-26 15:36:56 +01:00
Stephen Houston b708bee7d7 E Gadgets: Restore the behavior of using a binding check on mouse down
while also still using the new menu system.

This binding check/action handler was removed, because I am assuming
that the presumption was that the only binding/action that was handled
was showing a menu?  This was actually not the case.  This
binding/action handler handled resizing, moving, dragging, etc... on
gadgets on the desktop and in the gadget bar.  Without it using gadgets
was near impossible on the desktop and inconvenient on the gadget bar.
2018-10-24 16:33:25 -05:00
Stephen Houston f56a228e70 Gadget Menu: Cancel menu after a drag *EITHER* vertically or horizontally, not *BOTH*. Fixes longpress menu interrupting drag in gadgets such as pager.
The longpress menu was only getting cancelled if a drag occured at a
distance of least 25 pixels.  This is due to the code checking for horizontal drag
distance + vertical drag distance >= 25.  I believe the intent here was
to cancel drag if >= 5 vertically or >= 5 horizontally, not both.  Most
drags wouldn't be 25 pixels in a single gadget such as pager, and a 25
pixel drag would not happen quick enough to offset longpress.  This
commit also lowers the drag cancelling threshold to 3 pixels, not 5.
2018-10-24 15:19:47 -05:00
Carsten Haitzler b92b546d36 e menu - allow hold mode to be turned off
hold mode is where if u hold mosue down menu stays only as long as
mouse is held down... then dismissed on up. doesnt work well when youa
re trying to overload a single click with longpresses and so on -
optionally turn it off. used in gadgets.
2018-10-17 14:35:49 +01:00
Carsten Haitzler 571daf936d e gadget - allow left mouse drag dnd to cancel long press menu 2018-10-17 11:31:12 +01: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 a9b303baa5 bryce/gadgets - pass orientation to the style wrapper around the gadget
bryce was missing the ability to espose orientation to the child
items, so they were the same irrespective of orientation.

i also notice that orientaiont is a simple horiz/vert ... so no
ability to special case corners etc. in the theme... :( not sure if
this should be changed.

also fix the aspect calculation to round up correctly to avoid
off-by-1 pixel gaps i noticed with the pager - necessary for the
styling in the flat theme to be right.
2018-10-11 16:25:10 +01:00
Mike Blumenkrantz a6277f4f6d resolve a number of cases where a null object was passed to efl functions
Summary:
these are all harmless but will trigger error messages from efl

ref T7030

Depends on D6315

Reviewers: ManMower, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Tags: #enlightenment-git

Maniphest Tasks: T7030

Differential Revision: https://phab.enlightenment.org/D6316
2018-06-19 12:01:43 -04:00
Stephen Houston fa3d86ac84 Remove/mark unused variables to avoid warnings. 2018-04-19 10:18:46 -05:00
Mike Blumenkrantz 52e7131477 add info about gadget bindings to editor, make editor movable
ref T6341
2018-02-22 16:21:16 -05:00
Mike Blumenkrantz 7156ed8c38 always unset pass_events on desktop editor when it is shown
fixes some cases where the editor could not be interacted with after
it was hidden during gadget placement
2018-02-22 16:21:16 -05:00
Mike Blumenkrantz b51552ca87 do not add gadget editor pointer site to editor del_list
the pointer site will never exist at the time when the editor is
destroyed
2018-02-22 16:21:16 -05:00
Mike Blumenkrantz d309a9c39b add gadget type to gadget menu header for internal gadgets 2018-01-22 14:39:53 -05:00
Mike Blumenkrantz 7f649d078b block gadget site layouts on moving gadgets which are not on the pointer site
these will be recalculated correctly once the move operation terminates

fix T6623
2018-01-22 11:17:54 -05:00
Mike Blumenkrantz e787a71048 clear visible gadget popups when triggering a gadget action 2018-01-18 15:33:11 -05:00
Mike Blumenkrantz 617735ca4c consider gadget ctxpopups as normal popups for callback purposes 2018-01-18 15:31:43 -05:00
Mike Blumenkrantz 265dd55163 sort gadgets alphabetically in gadget editor 2018-01-18 15:02:11 -05:00
Mike Blumenkrantz 99db9e2557 more E_BITFIELD conversions 2017-11-08 09:22:24 -05:00
Mike Blumenkrantz ecb0370ea9 save sandbox gadget configs when saving normal gadget config 2017-11-03 13:51:41 -04:00
Mike Blumenkrantz f4470e002e add gadget sandboxing
docs in progress, tasks https://phab.enlightenment.org/project/board/179/
2017-11-03 11:47:35 -04:00
Mike Blumenkrantz 4d76f409f8 block gadget configuration unconditionally while desklock is active 2017-10-03 13:52:44 -04:00
Mike Blumenkrantz 031b0bdc60 deduplicate global gadget handler variables
ref T6125, T4648
2017-10-03 13:50:16 -04:00
Mike Blumenkrantz 6f186db24b clamp expanding gadget size to 0 to prevent sizing overflows
if the expanded size is negative then the size should be 0 and the gadget is
not visible
2017-10-03 12:39:03 -04:00
Mike Blumenkrantz 7c726172e4 handle gadget site layouts using accurate parent geometry 2017-10-03 12:39:03 -04:00
Mike Blumenkrantz 4ae2145330 move gadget editor help text onto the editor popup
ref T4648
2017-10-03 12:39:03 -04:00
Mike Blumenkrantz 62acd53a96 avoid div by 0 in gadget layout
CID 1381165
2017-09-15 12:16:48 -04:00
Mike Blumenkrantz 283a1cd620 handle unmovable gadgets in gadget move action
a gadget which refuses to create a duplicate of itself can be considered
immobile

fix T5998
2017-09-14 14:38:14 -04:00
Mike Blumenkrantz ccd374e6a2 add some hidden boxes to use as gadget popup hover parents
boxes get resized with zone useful geometry to ensure the content is always
on screen and visible

fix T5945
2017-09-14 14:00:39 -04:00
Mike Blumenkrantz a5bb9932ee revert gadget ctxpopup autopositioning attempts
I don't think this method would ever have worked reliably

This reverts commit 6f1b75e87b.
This reverts commit 84e999f5f3.
2017-09-12 14:37:53 -04:00
Mike Blumenkrantz 6bd97ced9b handle gadget site layout when last gadget in site is a spacer 2017-09-12 13:36:39 -04:00
Mike Blumenkrantz 721eeb994e make spacer gadgets smarter when multiple spacers exist
* ignore consecutive spacers
* attempt to size/fill consistently based on occupied space

fix T5973
2017-09-12 13:21:04 -04:00
Mike Blumenkrantz 6f1b75e87b disable auto positioning of gadget ctxpopups for now
ctxpopups 2hard4me atm
2017-09-01 15:39:33 -04:00
Mike Blumenkrantz 8ea5cf9c47 add desklock gadget site event rect to event grabber while editor is visible
allow actions to trigger on gadgets during editing

ref T4648
2017-09-01 13:40:11 -04:00
Mike Blumenkrantz 46cd0090cd stack gadgets below site event rect when reparenting gadget 2017-09-01 13:40:11 -04:00
Mike Blumenkrantz 6dd9205e0a rename E_EVENT_COMPOSITOR_RESIZE -> E_EVENT_COMPOSITOR_UPDATE 2017-09-01 13:40:11 -04:00
Mike Blumenkrantz 1ca1201110 recalc desktop gadget sites on compositor update event 2017-09-01 13:40:11 -04:00
Mike Blumenkrantz 84e999f5f3 track gadget ctxpopups and reposition within zone on resize
this attempts to shift the ctxpopup content vertically and horizontally to
keep it on the same screen that the gadget is on

fix T5945
2017-09-01 13:40:11 -04:00
Mike Blumenkrantz 175c614838 add spacer gadgets for bryces
this is a rectangle which dynamically resizes based on the available space
in the bar. it can only be added when autosize is disabled, and setting
autosize will remove all spacers

fix T5914
2017-08-25 14:47:10 -04:00
Mike Blumenkrantz 2e0638e87a check whether gadgets are elm objects before calling elm functions 2017-08-25 14:47:10 -04:00
Mike Blumenkrantz 0f5b287866 add gadget api for determining if a gadget site is a desklock site
potentially this could be improved to use a vastly overengineered 'policy'
setup, but for now this fits the biggest use case

ref T4648
2017-08-25 14:47:10 -04:00
Mike Blumenkrantz 29b736257c destroy dropped gadgets after drop operation completes
the gadget object is used during the drop callback, so destroying it
before the callback breaks the drop operation
2017-08-25 14:47:09 -04:00
Mike Blumenkrantz 4d8e1d5e29 perform gadget site layout before calling drop callback
calling this inside the drop callback resets the dropped gadget's position
and causes the drop operation to fail
2017-08-25 14:47:09 -04:00
Mike Blumenkrantz feb17c898d set moving gadgets in pointer site to have moving state
prevent spurious resizes during layout
2017-08-25 14:47:09 -04:00
Mike Blumenkrantz 850f5b40f8 handle gadget ctxpopup placement for desktop gadgets
fix T5877
2017-08-25 14:47:09 -04:00
Mike Blumenkrantz 6b2a9a0f7b set gadget ctxpopup priority based on anchor
fix T5877
2017-08-18 15:52:50 -04:00