ralsina / aranduka

Automatically exported from code.google.com/p/aranduka
0 stars 1 forks source link

Delete a file from a Book #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A book can be associated to many files. If you delete a book, all its files are 
deleted. We need to figure out a UI to delete single files from a book, maybe 
in the book editor.

Original issue reported on code.google.com by andresgattinoni on 27 Jan 2011 at 11:40

GoogleCodeExporter commented 9 years ago

Original comment by andresgattinoni on 28 Jan 2011 at 5:39

GoogleCodeExporter commented 9 years ago
First step: moving the deletion of the file from the filesystem to the File 
model on r1c07ffe2a5

Original comment by andresgattinoni on 30 Jan 2011 at 2:29

GoogleCodeExporter commented 9 years ago
This issue was updated by revision c0f1226080.

Merging the changes made so far on branch issue22 to the integrate branch. The 
branch will remain open until the other aspects of the issue are addressed.

Original comment by andresgattinoni on 1 Feb 2011 at 2:59

GoogleCodeExporter commented 9 years ago
We will be able to close this when the new "About this book" page it's done.

Original comment by andresgattinoni on 1 Feb 2011 at 10:51

GoogleCodeExporter commented 9 years ago
Right now when you delete a Book from Aranduka it deletes all the files 
associated too. May be that's not quite right.. we should ask the user if he 
wants to erase the files too or just delete the entry from de database, 
shouldn't we?

Original comment by algoz...@gmail.com on 24 Feb 2011 at 11:49

GoogleCodeExporter commented 9 years ago
This issue was updated by revision d39c6835feea.

I've fixed this. I replaced the QMessageBox.question with a new custom dialog 
which asks you if you want
to delete the book and lets you mark if you want the files to be deleted as 
well (checked by default).
I also made the necessary changes on Book and File models.

Original comment by andresgattinoni on 5 Apr 2011 at 10:20

GoogleCodeExporter commented 9 years ago
Can you review it?

Original comment by andresgattinoni on 5 Apr 2011 at 10:21

GoogleCodeExporter commented 9 years ago
Cool! I'll check it right now.. :-)

Original comment by algoz...@gmail.com on 6 Apr 2011 at 5:51

GoogleCodeExporter commented 9 years ago
Seems to work OK here.. both, with downloaded books and with files that were 
already in the hard drive.

Original comment by algoz...@gmail.com on 6 Apr 2011 at 6:28

GoogleCodeExporter commented 9 years ago
Ok, I'll merge it with the integrate branch. The issue will remain open until 
we add the hability to delete a file from a book on the "About this book" 
screen (issue 35).

Original comment by andresgattinoni on 6 Apr 2011 at 8:36

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 192dff3181d5.

Merging issue22 to integrate branch

Original comment by andresgattinoni on 6 Apr 2011 at 8:40

GoogleCodeExporter commented 9 years ago
Adnrés, I've added the ability to delete a single file from the book and the 
book. For the latter we need to merge isue35 with integrate. I'm having trouble 
with single files. They get deleted from the disk and database, but the're 
still associated with the book after the delete process.. :-/

You can check it out at the issue35 branch.

Original comment by algoz...@gmail.com on 8 Apr 2011 at 6:43

GoogleCodeExporter commented 9 years ago
Can you point to me where in issue35 branch is the call for the removal of the 
file?

Original comment by andresgattinoni on 9 Apr 2011 at 2:31

GoogleCodeExporter commented 9 years ago
Andrés these are the changes:
 http://code.google.com/p/aranduka/source/detail?r=5fb321f8a3d0e162542adcdf2a5d34b66b5a92c4

But basically, you have to change to the issue35 branch (hg up issue35) run 
aranduka and double click a book, in the files list there are two options: open 
and delete. And below that a Delete Book option; there are all text links, we 
can use icons or something more elegant if you like..

I've attached a screenshot just in case I broke something with the push.

Original comment by algoz...@gmail.com on 9 Apr 2011 at 10:33

Attachments:

GoogleCodeExporter commented 9 years ago
I think the problem there is that you're not commiting the transaction:
http://code.google.com/p/aranduka/source/browse/src/main.py?r=issue35#370
See how it's done here:
http://code.google.com/p/aranduka/source/browse/src/book_editor.py?r=issue35#261

Original comment by andresgattinoni on 10 Apr 2011 at 1:38

GoogleCodeExporter commented 9 years ago
That's embarrasing :-$.. that was the problem. Thanks! fixed and pushed.

No I'm trying to move the about_book_openLink() function to the About class, 
Should I? or do I leave it in the Main class?

Original comment by algoz...@gmail.com on 10 Apr 2011 at 6:44

GoogleCodeExporter commented 9 years ago
By the way, I think you can close this issue now.

Original comment by algoz...@gmail.com on 11 Apr 2011 at 1:29

GoogleCodeExporter commented 9 years ago
You're right, we should continue with this on issue 35.

Original comment by andresgattinoni on 11 Apr 2011 at 2:09