if a gui-plugin loads other plugin, we might easily encounter a recursion (where the plugin tries to load itself).
while the current gui-plugin loader mechanism tries to prevent re-loading of the "same" plugin (based on the filename of the plugin), it doesn't catch recursive loading.
the attached patch fixes this, by adding the to-be-loaded plugin to the "::loaded_plugins" list, then tries to load it and removes it from the list if the loading fails
(rather than adding the plugin to the list after the loading succeeded)
Anonymous
apply with "git am ..." (todays git/master)
forgot: the patch also makes "load_plugin_script" return '1' if the plugin script has been successfully loaded, or '0' otherwise.
I haven't tested this, but the rationale and the patch make sense to me.