Commit graph

4781 commits

Author SHA1 Message Date
Soreepeong
ff7dd2d0c3 Prevent notification from being saved into ui.ini 2024-03-21 07:41:25 +09:00
goaaats
714e9e0319 pm: don't throw if there are no valid versions for a plugin 2024-03-20 23:33:35 +01:00
goat
0382b927ea
ci: re-enable rollup for new_im_hooks 2024-03-20 23:05:27 +01:00
goaaats
f9847398d2 settings: get "reduced motion" setting from WinApi 2024-03-20 22:14:24 +01:00
srkizer
95defa200f
Add Reduced Motion for Notifications (#1732)
When Reduced Motion configuration is on, the expiry progressbar is
removed, and instead a pie on top right is shown, and relative time
update interval increases to 15 seconds. Progress wave animation also is
suppressed.
2024-03-20 21:53:20 +01:00
goaaats
fb60ac5b4b style editor: don't allow rename/delete of Dalamud Classic 2024-03-20 21:34:10 +01:00
goat
d1d72f2aef
build: 9.1.0.0 2024-03-20 15:57:36 +01:00
goaaats
fa111c3a70 installer: also fade overlay 2024-03-19 23:28:02 +01:00
goaaats
ec122c85d5 fix warnings 2024-03-19 23:24:23 +01:00
goaaats
148de97331 installer: fade icons when loading 2024-03-19 23:17:15 +01:00
goaaats
4e7531f703 installer: always pick dev plugin first when collecting local plugins for available manifests
fixes a bug where the available and the installed plugin showed separately in the plugin list if the LocalDevPlugin of the same internalname was in it before the LocalPlugin
2024-03-19 22:43:48 +01:00
goat
639cb1ac33
Merge pull request #1731 from goatcorp/net8
.NET 8
2024-03-19 22:15:35 +01:00
Kaz Wolfe
a372476340
chore: bump clientstructs 2024-03-19 08:20:40 -07:00
KazWolfe
9c771f4446
Merge pull request #1730 from goatcorp/net8-rollup
[net8] Rollup changes from master
2024-03-19 08:17:02 -07:00
github-actions[bot]
fe80490d5e Merge remote-tracking branch 'origin/master' into net8-rollup 2024-03-19 15:04:46 +00:00
srkizer
be63276a85
Rename to Framework.Run (#1728) 2024-03-19 08:04:21 -07:00
Kara
d393fa64b6
Add tests for GameVersionConverter and fix edge case (#1726)
- Adds tests for GameVersionConverter
- Refactors GameVersionConverter to reduce nesting
- Fixes an edge case in GameVersion deserialization in which the JsonConstructor will be invoked even if no properties match
- Adds a test for the GameVersion deserialization edge case
2024-03-18 20:12:34 -07:00
KazWolfe
7fcd10ecd8
Merge pull request #1724 from goatcorp/net8-rollup
[net8] Rollup changes from master
2024-03-18 20:11:31 -07:00
github-actions[bot]
990f04715f Merge remote-tracking branch 'origin/master' into net8-rollup 2024-03-19 03:11:08 +00:00
srkizer
5d473919a1
Hide scheduler from RunOnFrameworkThread (#1725)
* Hide scheduler from RunOnFrameworkThread

Creating new tasks via Task.Run and alike would fetch the current
scheduler, which we do not want in case of running stuff from the
framework thread. Change is to prevent the standard library from seeing
the "current scheduler". If one wants to use `await` with an async
function to be run in the framework thread, one can use
`RunOnFrameworkThreadAwaitable` instead now.

* TaskSchedulerWidget: test better stuff

* TaskSchedulerWidget: add freeze tests

* More comments

* Make TaskFactory a getter method instead of property to avoid bad suggestions

* Why are there stuff still not pushed
2024-03-18 20:10:47 -07:00
srkizer
c709ad1811
Make NotificationManager IInternalDisposableService (#1723)
Pull request merge order shenanigans.
2024-03-16 19:44:10 +00:00
goat
772117ef24
Merge pull request #1721 from goatcorp/net8-rollup
[net8] Rollup changes from master
2024-03-16 17:14:48 +01:00
github-actions[bot]
4abb3535fa Merge remote-tracking branch 'origin/master' into net8-rollup 2024-03-16 16:02:57 +00:00
srkizer
e52c2755cb
Fix CreateImGuiRangesFrom to omit null char (#1709)
* Fix CreateImGuiRangesFrom to omit null char

UnicodeRanges.BasicLatin is [0, 127], but ImGui stops reading the glyph
range list on encountering a zero. Fixed that by ensuring that 0 never
appears in the glyph range list.

* Make problems explicit

---------

Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
2024-03-16 16:02:36 +00:00
srkizer
87b9edb448
Add IInternal/PublicDisposableService (#1696)
* Add IInternal/PublicDisposableService

Plugins are exposed interfaces that are not inherited from
`IDisposable`, but services implementing plugin interfaces often
implement `IDisposable`. Some plugins may try to call
`IDisposable.Dispose` on everything provided, and it also is possible to
use `using` clause too eagerly while working on Dalamud itself, such as
writing `using var smth = await Service<SomeService>.GetAsync();`. Such
behaviors often lead to a difficult-to-debug errors, and making those
services either not an `IDisposable` or making `IDisposable.Dispose` do
nothing if the object has been loaded would prevent such errors. As
`ServiceManager` must be the only class dealing with construction and
disposal of services, `IInternalDisposableService` has been added to
limit who can dispose the object. `IPublicDisposableService` also has
been added to classes that can be constructed and accessed directly by
plugins; for those, `Dispose` will be ignored if the instance is a
service instance, and only `DisposeService` will respond.

In addition, `DalamudPluginInterface` and `UiBuilder` also have been
changed so that their `IDisposable.Dispose` no longer respond, and
instead, internal functions have been added to only allow disposal from
Dalamud.

* Cleanup

* Postmerge fixes

* More explanation on RunOnFrameworkThread(ClearHooks)

* Mark ReliableFileStorage public ctor obsolete

---------

Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
2024-03-16 15:58:05 +00:00
goat
dcec076ca7
Merge pull request #1681 from Soreepeong/feature/inotificationmanager
Implement INotificationManager
2024-03-16 16:46:12 +01:00
Ridan Vandenbergh
0656a524b1
Add missing space in cross-world PF links (#1717) 2024-03-16 16:45:19 +01:00
Kara
1e8fb2e363
Add tests for ReliableFileStorage (#1718) 2024-03-16 16:43:01 +01:00
wolfcomp
3f4a91b726
Handle static declares in AddonLifecycleWidget (#1720)
* Handle static declares

old way: <https://learn.microsoft.com/en-us/dotnet/api/system.delegate.target?view=net-8.0#property-value>

new way: <https://learn.microsoft.com/en-us/dotnet/api/system.reflection.memberinfo.declaringtype?view=net-8.0#property-value>

* get full name instead of class name
2024-03-16 16:42:24 +01:00
goat
44e847a5d6
Dalamud.Plugin.targets TFM => net8.0-windows 2024-03-16 16:41:44 +01:00
srkizer
710fff118d
Remove unnecessary stuff from ObjectTable (#1713)
* Remove unnecessary stuff from ObjectTable

* Remove unused

* fix
2024-03-14 14:37:52 -07:00
Kaz Wolfe
0d7a036ff1
fix: OT caching fix until Kizer can PR a better version 2024-03-13 21:47:47 -07:00
rootdarkarchon
2721e2df16
Resolve stale pointer issues (#1711)
* Resolve stale pointer issues

* remove unncessary FrameworkOnBeforeUpdate

---------

Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
2024-03-13 21:41:02 -07:00
KazWolfe
1128d93fec
Merge pull request #1712 from karashiiro/fix/gameversion-issues
Fix edge case in GameVersion instance creation and refactor
2024-03-13 21:40:36 -07:00
karashiiro
66a04cb45d Fix edge case in GameVersion and refactor
- Test coverage has been added for the entire class, and verbose/redundant code has been refactored
- Fixes JSON serialization: JsonConstructor requires that the ctor parameters match fields/properties of the target class.
Previously, this meant that the JSON constructor would always throw an ArgumentNullException, as `Input` was not a class property.
2024-03-13 21:40:25 -07:00
KazWolfe
e50f9cda99
Merge pull request #1710 from goatcorp/net8-rollup
[net8] Rollup changes from master
2024-03-13 21:40:02 -07:00
github-actions[bot]
458e48c088 Merge remote-tracking branch 'origin/master' into net8-rollup 2024-03-14 04:35:37 +00:00
srkizer
4c18f77f51
Fix log window layout (#1706)
* Fix log window layout

Fixed custom line rendering from not advancing ImGui cursor, and move
input boxes around as log window is resized to become narower.

* Undo unused change
2024-03-13 21:35:14 -07:00
Soreepeong
27e96e12ea Postmerge 2024-03-14 13:08:59 +09:00
Soreepeong
033a57d19d Merge remote-tracking branch 'upstream/master' into feature/inotificationmanager 2024-03-14 13:06:04 +09:00
Soreepeong
9724e511e9 Add INotification.RespectUiHidden 2024-03-14 13:05:46 +09:00
Soreepeong
ecfbcfe194 Draw DefaultIcon instead of installed/3pp icon if plugin is gone 2024-03-14 12:55:28 +09:00
Soreepeong
76ca202f38 Comments on RemoveNonDalamudInvocations 2024-03-14 12:54:12 +09:00
srkizer
cf4a9e3055
Easier SingleFontChooserDialog ctor, window pos/size/flags, and more docs (#1704)
* Make SingleFontChooserDialog ctor less confusing

The current constructor expects a new fresh instance of IFontAtlas,
which can be easy to miss, resulting in wasted time troubleshooting
without enough clues. New constructor is added that directly takes an
instance of UiBuilder, and the old constructor has been obsoleted and
should be changed to private on api 10.

* Add position, size, and window flags conf to SFCD

* Improve documentations

* Add test for PopupPosition/Size

---------

Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
2024-03-14 00:57:30 +01:00
srkizer
a26bb58fdb
Use custom TaskScheduler for Framework.RunOnTick (#1597)
* Use custom TaskScheduler for Framework.RunOnTick

* TaskSchedulerWidget: add example
2024-03-14 00:36:38 +01:00
srkizer
666feede4c
Suppress DAssetM dispose exceptions (#1707)
Whether an asset being unavailable should be an error is decided on
Dalamud startup time. This suppresses assets unavailable exceptions on
Dispose.
2024-03-13 23:36:43 +01:00
rootdarkarchon
31227016c1
Add Object Table Cache (#1708)
Proposed improvement to object table access speeds; prevents creating objects for every plugin iterating the object table.

---------

Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
Co-authored-by: Soreepeong <soreepeong@gmail.com>
2024-03-13 14:13:29 -07:00
Kaz Wolfe
6f2ebdc7a7
Upgrade ClientStructs to .NET 8 2024-03-11 09:15:45 -07:00
KazWolfe
27def97228
Merge pull request #1695 from goatcorp/net8-rollup
[net8] Rollup changes from master
2024-03-10 12:27:25 -07:00
github-actions[bot]
11c1759b60 Merge remote-tracking branch 'origin/master' into net8-rollup 2024-03-08 22:05:05 +00:00