![]() |
#391 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,016
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
|
![]() |
![]() |
![]() |
#392 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,016
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I have this template for single field edit an integer column:
Code:
program: if raw_field('#percentread') ==# '0' then '1' fi This worked and did not change other values: Code:
program: if raw_field('#percentread') ==# '0' then '1' else raw_field('#percentread') fi Last edited by ownedbycats; 03-16-2021 at 12:55 AM. |
![]() |
![]() |
![]() |
#393 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,197
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
Yes, that is the expected behavior. The plugin actions do not know anything about the template, they only know the output of the template expression. If the output of the template is an empty string '' or a null, it will set the column to undefined.
The onus is on the user to write template that returns the correct value. |
![]() |
![]() |
![]() |
#394 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,016
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
That makes sense.
Also, is it expected for identifiers to be absent from the column list in single field edit? |
![]() |
![]() |
![]() |
#395 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,197
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
Quote:
Quote:
The new combobox was changed into a tree view so that if in the future other plugins provide actions, they will be displayed in a hierarchy (Third Party Plugins Actions > Plugin Name > Action Name). Custom Actions can also be displayed in tree view by setting the attribute display_tree. If I cannot solve this issue I will have to revert to original combobox where all items are displayed in one list view. Last edited by capink; 03-16-2021 at 05:01 PM. Reason: removed attachment |
||
![]() |
![]() |
![]() |
#396 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,016
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Thank you
|
![]() |
![]() |
![]() |
#397 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,016
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Also, would it be possible to grey out the configuration button when there is nothing on an action to configure? I think the only thing that does this is user modules though.
|
![]() |
![]() |
![]() |
#398 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,197
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
Well, it is not a real button, just a drawing. The settings dialog actually opens in response to clicking the cell containing the fake button.
For technical reasons I was not able to have a button inside the qtableview behave as I wanted. So, I did this hack and it took me long time to figure out how to draw it, so I am probably not going any further than this. I generally struggle much with the whole painting, colors, drawing .... etc. Last edited by capink; 03-16-2021 at 06:54 AM. |
![]() |
![]() |
![]() |
#399 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,449
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Action Chains.gui.misc.StandardItem Code:
class StandardItem(QStandardItem): def __init__(self, txt=''): super().__init__() self.setEditable(False) self.setText(txt) If you do want to change colors then you should decide what to do depending on QApplication.instance().is_dark_theme. You will also probably want to override the data() method in QStandardItem to return the colors you want depending on what is being shown. |
|
![]() |
![]() |
![]() |
#400 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,197
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
Thanks a lot for taking the time to help with this.
![]() |
![]() |
![]() |
![]() |
#401 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,449
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
You are welcome. Ask anytime.
I have struggled with Qt's graphics and widgets for years and have reached an only moderate skill level. Kovid's help has been invaluable. It is only fair to pass it on. Last edited by chaley; 03-16-2021 at 07:45 PM. |
![]() |
![]() |
![]() |
#402 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,016
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
|
![]() |
![]() |
![]() |
#403 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,016
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Is it possible to toggle hiding a certain category in the tag browser using a module? (e.g. using the event manager to unhide "Kobo Collections" when a device is plugged in then hiding it again when it's ejected).
Last edited by ownedbycats; 03-16-2021 at 06:25 PM. |
![]() |
![]() |
![]() |
#404 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,449
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
There is no API, public or private, to hide and unhide tag browser categories.
|
![]() |
![]() |
![]() |
#405 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,197
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
Version 1.4.2
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Editor Plugin] Editor Chains | capink | Plugins | 106 | 06-17-2025 05:36 PM |
Action Chains Resources | capink | Plugins | 77 | 06-16-2025 12:45 PM |
[GUI Plugin] Noosfere_util, a companion plugin to noosfere DB | lrpirlet | Plugins | 2 | 08-18-2022 03:15 PM |
[GUI Plugin] Save Virtual Libraries To Column (GUI) | chaley | Plugins | 14 | 04-04-2021 05:25 AM |