How to call plugin settings menu?
#1
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
Retired from Add-on dev
Reply
#2
no, but this surely makes sense.

i did up a diff in the blind, monitor progress @ trac ticket #5904
Reply
#3
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
Retired from Add-on dev
Reply
#4
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?
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#5
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
Reply
#6
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.
Retired from Add-on dev
Reply
#7
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
Reply
#8
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
Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
Reply
#9
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.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#10
@spiff, are you getting the trac emails? both patches are done and work.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#11
bump, not sure if you want to name it showSettings() to match yours or not.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#12
bueller? bueller? bueller?
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#13
now in svn. sorry for the delay, but as i explained i'm buried in work these days
Reply
#14
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.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#15
yes, my version would mean plugin settings from skin
Reply

Logout Mark Read Team Forum Stats Members Help
How to call plugin settings menu?0