Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 01-19-2023, 06:19 PM   #1
calibrejunkie
Page Junkie Dev
calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.
 
calibrejunkie's Avatar
 
Posts: 37
Karma: 6280
Join Date: Jul 2018
Location: Earth
Device: Android Phone, Kindle, Surface Pro 3
Question Automatically place plugin icon on main toolbar when installed from batch file?

Hello,

Is it possible to automatically place a plugin's icon in the main calibre toolbar when it is installed from a batch file using "calibre-customize -a"? Or is there perhaps code that can be added to the plugin file itself to accomplish this?

Basically, I have a batch file that installs my plugin, then when calibre restarts, currently I have to manually go to prefs and move it over to the main toolbar using the UI. Of course, after that, calibre remembers so future installs always put the icon back, but I'd like to automate that process if possible so it is already on the main toolbar when calibre restarts on the first-time plugin install.

Thank you for any help you can provide!
calibrejunkie is offline   Reply With Quote
Old 01-19-2023, 08:48 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,017
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can use calibre-debug to run whatever code you like after installing your plugin. Including code to add it to any toolbar.
kovidgoyal is offline   Reply With Quote
Advert
Old 01-19-2023, 09:56 PM   #3
calibrejunkie
Page Junkie Dev
calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.
 
calibrejunkie's Avatar
 
Posts: 37
Karma: 6280
Join Date: Jul 2018
Location: Earth
Device: Android Phone, Kindle, Surface Pro 3
Thank you! Where would I find a reference to the code that places items on the toolbar?
calibrejunkie is offline   Reply With Quote
Old 01-20-2023, 12:44 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,017
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It isnt really documented anywhere. You would need to browse the calibre source. See the preferences/toolbar.py file.
kovidgoyal is offline   Reply With Quote
Old 01-20-2023, 08:56 AM   #5
calibrejunkie
Page Junkie Dev
calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.
 
calibrejunkie's Avatar
 
Posts: 37
Karma: 6280
Join Date: Jul 2018
Location: Earth
Device: Android Phone, Kindle, Surface Pro 3
Thank you!
calibrejunkie is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Request to move "snippets" icon from top toolbar to HTML toolbar nephtys59 Editor 1 07-30-2022 11:44 AM
Sticky second row of main toolbar or move second toolbar to top? Zealousky Calibre 6 04-20-2021 11:58 PM
Kobo device icon on main toolbar? Skydog Calibre 9 05-27-2020 12:59 PM
Plugin icon appears 3X in toolbar eggheadbooks1 Sigil 6 11-17-2016 07:04 PM
Kindle Detected but No Icon in Main Toolbar FalconCobb Devices 2 08-04-2011 12:21 AM


All times are GMT -4. The time now is 04:57 AM.


MobileRead.com is a privately owned, operated and funded community.