Save Plugin Button State
BlitzCoder last edited by BlitzCoder
It would be nice to preserve the session or state of a button, if a plugin has a tool button placed on the menu.
Ideally where you always open notepad++ and the word wrap or indent guide are still on the same state where you left it off last.
Example or topic related to this request:
Plugins can persist the state of docked panels with the
NPPM_DMMREGASDCKDLGAPI (available since Notepad++ 4.0, according to the documentation).
It isn’t obvious to a non-technical user, but it’s really the plugin’s job to call the API. The editor just handles the call by saving the panel’s coordinates and visibility to
%AppData%\config.xml, as illustrated in my post to the original thread.
It wouldn’t be practical for N++ to automatically register every loaded plugin like this. To begin with, not every plugin provides a panel. The ones that do provide them are responsible for marshalling their own data. The so-called “button state” of a docked panel is exactly what the
tTbDatastructure is designed to serialize: the state of the
b[ar] where the plugin puts its icon.
Basically, what you’re asking for is already a long-standing feature. If a certain plugin is not using it (or using it wrongly), that’s an issue for the plugin’s maintainer to resolve.