A couple of beginner plugin questions

• Jul 7, 2020 - 16:46

1) Once a plugin has been launched in the GUI, is there a way to stop a second copy from being launched?

2) Is there a way to make the plugin name bold in its GUI pane?

plugui.png

(I initially posted this in the Support forum before I realised there was a plugin forum)


Comments

1) you could have a setting in the plugin that is checked on starting, if it is set, then close the current instance. If it is not set, then continue.

2) I think not.

1) Plugins actually don't exactly work like you think they might: They are loaded on start, which means that if they make a window appear, it will appear on startup too. The signal run() (the one implemented by onRun()) is emitted every time you launch a plugin from the menu.

When you click on run from the plugin creator, you actually combine these two steps: you load the plugin and immediately send him the run signal. Then, when you reclick start, you get these two steps again, even if in reality, when run from the normal menu, you'd only get the second step. So normally, you will never get a second copy launched.

Do you still have an unanswered question? Please log in first to post your question.