02-01-2024, 09:00 AM | #1261 | |
Wizard
Posts: 1,106
Karma: 1954138
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 |
|
02-01-2024, 09:17 AM | #1262 | |
Grand Sorcerer
Posts: 11,765
Karma: 7029857
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 | |
|
02-01-2024, 09:21 AM | #1263 |
Wizard
Posts: 1,106
Karma: 1954138
Join Date: Aug 2015
Device: Kindle
|
Thanks
|
02-01-2024, 09:41 AM | #1264 |
Fanatic
Posts: 516
Karma: 32106
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
|
02-08-2024, 12:51 AM | #1265 |
Custom User Title
Posts: 8,755
Karma: 62032371
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 | |
|
02-08-2024, 06:01 AM | #1266 | |
Wizard
Posts: 1,106
Karma: 1954138
Join Date: Aug 2015
Device: Kindle
|
Quote:
Code:
action_chains_default_sub_menu_icon = 'first_action' Code:
action_chains_default_sub_menu_icon = False |
|
02-13-2024, 08:29 AM | #1267 |
Custom User Title
Posts: 8,755
Karma: 62032371
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?
|
02-13-2024, 02:40 PM | #1268 | |
Wizard
Posts: 1,106
Karma: 1954138
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. |
|
02-13-2024, 04:43 PM | #1269 | |
Grand Sorcerer
Posts: 11,765
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
02-13-2024, 04:53 PM | #1270 |
Custom User Title
Posts: 8,755
Karma: 62032371
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.
|
02-13-2024, 04:58 PM | #1271 |
Wizard
Posts: 1,106
Karma: 1954138
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.
|
02-13-2024, 05:00 PM | #1272 |
Grand Sorcerer
Posts: 11,765
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
02-27-2024, 03:49 PM | #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.
|
02-27-2024, 06:45 PM | #1274 | |
Well trained by Cats
Posts: 29,904
Karma: 55267620
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 |
|
03-01-2024, 09:25 PM | #1275 |
want to learn what I want
Posts: 1,039
Karma: 6422750
Join Date: Sep 2020
Device: Calibre E-book viewer
|
Hi capink! Is there some update to this issue? I still can't see any custom icons on the menus nor on the chains dialog.
Last edited by Comfy.n; 03-02-2024 at 03:21 AM. Reason: grammar. grr... |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Action Chains Resources | capink | Plugins | 62 | 05-17-2024 12:54 AM |
[Editor Plugin] Editor Chains | capink | Plugins | 90 | 04-29-2024 12:21 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 |