Mike Blumenkrantz
57c448739a
add support for external gadget providers in the gadget editor
...
this allows external gadget managers to add their gadget types into
existing editor/layouts
2017-08-11 18:48:49 -04:00
Mike Blumenkrantz
408128df95
handle destruction of demo gadgets without crashing
...
demo gadgets automatically call _gadget_free() on object delete, avoid
recursively calling it
2017-08-11 18:48:49 -04:00
Mike Blumenkrantz
2d80ef091e
further improve keyboard handling while gadget editor is active
2017-08-11 18:48:49 -04:00
Mike Blumenkrantz
92a0cb11d6
disallow demo gadget ids from counting towards wizard success
2017-08-11 18:48:49 -04:00
Mike Blumenkrantz
4e4f66fc2b
prune gadgets from editor if destroyed while editor is active
2017-08-11 18:48:49 -04:00
Mike Blumenkrantz
fd6f9f1c14
destroy gadget configs when deleting a gadget site
2017-08-07 14:48:07 -04:00
Mike Blumenkrantz
d5a1b30ab4
add gadget site as param for gadget wizard callbacks
...
it's important to be able to track this lifetime in order to cancel the
wizard if the site is deleted
2017-08-04 16:05:16 -04:00
Mike Blumenkrantz
09aee20e3c
save config automatically when removing gadgets
2017-08-04 16:05:16 -04:00
Mike Blumenkrantz
cb80d5157c
more accurately determine gadget editor visibility
...
ref 2675422e9d
2017-08-04 16:05:15 -04:00
Mike Blumenkrantz
81fe0b4d49
set gadgets in the editor's pointer site as moving
...
prevent random resizes during gadget layout
2017-08-04 16:05:15 -04:00
Mike Blumenkrantz
30ada88a34
reject gadget site layout attempts only when it would be impossible
...
a site with orient set is expected to fill using only one axis, so a size
of 0xH or Wx0 is valid in some cases
fix T5806
2017-08-03 11:52:24 -04:00
Mike Blumenkrantz
541c30b3c4
set gadget recalc immediately when not in canvas smart calc
2017-08-03 11:52:18 -04:00
Carsten Haitzler
3051df7fee
gadget recalc - if you add a job...del and add again
...
if you add a job to do things like defer a calc till later in the loop
(or if later in size calc - it'd be the next loop run after rendering)
... then del the previous job and add a new one. why? order of
operation. if you add job a... because of event a, then add job b,
because of event b ... if for whatever reason, event a happens again
and you skip adding job a... job a will run before jbo b, even though
the LAST event is later and that 2nd event a may relay on event b
state/calculations. so always del then add to ensure then that job a
happens ater b if this scenario happens. it just leads to fewer
surprises and weird issues.
2017-07-31 17:41:35 +09:00
Mike Blumenkrantz
2f2075f588
remove tooltips from desktop gadget editors
...
this looks bad?
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz
d2cdde01d1
set max size hint on desktop gadget editor gadgets when editor is resized
...
ensure that the gadgets size based on grid item size
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz
4ce460525c
return immediately when setting a null gadget style if current style is null
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz
d216cce6eb
use zone size for un-oriented new gadgets
...
this is a relative size which I set based on zone size, so avoid the
possibility of using unsized site geometry
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz
9eed5f49a8
abort gadget site layouts if the gadget site has not been sized
...
this triggers infinite loops, and a resize on the site will trigger a layout
automatically
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz
3e982446ec
trigger gadget site recalc job if gadget object hints change
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz
cd6fc802e9
defer setting recalc on gadget sites
...
if this is set during a smart_calculate() call then it will potentially
loop forever
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz
c648ae4048
make gadget resize anchoring able to omit axes
...
when grabbing e.g., the top center of a gadget, it feels better to just
have that resize perform vertical adjustments instead of also allowing
horizontal changes
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz
b3c6a4e184
position desktop gadgets more accurately during resize
...
do resize before altering position to ensure positioning feels smooth
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz
39b1e09662
apply gadget aspects with greater precision
...
aspect ratio is not an integer, rounding it prematurely loses precision
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz
aae2f42726
break out gadget aspecting into separate function
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz
2675422e9d
ignore desktop gadget editor keybinds while editor is hidden
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz
263ee54545
rename bg_blank_object -> resize_object for a more accurate name
2017-07-21 14:43:37 -04:00
Mike Blumenkrantz
35b1d20b81
destroy desktop gadgets when the parent zone is removed
2017-07-21 14:43:37 -04:00
Mike Blumenkrantz
6630e602a9
save config after clearing desktop gadget site
2017-07-14 18:40:50 -04:00
Mike Blumenkrantz
4a12f5c3f2
use correct key name for BackSpace in desktop gadget key handler
2017-07-14 18:40:50 -04:00
Mike Blumenkrantz
03325b0195
always check for autoclose object when adding gadget objs to edit grabber
...
ensure popups can be closed as expected during editor operations
2017-07-14 18:40:50 -04:00
Mike Blumenkrantz
02b3755828
hide gadget editor if gadget triggers a popup
...
show again when popup is hidden
2017-07-14 18:40:50 -04:00
Mike Blumenkrantz
35f4bc1cdc
add better handling for interacting with gadget popups while editor is up
...
includes gadget wizards
ref T4648
2017-07-14 18:40:50 -04:00
Mike Blumenkrantz
5e7e38d2c4
don't close gadget editor if ON_HOLD is set or click is not button 1
2017-07-14 18:40:50 -04:00
Mike Blumenkrantz
4e8836e591
prune unconfigured gadgets from comp object sites upon site del
...
automatically created sites shouldn't trigger wizards upon show
2017-07-14 18:40:50 -04:00
Mike Blumenkrantz
664c3dc468
move gadget del callbacks to AFTER priority
...
ensure gadget internals have longer lifetime than external callbacks on
gadget objects
ref 27091c510c
fix T5601, T5693
2017-07-14 18:40:50 -04:00
Mike Blumenkrantz
8e54684a2e
delete gadget editor site when editor is deleted
...
leak--
2017-07-14 18:40:50 -04:00
Mike Blumenkrantz
415a94b987
unpack gadget from site editor box on content_item del
...
the gadget should be deleted by the site, not by the gen(list|grid)
ref T5693
2017-07-14 18:40:50 -04:00
Mike Blumenkrantz
59b14a4ace
unset gadget site's layout pointer after destroying gadgets
...
ensure this persists through gadget del callbacks
ref T5693
2017-07-14 18:40:50 -04:00
Mike Blumenkrantz
af60915713
add function for a gadget to remove itself
2017-06-30 17:03:24 -04:00
Mike Blumenkrantz
c109e2d6a6
save gadget site config when deleting gadget after wizard failure
2017-06-30 17:03:24 -04:00
Mike Blumenkrantz
89aa89f3a6
use event grabber for gadget editors to improve event detection
...
fixes some cases where clicking the background didn't dismiss the editor
and allows for clicking on non-gadget parts of the editor
2017-06-30 10:25:17 -04:00
Mike Blumenkrantz
809a3492ae
unset gadget editor pointer on editor delete
2017-06-30 10:25:17 -04:00
Mike Blumenkrantz
8b8703cfa6
use safe list iterating when clearing a gadget site during shutdown
...
demo gadgets are immediately removed when deleted, leading to list
corruption unless a safe iterator is used
2017-06-23 17:49:44 -04:00
Mike Blumenkrantz
9fa3fdfc78
always grab input when showing a gadget wizard
2017-06-23 17:49:44 -04:00
Mike Blumenkrantz
be0015a283
hide gadget editor when dragging/wizarding a new gadget
2017-06-23 17:49:44 -04:00
Mike Blumenkrantz
7e6a2a9064
update gadget position during a resize from top/left edge
2017-06-23 17:49:44 -04:00
Mike Blumenkrantz
099e6e019d
reset demo gadget id before deleting gadget object during drop operation
...
ref 75224784bd
2017-06-23 17:49:44 -04:00
Mike Blumenkrantz
446860b68a
if gadget wizard returns a zero id, remove gadget from site and destroy
2017-06-23 17:49:44 -04:00
Mike Blumenkrantz
4c58940291
force horizontal orient for all gadget editors with orientation
...
vertical orient does not fit well into any list/grid widgets, not sure
if this can be further improved yet
2017-06-23 17:49:44 -04:00
Mike Blumenkrantz
ebfb925a11
redo the gadget editor (again)
...
the list implementation had some issues with sizing and was also
inflexible and prevented a good display for desktop gadget sites
2017-06-23 17:49:43 -04:00
Mike Blumenkrantz
6a1d0226ed
allow gadgets to return a null object for demo objects
...
this indicates the gadget should not be advertised for the given demo
purpose
2017-06-23 17:49:43 -04:00
Mike Blumenkrantz
97c3db5ab1
ensure flag to preserve gadget editor is unset after setup
...
the first click on the desktop should always dismiss the editor if
a gadget is not being dragged
2017-06-23 17:49:43 -04:00
Marcel Hollerbach
738f6d8f6b
e_gadget: fix destroying of drop_objects
...
keys of pointer hashes are represent as void** so you just get a pointer
to where the pointer can be found. This now dereferences the pointer so
the correct value is used.
This fixes T5136.
2017-01-28 23:02:40 +01:00
Mike Blumenkrantz
1861f474e4
remove gadget drop object event callbacks during object deletion
...
ensure that no callbacks reference gadget internals after they have been
deleted
2017-01-27 10:51:21 -05:00
Mike Blumenkrantz
75224784bd
reset demo gadget id before deleting gadget object during drop operation
...
ensure that the gadget is marked as usable so that the config isn't deleted
2017-01-20 11:52:24 -05:00
Mike Blumenkrantz
27091c510c
ensure that gadget internal del callbacks are handled before other callbacks
2017-01-13 11:35:20 -05:00
Mike Blumenkrantz
3af7affa02
free configs for demo gadgets on object free
...
these are purely for demo purposes and should never be retained
I think this is right...
2017-01-13 11:35:20 -05:00
Stephen 'Okra' Houston
05f35b4deb
Enlightenment: Make gadget editor popup scrollable:
...
This fixes T5077
2017-01-09 10:39:39 -06:00
Mike Blumenkrantz
485f250880
don't track gadget drop handler objects for deletion
...
the user should be managing this
2016-12-09 11:59:24 -05:00
Mike Blumenkrantz
b133dbd35d
prevent divide by zero when calculating gadget aspect sizing
2016-11-28 10:43:28 -05:00
Mike Blumenkrantz
46cad09e3e
force gadget site recalc from style object if gadget's hints change
...
ensure that these intermediate objects trigger recalcs as expected
fix T4809
2016-11-02 11:31:59 -04:00
Mike Blumenkrantz
6723756d6b
feed mouse-up when dropping a gadget site before enabling events on the site
...
prevents unintentional activation of gadget actions during moves
2016-11-02 10:20:04 -04:00
Mike Blumenkrantz
c3a01ba16c
attempt to recalc gadgets which overflow their container
2016-10-31 13:07:21 -04:00
Mike Blumenkrantz
3d1334e883
delete current dragging gadget during edit if escape is pressed
2016-10-31 13:07:03 -04:00
Mike Blumenkrantz
b0831d5f0d
allow scaling gadgets using wheel events during initial placement
2016-10-31 13:06:18 -04:00
Mike Blumenkrantz
1f9801f922
attempt to handle non-orient gadget resizes based on anchor corners
2016-10-31 13:05:44 -04:00
Mike Blumenkrantz
b9d59616e9
track desktop gadgets based on their zones
...
ensure positioning is accurate with multiple displays
2016-10-31 12:34:29 -04:00
Mike Blumenkrantz
35df03a596
center desktop gadget editor popups upon the zone they have activated
2016-10-31 12:34:29 -04:00
Mike Blumenkrantz
a9d0a27ea3
add generic handler for desktop gadget layers
...
...and a menu item for triggering basic editing
2016-10-26 13:59:29 -04:00
Mike Blumenkrantz
6c16988adc
calc new gadget size based on ratio of size:target site size
...
no use case for this yet...
2016-10-26 13:58:15 -04:00
Mike Blumenkrantz
edee519304
copy gadget position from pointer gadget -> drop gadget when executing drop
...
fixes desync which would cause gadgets to move offscreen
2016-10-26 13:57:07 -04:00
Mike Blumenkrantz
0b40aade50
force gadget site recalc on gadget object creation to ensure sizing
...
fixes initial sizing for no-orient gadget sites
2016-10-26 13:55:45 -04:00
Mike Blumenkrantz
ef2cb47daf
handle no-orient gadget visibility based on site->events visibility
2016-10-26 13:54:25 -04:00
Mike Blumenkrantz
3e6f2f1fa7
add workarounds for ctxpopup geometry for use in input shape tiling
...
ref T4687
2016-10-26 10:28:30 -04:00
Mike Blumenkrantz
8bf7999c31
add gadget site sizing workaround to avoid elm box sizing desync
...
ref T4747
fix T4732
2016-10-19 11:38:34 -04:00
Mike Blumenkrantz
e690d70512
set ON_HOLD flag more accurately when activating gadget actions
...
fixes handling of actions which have same binding as gadget site's container bindings
2016-10-19 11:13:32 -04:00
Mike Blumenkrantz
79b24ea884
handle gadget_popup smart callback on gadget's display object
...
fixes case where this signal was not accurately propagated
ref T4732
2016-10-17 11:57:05 -04:00
Mike Blumenkrantz
d5847e8ca6
call gadget_popup smart callback when configuring gadgets
...
ensure visibility changes are received by containers
ref T4732
2016-10-17 11:56:32 -04:00
Mike Blumenkrantz
d0e21c912a
add gadget_site_(un)locked smart callbacks for forcing gadget site visibility
...
useful for cases where the gadget site has no popups to manage but visibility must
be maintained
ref T4732
2016-10-17 11:55:23 -04:00
Mike Blumenkrantz
baa7e85e61
add EINTERN function for renaming gadget sites
2016-10-13 11:27:12 -04:00
Carsten Haitzler
1afddc3b5e
explicitly use eina list types passing into EINA_LIST_FREE()
2016-10-03 11:55:55 +09:00
Mike Blumenkrantz
2642e8c95a
clamp gadget util ctxpopups to E_LAYER_POPUP at the lowest
...
avoid having these be obscured by windows when the gadget is on a lower layer
2016-10-02 09:35:40 -04:00
Mike Blumenkrantz
b47b3cd75f
force shape queue when gadget util ctxpopups change visibility
...
fixes some input region issues in x11
2016-09-30 12:59:10 -04:00
Mike Blumenkrantz
0074c1ca27
remove extraneous recalc trigger when deleting a gadget
...
CID 1362898
2016-09-21 07:12:49 -04:00
Mike Blumenkrantz
f700a57baf
clean up gadget drop handlers correctly
...
use drop_handler_del when deleting gadget drop handlers, also delete spacer rects
2016-09-20 12:46:46 -04:00
Mike Blumenkrantz
17909e4fb5
always delete gadget's display object and ensure gadget object is null
...
fixes some object errors during container deletion
2016-09-20 11:20:22 -04:00
Mike Blumenkrantz
d1953c2205
always use largest available size for free-oriented gadgets
...
ensure that gadgets don't unexpectedly clamp to minimum size
2016-09-19 15:50:55 -04:00
Mike Blumenkrantz
9439228816
add backspace/delete for clearing all lockscreen gadgets
...
this was turning into a total wasteland
2016-09-19 15:18:06 -04:00
Mike Blumenkrantz
682dd5f835
check visibility of gadget site 'events' member to determine drop availability
...
the layout object of a gadget site does not need to be visible since it may be
used for desktop gadgets or a transparent overlay
2016-09-19 15:04:47 -04:00
Mike Blumenkrantz
b5701bdb1b
adjust gadget drop coords for pointer offset
...
gadgets are centered on the pointer when moved, so the drop coord needs to
then be uncentered to avoid unintended movement
2016-09-19 14:55:53 -04:00
Mike Blumenkrantz
d4450d8eb6
attempt to retain gadget size when executing move operations
2016-09-19 14:55:28 -04:00
Mike Blumenkrantz
8923415f8b
force smart calc on gadget sites at key points during move operations
...
ensure that gadget info and visuals match up
2016-09-19 14:54:35 -04:00
Mike Blumenkrantz
4dd99ed669
add separate codepath for handling layout of moving gadgets
...
these get sized and positioned in a passthrough manner, so avoid doing any calc
2016-09-19 14:53:20 -04:00
Mike Blumenkrantz
42056009a5
set gadget added flag any time a gadget is created or wizarded
...
ensure that desktop gadget editor doesn't exit when attempting to add
subsequent gadgets
2016-09-19 14:32:20 -04:00
Mike Blumenkrantz
ca7bc28286
set the spacer rect as the drop handler base when creating gadget drop handlers
...
this provides layering info to dnd internals
2016-09-15 14:48:28 -04:00
Mike Blumenkrantz
0a9b8889e0
do not attempt to populate gadgets during type_add if site has not yet been populated
...
mostly just fixes some ERRs on init
2016-09-08 10:29:22 -04:00
Mike Blumenkrantz
5da62d9adf
add drop handlers for gadgets
...
a simple wrapper around existing e_dnd functionality
2016-09-06 11:12:31 -04:00
Mike Blumenkrantz
77602a5853
ensure string termination when using strncpy
...
CID 1352823
2016-03-10 11:11:57 -05:00
Mike Blumenkrantz
82a4dbda8d
enforce accurate resizing/orienting when changing the location of a bryce
2016-03-08 12:31:10 -05:00
Mike Blumenkrantz
c139796082
delete gadget display object during object deletion
...
fixes crashing when unloading modules with active gadgets
2016-03-04 17:29:15 -05:00