12-06-2021, 02:59 PM | #1 |
Junior Member
Posts: 4
Karma: 10
Join Date: Dec 2021
Device: pocketbook
|
Gui Plugin Not accessable when modals like EditMetadata are open
Hello,
i'm writing a gui plugin. It works perfect as a non modal dialog, attached to the calibre main window. After opening a modal dialog like "Edit Metadata" the plugin-window is not accessable. I've tried for days to set a new parent or cheating the window to stay enabled on top of the editmetadata-window, because it should also work on that. Can you give me a hint how to achieve it? Thanks Jana |
12-06-2021, 04:02 PM | #2 |
null operator (he/him)
Posts: 20,598
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Moderator Notice
This is a development query, so I'll move it to the Developers forum BR |
Advert | |
|
12-06-2021, 08:46 PM | #3 |
creator of calibre
Posts: 43,896
Karma: 22666668
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You cant. plugins dont integrate with sub-dialogs in the calibre GUI. Only the main window. What is your plugin trying to achieve?
|
12-07-2021, 12:04 PM | #4 |
Junior Member
Posts: 4
Karma: 10
Join Date: Dec 2021
Device: pocketbook
|
The best view is the "Edit Metadata" view.
While looking at the data, I want to * extract the title from all big letters of the description * Format the title with ONE click (headline spelling) * swap author and title * extract series from title (series 101 - title) or (title - series 101) * Search title and author with google * Download and save metadata * Edit the description and more everything is working fine, but I have to * Open Edit Metadata, * Browse through the entries * CLOSE the dialog to click in my Plugin * Open Edit Metadata again I know the non modal dialog which appears after clicking twice on the picture, but the better UI is the edit metadata dialog This dialog is for viewing. You can't edit things (of course that is done in the edit metadata dialog). So I helped myself by adding the descrition editor on my plugin window. But that's a worse solution ;-) https://www.mobileread.com/forums/at...1&d=1638896065 |
12-07-2021, 09:25 PM | #5 |
creator of calibre
Posts: 43,896
Karma: 22666668
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can do most of that already. For extracting data from titles use the regex in Preferences->Adding books and title casing is available by right clicking the field. And downloading and editing metadata is obv available already.
|
Advert | |
|
12-08-2021, 05:13 PM | #6 | |
Junior Member
Posts: 4
Karma: 10
Join Date: Dec 2021
Device: pocketbook
|
Dear Kovid,
Quote:
I know that function to change casing, but it's "hidden" in a sub menu of a context menu. (by the way, lower / uppercase is working every time. titleing is often not working. I have to lowercase the text and than titeling. That works) I have books in calibre which are a mess ;-). Title and autor are sometimes swapped, Surname and name are wrong sorted, metadata could not retireved with the existing plugins. So I want to correct all entries. Since the input is so different, it's difficult to make all perfect with some regex. I made the plugin to have the most used functions "at the hand" because I have to look at the entries to decide how to handle. Some examples: Title - series #x Series x - Title Title : Series Series # : Title with - in it i.e "the next-used issue" So I've added that to the plugin Label: Button: Button: Extract Series (from left seperated by (or from right) Extract Series (from left seperated by -) (or from right) Next issue: Some Metadata cannot be retrieved by the implemented search. What's working most times: os.exec call the browser with google search. Parameters: Title - Author You can find the book with a description. So I copy / paste the description to calibre. If I'm have "edit metadata" open, I cannot use the plugins If I'm in the main-window, i cannot paste the description. Am I right, that the disabled plugin with an open modal dialog is an QDialog issue? One hack would perhaps be to clone the editmetadata dialog and show it as non modal dialog, but then I have to save immediately changed data before navigating to another entry. In the edit metadata dialog you can edit a lot of books and than you can "cancel". So does the dialog cache all the data? I hope I could clarify that I want to do with the plugin Another issue I've found: If you use the edit metadata dialog and navigate through the entries with ALT left/right, the focus disappears. For example: I click in the author field and (mass) change things. Now I want to edit the next entry -> alt - right: the focus is not in the author field any more. Is that an little bug? ;-) Thanks for your time have a nice day Jana |
|
12-18-2021, 05:20 AM | #7 |
Junior Member
Posts: 4
Karma: 10
Join Date: Dec 2021
Device: pocketbook
|
Hi Kovid,
do you have any news for me? Thanks Jana |
Tags |
plugin modal diaog |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Open With | kiwidude | Plugins | 403 | 04-01-2024 08:39 AM |
[GUI Plugin] Save Virtual Libraries To Column (GUI) | chaley | Plugins | 14 | 04-04-2021 05:25 AM |
plugin api call to do editmetadata->merge functions? | minektur | Development | 3 | 01-28-2019 09:45 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |