-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
adding file to file field - automatically asking what to do? #4356
Comments
We reworked drag and drop completely. If you drop directly on the file field the file will be just linked. |
Its somewhat strange that drop on file field is different from a drop on the rest of the entry editor. I think, this should be aligned (i.e. always rename + move + link). |
I agree with the alignment but not that it must always rename+move+link. I, for one, prefer to keep my files the way I have already named them and in the subfolders they are already in. It could be a Preference choice: "When dropping a file on the entry editor, do you wish to ... Something along those lines. |
So in fact we restore the dialog asking what to do |
Not necessarily if it is in Options -> Preferences. Then one chooses once and that's it. |
Okay, will think about t his: Holding Shift and dragging or directly dropping without key on windows -> move + rename + link The modifiers are the system ones for MOVE, LINK, and COPY. They are system dependent: |
A preference option for the default action is a good idea in my opinion. Thanks @tb77phd for the suggestion. |
If anybody is not looking into this, can I take this issue? |
@shahamish150294 Sure go ahead. as starting point you can look at the EntryEditor and in the LinkedFilesEditor. The methods which handle DragAndDrop are all similiar: |
As part of this task I am also removing the three methods related to Drag and Drop in
because now the drag and drop will be a part of the EntryEditor and hence IMO, this is not needed. Please let me know if I am correct. @Siedlerchr Thanks. |
Is this issue still available to work on? I'd like to contribute for a school project. |
@shahamish150294 Yeah. I think we don't need there any special handling. Please test if it's really sufficient to have them in the entry editor. @morganlovato Seems like @shahamish150294 is already working on this. But you can look through the other issues and take one |
* Add a preference to add files in entry editor (#4356) * Fix import order * Edit changelog * Use enum to represent FileDragDropPreference for Entry Editor * Changes for localization message and replaced boolean for drag and drop preference with enums * Change drag-drop option name in preferences * Added behaviors to accommodate different drag-drop ways along with preference default * Added whitespaces after if condition * Remove unused imports
Thanks to @shahamish150294 this is now implemented in the latest development version. Could you please check the build from http://builds.jabref.org/master/. Thanks! Please remember to make a backup of your library before trying-out this version. |
The latest build seems to reflect the changes. Thank you @tobiasdiez and @Siedlerchr for your help! |
JabRef 5.0-dev--snapshot--2018-11-02--master--611e35a6b Sorry, but in my version drag/drop of a pdf onto an existing entry (both in table and in fiel field of editor) does not result in any effect: no file linked. Only if I use the + button next to the file field in the entry editor, then I can add a single entry. Here, at least, I would also like to be able to add several files (e.g. chapters of a book that are from the same author). |
@ilippert Have you checked the preferences? |
I guess I checjked preference Entry editor Default drag & drop: Copy, rename and link file. The problem is is difficult to reproduce: two times I managed by now to drag a file from external file browser onto the file field and then a link became visible (as expected). But I cannot reliably reproduce this linking. |
It should not only work in the file field, it should work on the whole entry editor. |
just tried again. Interestingly, when I drag & drop a file on the entry editor after phase of non-use, the link is produced. I then remove the link to test again. Now, a second later, I cannot re-perform this effect: no link is produced. |
I believe in some more or less distance past, it was possible to drag and drop a file onto the entry editor's file field and then jabref automatically asked what to do with the file, e.g. automatically rename and store the file in the preferred folder (#4166).
would be amazing if this, too, worked again ;)
The text was updated successfully, but these errors were encountered: