Skip to content

Add ability to drag files to and from external applications #7849

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

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

AW1534
Copy link
Member

@AW1534 AW1534 commented Apr 16, 2025

Adds the ability to drag files in and out of LMMS. This required a bit more refactoring than I expected.

video2.mp4

I should note that this doesn't just work to and from the desktop, I've tested with firefox, CLion, dolphin and discord. It also works with more than just sample files (projects, presets, midis, vsts)

@AW1534 AW1534 changed the title Add ability to drag files in and out of LMMS Add ability to drag files to and from external applications Apr 16, 2025
@AW1534
Copy link
Member Author

AW1534 commented Apr 16, 2025

To hell with CodeFactor.

@AW1534 AW1534 added enhancement gui needs testing This pull request needs more testing labels Apr 16, 2025
@szeli1 szeli1 self-requested a review April 16, 2025 20:59
@AW1534
Copy link
Member Author

AW1534 commented Apr 18, 2025

once #7627 is merged, I'd like to add the ability to drag sample clips out of LMMS too. That could be for a different PR though.

@regulus79
Copy link
Contributor

I tested this briefly, and it seems to work! I'm using nautilus on GNOME to drag files in.

Things I noticed (these aren't that important though):

  • Dragging in .xml files which are not presets causes a dummy instrument(?) to be added, and when you click on it, LMMS crashes. This is sort of also in master, but it gives you a warning first.
  • You can't drag in .sf2 files (I think this is in master too)
  • You can't drag in vst effects into an effect chain

@AW1534
Copy link
Member Author

AW1534 commented Apr 18, 2025

Dragging in .xml files which are not presets causes a dummy instrument(?) to be added, and when you click on it, LMMS crashes. This is sort of also in master, but it gives you a warning first.

Okay, this should be a relatively simple fix.

You can't drag in .sf2 files (I think this is in master too)

Thats actually not in master, it's is a regression- Nice catch!

You can't drag in vst effects into an effect chain

This is out of scope as it isn't in master, but it's definitely a good idea for another PR.

@regulus79
Copy link
Contributor

I tested this again, and those two issues do appear to be fixed!

@headquarter8302
Copy link

headquarter8302 commented Apr 19, 2025

In Windows MSVC, dragging instruments to the Song-Editor doesn't work
Edit: I used the right-click menu to insert Mallets, OBS didn't capture the context menu

2025-04-18.23-03-41.mp4

@AW1534 AW1534 removed the needs testing This pull request needs more testing label Apr 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants