IJHack / QtPass

QtPass is a multi-platform GUI for pass, the standard unix password manager.
https://qtpass.org/
GNU General Public License v3.0
1.02k stars 162 forks source link

drag and drop for passwords and passwordfolders to move passwords and passwordfolders #239

Open YoshiMan opened 7 years ago

YoshiMan commented 7 years ago

pass setting

moving a folder into a folder

  1. @Given The user enabled the pass setting.
  2. @When The user drags and drops within the passwordstoragetreeview a folder1 onto folder2 or under.
  3. @Then Folder1 would be moved into folder2 via pass mv folder1 folder2/folder1

moving a folder into a file

  1. @Given The user enabled the pass setting.
  2. @When The user drags and drops within the passwordstoragetreeview folder1 onto file1.
  3. @Then nothing will happen.

moving a file into a file

  1. @Given The user enabled the pass setting.
  2. @When The user drags and drops within the passwordstoragetreeview file1 onto file2.
  3. @Then nothing will happen. (we could think of pass mv -f file1 file2 , but this would force an overwrite) @annejan what do you think?

moving a file into a folder

  1. @Given The user enabled the pass setting.
  2. @When The user drags and drops within the passwordstoragetreeview a file1 onto folder1 or under.
  3. @Then File1 would be moved into folder1 via git mv file1 folder1

no pass setting, but git setting

moving a folder into a folder

  1. @Given The user enabled the git setting, but disabled the pass setting.
  2. @When The user drags and drops within the passwordstoragetreeview a folder1 onto folder2 or under.
  3. @Then Folder1 would be moved into folder2 via git mv folder1 folder2/folder1

moving a folder into a file

  1. @Given The user enabled the git setting, but disabled the pass setting.
  2. @When The user drags and drops within the passwordstoragetreeview folder1 onto file1.
  3. @Then nothing will happen.

moving a file into a file

  1. @Given The user enabled the git setting, but disabled the pass setting.
  2. @When The user drags and drops within the passwordstoragetreeview file1 onto file2.
  3. @Then nothing will happen. (we could think of git mv -f file1 file2 , but this would force an overwrite) @annejan what do you think?

moving a file into a folder

  1. @Given The user enabled the git setting, but disabled the pass setting.
  2. @When The user drags and drops within the passwordstoragetreeview a file1 onto folder1 or under.
  3. @Then File1 would be moved into folder1 via git mv file1 folder1

no pass setting and no git setting

moving a folder into a folder

  1. @Given The user disabled the git setting and disabled the pass setting.
  2. @When The user drags and drops within the passwordstoragetreeview a folder1 onto folder2 or under.
  3. @Then Folder1 would be moved into folder2 via QDir::rename(folder1, folder2/folder1)

moving a folder into a file

  1. @Given The user disabled the git setting and disabled the pass setting.
  2. @When The user drags and drops within the passwordstoragetreeview folder1 onto file1.
  3. @Then nothing will happen.

moving a file into a file

  1. @Given The user disabled the git setting and disabled the pass setting.
  2. @When The user drags and drops within the passwordstoragetreeview file1 onto file2.
  3. @Then nothing will happen. (we could think of QFile::remove(file2) + QFile::rename(file1, file2) , but this would force an overwrite) @annejan what do you think?

moving a file into a folder

  1. @Given The user disabled the git setting and disabled the pass setting.
  2. @When The user drags and drops within the passwordstoragetreeview a file1 onto folder1 or under.
  3. @Then File1 would be moved into folder1 via QFile::rename(file1, folder1/file1)
jounathaen commented 7 years ago

I think it is more usable, when you drag file/folder on a file, to copy/move the item to the parent folder. This is what most filemanagers do. This is indicated by a horizontal line between the 'drag onto' item and the item above this item in the treeview. So you can drop a file 'inside' a folder and not only on the folder entry.

YoshiMan commented 7 years ago

You are right. Will update the issuse I will open an other issues with the same, but copying. And another with the renaming option via rightclick or hit F2 button.

YoshiMan commented 7 years ago

woohoo d'n'd with folders works. @annejan @jounathaen Is there a reason why the proxy model is used for the treeview and storemodel. I removed the proxy mechanism and it works, execpt for the search, but i will fix this soon.

annejan commented 7 years ago

The proxymodel is/was for search alone as far as I can remember @YoshiMan

New issue for implementation notifying @dromer @nbm077

YoshiMan commented 7 years ago

opened a pullrequest #245 . Please test with all settigns (pass dis/enabled, git dis/enabled) and on different OSes. I tried all possible settings on Linux Arch with QT5.