Ticket #1243 (closed defect: fixed)
Error message when plugin overrides document class (happens anyway); document classes lose default after plugin deactivation
| Reported by: | zenogantner | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | plugins | Version: | 0.86 |
| Keywords: | Cc: |
Description (last modified by zenogantner) (diff)
Currently (as of Padre 0.86), there is an error message if a plugin overrides a document class. The document class is overridden nonetheless.
When unloading a plugin, the default/initial document class is not restored.
How to reproduce:
- In Padre::MimeTypes?, add a document class (e.g. Padre::Document::Config for Padre 0.86 or Padre::Document::PercentComment? for Padre 0.87/trunk) to the LaTeX MIME type.
- Run ./dev
- Load .tex file: comment toggling works
- Load LaTeX plugin: there is the error message, plugin is loaded anyway
- Unload LaTeX plugin
- Load .tex file: no comment toggling is supported any more!
Change History
comment:2 Changed 2 years ago by zenogantner
Fixed in r14769.
Here is what I did:
- introduced variable %DEFAULT_DOC_CLASS in MimeTypes?.pm that stores the default classes
- after initializing %MIME, the document classes are set from %DEFAULT_DOC_CLASS
- add_mime_class(): removed the wrong error message
- remove_mime_class(): renamed to reset_mime_class(), now reset to default document class (if one exists)
Note: See
TracTickets for help on using
tickets.
