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