Kodi Community Forum

Full Version: How to call plugin settings menu?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is there a way to manually calling a Plugins settings menu, as thou it was selected it from the contextmenu 'Plugin settings'

xbmc window name of contextmenu calling DialogContextMenu.xml

Calling the following pulls up an empty dialog:

Code:
xbmc.executebuiltin("xbmc.ActivateWindow(contextmenu,%s)" % sys.argv[0])

Why? Well incase some essential setting (such as username/password) is incomplete (ie first run) and I'd like the settings menu to be shown and completed before cotinuing with normal Plugin processing.

Can it be done?

thanks
BBB
no, but this surely makes sense.

i did up a diff in the blind, monitor progress @ trac ticket #5904
I come up with a work around, that is:

Plugin starts and if essential settings check fails, show an OK dialog asking user to select Plugin Settings from the context menu.

It then exits back to the Video Plugins page.

From there the user can highlight the Plugin which enables the ContextMenu / Plugin Settings option - I didnt realise this was available outside of the Plugin running.


So, that seems to work, but it would still be nice to do what my orig post questioned.

cheers
BBB
http://trac.xbmc.org/ticket/5905

edit: damn spiff your fast. i thought a python method would be better.

OT: can you look at some of the other tickets i posted and comment?
sure nuka, sorry, don't be put off by the long response time i'm just knee deep in work these days. so i do things in the blind while waiting for computations Wink
so we now have two approaches:

1) spiffs new builtin 'showpluginsettings'
- Do we have to pass a filename to this or does it discover the settings.xml itself?

2) nuka's new Plugin func xbmcplugin.openSettings(sys.argv[0])
- This finds settings.xml - presumably this is the preferred call?

thanks for such quick mods.
nuka's is most handy for your particular use.
mine is more general in nature, i.e. it is callable outside plugins (but thus needs to be passed a path ala
Quote:showpluginsettings(plugin://video/foobar/)

if nobody comes up with a scenario where this generality would be handy, i'd go with nuka's diff
spiff Wrote:nuka's is most handy for your particular use.
mine is more general in nature, i.e. it is callable outside plugins (but thus needs to be passed a path ala

if nobody comes up with a scenario where this generality would be handy, i'd go with nuka's diff

if there is ever built-in manager for addons (as in something in c++, instead of a seperate script), it would be convenient to be able to mess with the settings from inside of said manager.
If this is done though it would make sense to be more generalized to grab skin and scripts (if it ever gets it) settings as well.

that said, I'd prefer Nuka's solution for the question at hand
both, no reason not to have both.

edit: i have mine needing a passed path also. will look into not needing that. just ass u me d it needed to be like that.
@spiff, are you getting the trac emails? both patches are done and work.
bump, not sure if you want to name it showSettings() to match yours or not.
bueller? bueller? bueller?
now in svn. sorry for the delay, but as i explained i'm buried in work these days
thanks, i should have put a smiley Smile was just teasing.

about the other 9504, i'm trying to think if you use the weather patch. maybe putting them under plugin://weather/. would your version be useful for calling weather settings from the skin?

we really could use script settings, which i may work on later.
yes, my version would mean plugin settings from skin
Pages: 1 2