![]() |
#1261 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,134
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Quote:
Code:
if gui.library_view.currentIndex(): .... Code:
if gui.library_view.currentIndex().row() >= 0: .... Code:
if gui.library_view.currentIndex().row() != QModelIndex(): .... Code:
gui.search.set_search_string(search_string) gui.search.do_search() Last edited by capink; 02-01-2024 at 03:54 PM. Reason: remove attatchment |
|
![]() |
![]() |
![]() |
#1262 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,911
Karma: 7076137
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
dex = gui.library_view.currentIndex() if dex.isValid(): row = dex.row() .... Code:
python: def evaluate(book, context): from calibre.gui2.ui import get_gui gui = get_gui() dex = gui.library_view.currentIndex() print(dex, dex.isValid()) return f'row = {dex.row()}' if dex.isValid() else 'Not valid' |
|
![]() |
![]() |
Advert | |
|
![]() |
#1263 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,134
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Thanks
![]() |
![]() |
![]() |
![]() |
#1264 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 519
Karma: 32158
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
|
![]() |
![]() |
![]() |
#1265 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,229
Karma: 63194753
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Is it possible to give a submenu an icon other than the first chain?
|
![]() |
![]() |
Advert | |
|
![]() |
#1266 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,134
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Quote:
Code:
action_chains_default_sub_menu_icon = 'first_action' Code:
action_chains_default_sub_menu_icon = False |
|
![]() |
![]() |
![]() |
#1267 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,229
Karma: 63194753
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Aside from manually checking all my chains, is there a way to tell if a chain is being used in a caller action prior to rename?
|
![]() |
![]() |
![]() |
#1268 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,134
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Quote:
Warning: The second option is untested and it might destroy your config. Make sure to make a copy of your "Action Chains.json" file before proceeding. Do this every time you run it. |
|
![]() |
![]() |
![]() |
#1269 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,911
Karma: 7076137
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#1270 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,229
Karma: 63194753
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I didn't think of checking the json directly. That should work and be less risky. Thanks both.
|
![]() |
![]() |
![]() |
#1271 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,134
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Yes, that would be much simpler. Sometimes you miss simple things in front of you, especially at night after a long day at work.
|
![]() |
![]() |
![]() |
#1272 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,911
Karma: 7076137
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
![]() |
![]() |
![]() |
#1273 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Mar 2013
Device: iPad
|
Duplicate Plugin by Grant Drake
Some when I lost the Duplicate Plugin icon on the main menu. It appears to install OK but now I have no way of running it. Any ideas? Have uninstalled and reinstalled with no success.
|
![]() |
![]() |
![]() |
#1274 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,290
Karma: 57979022
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
If the PI is installed correctly: there will be an icon on the left. Use the arrow to move it to the right |
|
![]() |
![]() |
![]() |
#1275 | |
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,102
Karma: 6425162
Join Date: Sep 2020
Device: Calibre E-book viewer
|
Quote:
![]() Last edited by Comfy.n; 03-02-2024 at 03:21 AM. Reason: grammar. grr... |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Editor Plugin] Editor Chains | capink | Plugins | 94 | 07-03-2024 07:26 PM |
Action Chains Resources | capink | Plugins | 65 | 07-01-2024 03:12 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 |