Quantcast
Channel: Kodi Community Forum - Skinning
Viewing all articles
Browse latest Browse all 1818

Can't open a new window since another dialog is still active

$
0
0
Hi,

I'm trying to open a new window of Kodi Settings screen (10004) from the DialogButtonMenu.xml
By this code:
Code:
        <item id="2">
            <property name="id">$NUMBER[2]</property>
            <property name="mainmenuid">12</property>
            <label>$LOCALIZE[5]</label>
            <label2>Custom item</label2>
            <icon>common/settings1.png</icon>
            <thumb />
            <property name="labelID">5</property>
            <property name="defaultID">5</property>
            <onclick condition="Window.IsActive(DialogButtonMenu.xml)">Close</onclick>
            <onclick>ActivateWindow(Settings)</onclick>

            <property name="path">ActivateWindow(Settings)</property>
            <property name="list">Settings</property>
            <visible>String.IsEqual(System.ProfileName,Master user)</visible>
            <property name="group">powermenu</property>
            <property name="isSubmenu">True</property>
          </item>

But when I press on it I get this error in the log: (I marked in bold the error)
Code:
INFO <general>: Enabled debug logging due to GUI setting. Level 2.
DEBUG <general>: Skipped 1 duplicate messages..
DEBUG <general>: ------ Window Init () ------
DEBUG <general>: Keyboard: scancode: 0x20, sym: 0x100, unicode: 0x0000, modifier: 0x65
DEBUG <general>: ------ Window Init (Pointer.xml) ------
DEBUG <general>: Keyboard: scancode: 0x2a, sym: 0x304, unicode: 0x0000, modifier: 0x64
DEBUG <general>: Keyboard: scancode: 0x1d, sym: 0x306, unicode: 0x0000, modifier: 0x0
DEBUG <general>: Keyboard: scancode: 0x1f, sym: 0x115, unicode: 0x0073, modifier: 0x0
DEBUG <general>: CInputManager::HandleKey: s (0xf053) pressed, action is ActivateWindow(ShutdownMenu)
DEBUG <general>: Activating window ID: 10111
DEBUG <general>: ------ Window Init (DialogButtonMenu.xml) ------
DEBUG <general>: ------ Window Deinit (Pointer.xml) ------
DEBUG <general>: Keyboard: scancode: 0x1f, sym: 0x115, unicode: 0x0000, modifier: 0x0
DEBUG <general>: ------ Window Init (Pointer.xml) ------
DEBUG <general>: CInputManager:: ProcessMouse: trying mouse action leftclick
DEBUG <general>: Activating window ID: 10004
 INFO <general>: Activate of window '10004' refused because there are active modal dialogs
RNING <general>: CGUIWindowManager - CGUIWindowManager::HandleAction - ignoring action 107, because topmost modal dialog closing animation is running

DEBUG <general>: Skipped 2 duplicate messages..
DEBUG <general>: ------ Window Deinit (DialogButtonMenu.xml) ------

This is actually the window that prevent the opening of the new window:
VideoOSD.xml
Code:
<window>
    <zorder>2</zorder>
    <onload condition="!VideoPlayer.Content(livetv)">SetFocus($INFO[Skin.String(defaultosdbutton_video)])</onload>
    <onload condition="VideoPlayer.Content(livetv)">SetFocus($INFO[Skin.String(defaultosdbutton_livetv)])</onload>
    <onunload>ClearProperty(subtitlemenu,home)</onunload>
    <controls>
        
        <!--OSD Panel-->
        <control type="group">
            <!-- OSD buttons -->
            <include>OSDButtonsModern</include>
            <animation effect="slide" start="0,400" end="0,0" tween="cubic" easing="out" delay="0" time="250" reversible="false" condition="!Player.ShowInfo + !Skin.HasSetting(LowPerformanceMode)">WindowOpen</animation>
            <animation effect="fade" start="0" end="100" delay="0" time="300" reversible="false" condition="Player.ShowInfo">WindowOpen</animation>
            <animation effect="fade" start="100" end="0" delay="0" time="300" reversible="false" condition="Player.ShowInfo">WindowClose</animation>
            <include>HideOsdConditions</include>
        </control>
    </controls>
</window>

What can I do in order to solve this?

1) How can I know what is the active modal dialog that makes the problem?
2) How can I close this window before activating the new window?
Should I need to do something like this before activating the new window? (Or is there antoher way to close all the active dialogs?)
Code:
<onclick condition="Window.IsActive(VideoOSD.xml)">Close</onclick>
- Or -
How can I close "VideoOSD.xml" when "DialogButtonMenu.xml" is loaded?
I tried to put this one in "DialogButtonMenu.xml" the but it doesn't work:
Code:
<onload condition="Window.IsActive(VideoOSD.xml)">Dialog.Close(VideoOSD.xml)</onload>

Viewing all articles
Browse latest Browse all 1818

Trending Articles