Ticket #1243 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

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:

  1. 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.
  2. Run ./dev
  3. Load .tex file: comment toggling works
  4. Load LaTeX plugin: there is the error message, plugin is loaded anyway
  5. Unload LaTeX plugin
  6. Load .tex file: no comment toggling is supported any more!

Change History

comment:1 Changed 3 years ago by zenogantner

  • Description modified (diff)

comment:2 Changed 3 years ago by zenogantner

Fixed in r14769.

Here is what I did:

  1. introduced variable %DEFAULT_DOC_CLASS in MimeTypes?.pm that stores the default classes
  2. after initializing %MIME, the document classes are set from %DEFAULT_DOC_CLASS
  3. add_mime_class(): removed the wrong error message
  4. remove_mime_class(): renamed to reset_mime_class(), now reset to default document class (if one exists)

comment:3 Changed 3 years ago by zenogantner

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.