Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smart resource pack parsing for file drops / opens #481

Merged
merged 17 commits into from Dec 2, 2022
Merged

Smart resource pack parsing for file drops / opens #481

merged 17 commits into from Dec 2, 2022

Conversation

ryanccn
Copy link
Member

@ryanccn ryanccn commented Nov 19, 2022

This PR parses files opened via XDG, Finder, CLI, or drag and drop to check if they are resource packs, and opens a dialog to import it into an instance if it is one. Otherwise, it falls back to the original instance importing behavior in #229.

Signed-off-by: Ryan Cao 70191398+ryanccn@users.noreply.github.com

ryanccn and others added 6 commits November 19, 2022 23:14
Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
Co-authored-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
@ryanccn ryanccn marked this pull request as ready for review November 19, 2022 16:14
@DioEgizio DioEgizio added the enhancement New feature or request label Nov 19, 2022
Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
@ryanccn ryanccn changed the title Smart resource pack parsing on file handler Smart resource pack parsing for file drops / opens Nov 19, 2022
Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
@flowln flowln self-requested a review November 20, 2022 12:45
This makes it easier to validate individual resources, and allows the
logic to be used in other places in the future, if we need to.

Signed-off-by: flow <flowlnlnln@gmail.com>
They may not hold true at all times, and that's fine.

Signed-off-by: flow <flowlnlnln@gmail.com>
Copy link
Contributor

@flowln flowln left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a couple commits to take the logic you implemented into a separate thing, so that we can maybe fix #349 with it later on.

The instance names get cut off when they're too long. I believe that's the same issue we had with icon names at one point, so maybe there's something there to help fix this :p
image

@ryanccn
Copy link
Member Author

ryanccn commented Nov 21, 2022

Seems like the same issue still exists with icon names O.o

I copied ImportResourcePackDialog off of IconPickerDialog so they should have the same UI and behavior already.

Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
@ryanccn ryanccn requested a review from flowln November 21, 2022 10:21
@Scrumplex Scrumplex added this to the 7.0 milestone Nov 25, 2022
@DioEgizio DioEgizio modified the milestones: 7.0, 6.0 Nov 26, 2022
Copy link
Contributor

@flowln flowln left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do you use that with CLI? -I open the modpack import thingy, so I guess that's not it 🧐

This looks cool. It would perhaps be cooler, though, if there was some info on the RP/TP in the dialog. Perhaps an InfoFrame on the top area would look good :>

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Otherwise isLocalFile() will return false for local files without the
file:// thingy.

Signed-off-by: flow <flowlnlnln@gmail.com>
@flowln flowln merged commit fa98bf1 into PrismLauncher:develop Dec 2, 2022
@ryanccn ryanccn deleted the import-resource-pack-dialog-uwu branch December 2, 2022 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants