Kodi Community Forum

Full Version: Any reason why addon windows (like Global Search) have to be dialogs?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Just wondering if addon windows have to be dialogs, or could also be coded by addon authors as regular windows?

Reason I'm asking, I have the Global Search addon skinned as a full-screen window, like many others have done. Now I'm trying to add a global menu, so I want to add the menus to the Global Search window. Because Global Search is a dialog, I can't open other windows from it, AFAIK.

Any way around this? Thanks!
Just did a test, is it really just as easy as changing these 2 values to convert a dialog to a regular window?

Code:
xbmcgui.WindowXMLDialog

to

Code:
xbmcgui.WindowXML

and

Code:
xbmcgui.getCurrentWindowDialogId()

to

Code:
xbmcgui.getCurrentWindowId()
Makes more sense for Global Search to use WindowXMLDialog because it should be drawn on top of the current window...

I'm not experienced with skinning, but I am with Global Search... I'm stuck on the global menu concept, could you explain what you want?
I've got it working how I want, just have to make the changes I posted above. You can see the idea here, can also download and try it out.

http://forum.kodi.tv/showthread.php?tid=303540
Not really sure the above is a long term solution... since it only solves your skin issue and I'm pretty sure Global search will remain using dialog window... after all that's what the dialog class is for.

I think using nodes would a good solution... I saw a library search node posted somewhere a few days ago.
Will probably be a long term solution for me, I'll probably make the changes after each update. I really can't stand dialogs for things like Global Search, Lazy TV, Skin Shortcuts, etc. It's not possible to open other windows from them and it's a pain to get WindowOpen/WindowClose animations to match other windows.

Yeah, Bob Cratchett created a node-based search plugin. It's interesting, but the display of search results isn't as nice as Global Search.
But... that's the point of the dialog class Tongue They remain on top until you close them.

Dialog remains on top, whereas the windowxml clears the previous window assuming the new window will be fullscreen.

IMO Dialog class in extremely useful... I personally like what's being done with nodes.
That's fine with me, haha. Wink

Still not seeing a downside to regular windows. If Global Search is skinned to be fullscreen, in what circumstance would this cause a problem?

Edit: I mean, that woudn't be a problem in my skin, right? I see how it would be a problem for other skins that don't have GS fullscreen.
I agree with braz the way we search for things I like the fullscreen approach ands it does get annoying try to get am menu flow with a dialog popping up.
i'm working on a new version of globalsearch, or basically, writing the whole addon from scratch again.
this will be something for kodi v18, but it will be a full blown media window then.

it will function like any of the kodi library windows:
- just one container (instead of 12 different ones for each content type)
- you can define multiple layouts based on container.content()
- support for multiple views for each content type
- no more need for the custom info dialog, it'll use the videoinfo / musicinfo dialogs from kodi
- uses normal infolabels, instead of properties (eg. ListItem.Genre instead of ListItem.Property(Genre))
- full support for ListItem.Art()
- thx to Lunatixz: supports the 'default select action' kodi setting (play, resume, choose, show info)


to goal is to get the addon window to function as closely as possible as the kodi library windows.
That sounds great ronie. Should make skinning the addon considerably less work Smile
Nod
Wow, that will be awesome Ronie. Thanks in advance!
Thanks so much ronie, that sounds fantastic!

I already saw many of the changes at Github. Smile
(2017-01-15, 05:46)braz Wrote: [ -> ]Will probably be a long term solution for me, I'll probably make the changes after each update. I really can't stand dialogs for things like Global Search, Lazy TV, Skin Shortcuts, etc. It's not possible to open other windows from them and it's a pain to get WindowOpen/WindowClose animations to match other windows.

Yeah, Bob Cratchett created a node-based search plugin. It's interesting, but the display of search results isn't as nice as Global Search.

And probably never will be, as it is a concept script rather than an actually-usable script unlike global search Wink

With regards Skin Shortcuts, though, the script requires the possibility to have multiple versions of its window open at any one time (the main menu, the sub-menu - for example) which I believe requires dialogs. If I'm wrong then let me know, and at the very least we can implement windows vs dialogs as an overrides option Smile
Pages: 1 2