![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: May 2012
Device: kindle
|
Deleting book
Hi, I'm doing my first contribution to an open source community, and I choose calibre to start. I'm looking for something simple to begin. I noticed that when you delete a book its cover doesn't disappear from the right side bar. I want to change this behavior and automatically select the next book on list to have it's cover shown on this bar.
I'm looking at the calibre/gui2/actions/delete.py file. I have some questions: 1 - Where can I see the available methods and variables for self.gui? I understood that this is used to access the gui elements, but i couldn't find what it's available to be used. 2 - To do what I'm pretending to do, where else in the code should I be also looking? Thanks. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,260
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If you want to see what methods are available on any python object just insert a
print (vars(obj)) and run calibre with calibre-debug -g The self.gui class is defined in gui2/ui.py |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: May 2012
Device: kindle
|
Also in the delete.py file:
I can't find the methods for library_view variable in Code:
self.gui.library_view Code:
print (vars(self.gui.library_view)) |
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: May 2012
Device: kindle
|
I'm guessing this is something from QT library.
|
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,260
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
library/views.py
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: May 2012
Device: kindle
|
Great!
It's working. Just one more thing: When you delete all books from calibre, the cover of the last selected book still appears on the right side bar. How can I set this image to switch to the "default_cover" instead? |
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,260
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
gui2/book_details.py
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Troubleshooting Deleting a book with annotations, will it warn me? | Gary King | Amazon Kindle | 3 | 01-08-2012 03:14 PM |
deleting a book | StickMaker | Amazon Kindle | 9 | 09-18-2011 03:40 PM |
Deleting book from sig | joycedb | Feedback | 19 | 09-12-2011 09:47 AM |
Deleting a Book..?? | Cpl Punishment | Nook Color & Nook Tablet | 2 | 01-30-2011 08:48 PM |
Troubleshooting Help deleting book from Kindle 3 | jocampo | Amazon Kindle | 6 | 12-10-2010 10:27 AM |