Recommendations on storing plugin configuration

  • Jose Quintero

    Jose Quintero - 2014-05-10

    I'm currently working on a plugin where I need to store some settings related to the plugin. I want to use built in KeyPass features as much as I can for storing/retrieving settings and for allowing the user to change those settings. Right now I'm storing the settings in a separate file as XML and I have created a new dialog to allow the user to change these settings. The dialog is accessed via a menu option. Is there a straightforward way to tap into the built in Options dialog and add a tab for the plugin options? Is there a recommended way to handle this?

  • David Lechner

    David Lechner - 2014-05-10

    I've done this with one of my plugins:

    The gist of it is that you add a listener to the GlobalWindowManager.WindowAdded event. Check the type of the window that was added. If it is KeePass.Ui.OptionsForm, then add your tab.

  • Jose Quintero

    Jose Quintero - 2014-05-13

    Thanks for the example. This helps a lot! I've used the WindowAdded event to add some custom menu items to the password form but I wasn't sure how the rest of the config load/persistence worked.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks