Linux question about the skin engine
#1
i note that kodi will load the skin when you first in a window, and after that it will not load again when you second switch the same window, my quesetion is how can i reload the skin in this window if it is not the first time when i need to do this, refresh or clear the array?? who have any idea? thanks
Reply
#2
who can tell me how the kodi judge if a window is first open, i cant find it in the source code
Reply
#3
i'm not entirely sure i understand your question, but you can call the 'ReloadSkin' built-in command (or see what it does) to reload the skin.

window activation have several spots but see xbmc/interfaces/builtins/GUIBuiltins.cpp, ActivateWindow() for one piece of code in use. there is an explicit if() to not re-activate the same window.
Reply
#4
You can do it via the keymap.xml.

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<keymap>
    <global>
        <keyboard>
            <F5>XBMC.ReloadSkin()</F5>
        </keyboard>
    </global>
</keymap>
Reply
#5
(2015-11-11, 11:09)ironic_monkey Wrote: i'm not entirely sure i understand your question, but you can call the 'ReloadSkin' built-in command (or see what it does) to reload the skin.

window activation have several spots but see xbmc/interfaces/builtins/GUIBuiltins.cpp, ActivateWindow() for one piece of code in use. there is an explicit if() to not re-activate the same window.

plz use the nebula skin open kodi with fullscreen mode, and change the resolution to 640x480, then you will find part of the date in the right top corner was cutted(if not see plz change language chinese simple). then quit the system setting menu ,and switch into vedio menu, you will see the date is full, go back to system setting menu the date is cutted. why the vedio window was right i think because it 's the first time you go in the video window, so kodi init the window with 640x480. (another example: go to vedio window before you change resolution to 480x640, change resolution go back to vedio window then you will see the date was cut ,i think it's because kodi has already init it, so the second time you go to the vedio window it just show it)


so i think maybe change some code to re init window ,when you change the resolution can fix this problem.i am not sure
Reply
#6
(2015-11-11, 11:11)Hitcher Wrote: You can do it via the keymap.xml.

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<keymap>
    <global>
        <keyboard>
            <F5>XBMC.ReloadSkin()</F5>
        </keyboard>
    </global>
</keymap>

why i can't find the keymap.xml in my source code..
Reply
#7
hitcher is old school, that was the old name of the file Wink

system/keymaps/keyboard.xml if you actually want to edit the system level file. if not, see http://kodi.wiki/view/HOW-TO:Modify_keymaps
Reply
#8
i would suggest to add it in your userdata and not modify the system keymap.xml as you will loose it when you update Kodi
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#9
(2015-11-11, 11:46)ironic_monkey Wrote: hitcher is old school, that was the old name of the file Wink

system/keymaps/keyboard.xml if you actually want to edit the system level file. if not, see http://kodi.wiki/view/HOW-TO:Modify_keymaps


but i dont want to reset the screen with hot key, i want to let kodi auto reload the skin when change resolution, as i said above. do you have some idea, thank you
Reply
#10
it's a know issue you'll get skin issues when you change the screensize.
either restart kodi or manually reload the skin as mentioned above.
there's no auto-way of doing this.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#11
(2015-11-11, 12:33)ronie Wrote: it's a know issue you'll get skin issues when you change the screensize.
either restart kodi or manually reload the skin as mentioned above.
there's no auto-way of doing this.

i think we can reslove this problem use the method i mention in #5 above, but recently,i cant find the right code to reslove this.
when change the screensize, reload the window like you first visit the window.

i dont know if anyone can got my idea, my english is a litter weak..
Reply
#12
(2015-11-11, 12:54)q283408316 Wrote:
(2015-11-11, 12:33)ronie Wrote: it's a know issue you'll get skin issues when you change the screensize.
either restart kodi or manually reload the skin as mentioned above.
there's no auto-way of doing this.

i think we can reslove this problem use the method i mention in #5 above, but recently,i cant find the right code to reslove this.
when change the screensize, reload the window like you first visit the window.

yeah that would be nice indeed.
i'm afaraid i can't help you with the code.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#13
i decide to do this way: when you change the resolution , the screen will come out a dialog window :yes button and no button, i create a new process use folk,when user click yes button , child process kill kodi and restart it, then the screen will display right with new resolution.


but now i didn't find the code when click yes button. so any one can tell me where the right code when click yes-button. thanks
Reply
#14
it's handled internally by kodi.
so unless you want to modify the kodi source-code and recompile,
there's no way for skins to know if yes or no was pressed.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#15
(2015-11-13, 12:04)ronie Wrote: it's handled internally by kodi.
so unless you want to modify the kodi source-code and recompile,
there's no way for skins to know if yes or no was pressed.

if kodi don't know yes or no was pressed, how could it select the choice, keep present or use the new resolution?

Is not using the following ways ??

if(ok pressed)
function xxx;
else
function xxx



or like the qt singal : buttonxxx(click, functionxxx);
Reply

Logout Mark Read Team Forum Stats Members Help
question about the skin engine0