2014-02-20, 23:04
Hi all,
I hope someone can help me. I need to periodically display status messages onscreen. Basically what I would like to do is create something that is functionally equivalent to the current "notification" dialog, as in ExecBuiltIn(Notification())
I would like my addon to be able to pop up messages in the same way, without stealing user focus. I want the user to be able to continue interacting with XBMC without this window interfering in any way except "visually" and then I want this window to quietly go away by itself after a few seconds. Imagine someone is scrolling through items in XBMC when this window appears. I want the user to be able to continue scrolling, even change to another window etc. without interference.
So, again, functionally it would be almost exactly the way the current notification system works, but I don't want to use the notification that exists for a number of reasons.
1 - It is different on every skin and this causes problems for my addon.
2 - In most if not all skins the layout of this notification does not allow enough room to show the information that I want to show. Sometimes I only need to show one or two lines of text, but sometimes I need to show a list of up to 8 items in addition to the title.
I have considered and tried a few options, but they all have significant issues that make them unacceptable for my purposes.
1 - Most python examples with a pop up window such as "helloworld" show a dialog that steals focus away from whatever XBMC was doing before so I can't use this method.
I thought about modifying dialog KaiToast xml but this is not an option because I want other notifications to continue to work normally in the way that the skin has defined them. Also I need a solution that others can use without having to edit files by hand.
2 - Other ideas I had included adding and removing controls from the "current window". This sort of works in my tests but it seems messy and problematic and if the user goes to a new window before my script removes the controls that it added, then they will reappear for a second when the user returns to the window.
3 - I also tried showing a notification, and then attaching extra controls to this notification window. Again it works but it is messy and I am still stuck with the original controls from that window and concerns about cleaning up my controls before the notification window disappears. I also would like to be able to show my message without audio because it will potentially be quite annoying otherwise.
Thanks in advance for any ideas how I can accomplish this! I can't help but feel like I am missing something really obvious in the XBMCGUI library.
I hope someone can help me. I need to periodically display status messages onscreen. Basically what I would like to do is create something that is functionally equivalent to the current "notification" dialog, as in ExecBuiltIn(Notification())
I would like my addon to be able to pop up messages in the same way, without stealing user focus. I want the user to be able to continue interacting with XBMC without this window interfering in any way except "visually" and then I want this window to quietly go away by itself after a few seconds. Imagine someone is scrolling through items in XBMC when this window appears. I want the user to be able to continue scrolling, even change to another window etc. without interference.
So, again, functionally it would be almost exactly the way the current notification system works, but I don't want to use the notification that exists for a number of reasons.
1 - It is different on every skin and this causes problems for my addon.
2 - In most if not all skins the layout of this notification does not allow enough room to show the information that I want to show. Sometimes I only need to show one or two lines of text, but sometimes I need to show a list of up to 8 items in addition to the title.
I have considered and tried a few options, but they all have significant issues that make them unacceptable for my purposes.
1 - Most python examples with a pop up window such as "helloworld" show a dialog that steals focus away from whatever XBMC was doing before so I can't use this method.
I thought about modifying dialog KaiToast xml but this is not an option because I want other notifications to continue to work normally in the way that the skin has defined them. Also I need a solution that others can use without having to edit files by hand.
2 - Other ideas I had included adding and removing controls from the "current window". This sort of works in my tests but it seems messy and problematic and if the user goes to a new window before my script removes the controls that it added, then they will reappear for a second when the user returns to the window.
3 - I also tried showing a notification, and then attaching extra controls to this notification window. Again it works but it is messy and I am still stuck with the original controls from that window and concerns about cleaning up my controls before the notification window disappears. I also would like to be able to show my message without audio because it will potentially be quite annoying otherwise.
Thanks in advance for any ideas how I can accomplish this! I can't help but feel like I am missing something really obvious in the XBMCGUI library.