|  07-25-2014, 11:18 PM | #61 | |
| Well trained by Cats            Posts: 31,249 Karma: 61360164 Join Date: Aug 2009 Location: The Central Coast of California Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A | Quote: 
 I installed the PI the normal 'from file' way with the editor closed. The steps I listed was what happened with both 203 and 1.46 (Windows) Confirming Before Plugin: No Plugins on the Menu The problem is with getting the Icon on the User PI tool bar to show (the first time). I added a separator at the top of the User PI Menu list, to make it clear which toolbar the Icon was on. Once it shows, it stays. | |
|   |   | 
|  07-25-2014, 11:23 PM | #62 | |
| Grand Sorcerer            Posts: 24,905 Karma: 47303824 Join Date: Jul 2011 Location: Sydney, Australia Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos | Quote: 
 | |
|   |   | 
|  07-25-2014, 11:30 PM | #63 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			No plugins are book wide only. If you wish to run it only only the currently opened file, you can do so by simply restricting the files your plugin processes. Get the name of the file like this from calibre.gui2.tweak_book import editor_name name = editor_name(self.gui.current_editor) And I suggest adding a submenu to the plugins menu entry that allows the user to toggle what mnode the plugin operates in. | 
|   |   | 
|  07-26-2014, 12:12 AM | #64 | 
| Guru            Posts: 820 Karma: 6528026 Join Date: Sep 2012 Device: Kobo Elipsa | |
|   |   | 
|  07-26-2014, 12:14 AM | #65 | |
| Grand Sorcerer            Posts: 24,905 Karma: 47303824 Join Date: Jul 2011 Location: Sydney, Australia Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos | Quote: 
 I'll probably add some extra function. I was thinking of prompting with a list of stylesheets to sort, but I like the idea of restricting it to the current file as Kovid suggests. Plus handling the specificity and rules without a specifier. | |
|   |   | 
|  07-26-2014, 12:57 AM | #66 | 
| Well trained by Cats            Posts: 31,249 Karma: 61360164 Join Date: Aug 2009 Location: The Central Coast of California Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A | 
			
			David I was reading in the Modify EPUB PI topic and something    Duplicate Selectors  and changing their ORDER  when sorting could have significant effects on the document. Maybe ? 1) Display a pre-sort warning if dups are found and: a) allow a Bailout b) just refuse to proceed. 2) Use a 'bubble sort' so the order does not change. I know, Bubble Sorts are slow. | 
|   |   | 
|  07-26-2014, 05:31 AM | #67 | |
| Grand Sorcerer            Posts: 24,905 Karma: 47303824 Join Date: Jul 2011 Location: Sydney, Australia Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos | Quote: 
 Code: name = editor_name(self.gui.central.current_editor) | |
|   |   | 
|  07-26-2014, 05:52 AM | #68 | ||
| Grand Sorcerer            Posts: 24,905 Karma: 47303824 Join Date: Jul 2011 Location: Sydney, Australia Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos | Quote: 
  Quote: 
 In the meantime, I have added the single file sort that has been suggested. The toolbar button now has a menu option "Sort current file". When that is checked, pressing the button will sort the currently opened file if it is a stylesheet. If it is not checked, it will sort all of them as it does now. | ||
|   |   | 
|  07-26-2014, 05:53 AM | #69 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			Yeah, it should.
		 | 
|   |   | 
|  07-26-2014, 06:43 AM | #70 | 
| Color me gone            Posts: 2,089 Karma: 1445295 Join Date: Apr 2008 Location: Central Oregon Coast Device: PRS-300 | 
			
			Will editor plug-ins be in a sticky in this forum, or with the other plug-ins?
		 | 
|   |   | 
|  07-26-2014, 07:05 AM | #71 | 
| Wizard            Posts: 1,178 Karma: 2431850 Join Date: Sep 2008 Device: IPad Mini 2 Retina | 
			
			Yes I think a sticky would be good, because I have only just found my way back here after several days--I was starting to think I had imagined reading about editor plug-ins!
		 | 
|   |   | 
|  07-26-2014, 07:15 AM | #72 | |
| US Navy, Retired            Posts: 9,897 Karma: 13806776 Join Date: Feb 2009 Location: North Carolina Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen | Quote: 
 | |
|   |   | 
|  07-26-2014, 08:03 AM | #73 | |
| Grand Sorcerer            Posts: 28,880 Karma: 207000000 Join Date: Jan 2010 Device: Nexus 7, Kindle Fire HD | Quote: 
   | |
|   |   | 
|  07-26-2014, 10:26 AM | #74 | |
| Well trained by Cats            Posts: 31,249 Karma: 61360164 Join Date: Aug 2009 Location: The Central Coast of California Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A | Quote: 
 Spoiler: 
 | |
|   |   | 
|  07-26-2014, 08:51 PM | #75 | 
| Grand Sorcerer            Posts: 24,905 Karma: 47303824 Join Date: Jul 2011 Location: Sydney, Australia Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos | 
			
			It looks like it. I changed one of the names in the plugin. It looks like that name was used as part of the key in the preferences for what is on the toolbar. And calibre didn't like not being able to match the key to a plugin. Or at least I think that is what is happening. To fix it, I think you need to edit the file "tweak_book_gui.json" that is in you calibre preferences directory. Look for the "global_plugins_toolbar" and remove that section and save the file. | 
|   |   |