-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GUI] Fix ActivateWindow if 'return' is defined #17893
Conversation
Take care you don't break other behaviour with this @enen92 , or ways in which skinners have become used to using this and Kodi behaving. I am unable to test immediately, and @the-black-eagle may be interested |
@DaveTBlake I was about to ping you. Unfortunately we never know if regressions are introduced. This needs extensive testing and won't be merged unless it's proven okay. I'll ask in #skinning and maybe #testing |
Sure @enen92 I wasn't saying don't, just aware from looking at other parts of the window/history/navigation behavour that it can bite back. |
Because of this bug the VRT NU add-on moved to using Thanks a lot for fixing this bug. |
One "regression" found by @sualfred (or to be more precise something that didn't correspond to his expected behaviour - although still better than we have now): Test case: Navigating back: PR (old implementation): Back -> episode view -> back -> home I adjusted the code to comply to the expected behaviour. Would still be nice to have some feedback on the music section. |
Understood @enen92 but been a bit busy with release and sunny summer weather. :) |
Tested in the music section by opening various nodes with both |
Did you check the recently adjusted version @the-black-eagle ? |
Thanks @the-black-eagle (hopefully you cherry-picked today since I changed the implementation last night). @DaveTBlake no rush at all, was just a reminder I didn't test the MusicLibrary :). This needs yet to be validated with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow the current code guidelines.
Tested with Test case1: Test case2: OnBack navigation for test case 1: OnBack navigation for test case 2: Weather in estuary (where replace window is used) also behaves identical. |
jenkins build this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the weeks of delay @enen92, tested out the music library navigation and all looks fine to me
Thanks a lot @DaveTBlake for testing and no worries about the time taken! |
[GUI] Fix ActivateWindow if 'return' is defined
[GUI] Fix ActivateWindow if 'return' is defined
No Backport ? |
@enen92 Can we backport this to Leia? |
Although I didn't spot any regressions I'd prefer not to. It's better be prepared to find any regression in v19 development cycle than to introduce regressions on a version that is supposed to (TM) be the last one (leia). But you are always welcome to bring it as a pull request and see what others have to say about it. Personally I think it's time to move on and focus 100% on matrix |
I understand, but we add-on developers will have to work with Leia for a few years, and it helps if we can reduce the number of workarounds in our code. (Also when we proposed a fix for v18.3 someone used this argument because it was supposed to be the final update. Things do not always go as planned 😉) |
[GUI] Fix ActivateWindow if 'return' is defined
[GUI] Fix ActivateWindow if 'return' is defined
[GUI] Fix ActivateWindow if 'return' is defined
[GUI] Fix ActivateWindow if 'return' is defined
[GUI] Fix ActivateWindow if 'return' is defined
[GUI] Fix ActivateWindow if 'return' is defined
[GUI] Fix ActivateWindow if 'return' is defined
[GUI] Fix ActivateWindow if 'return' is defined
[GUI] Fix ActivateWindow if 'return' is defined
[GUI] Fix ActivateWindow if 'return' is defined
Description
This pull request fixes the usage of
ActivateWindow(window, dir, return)
if the action is executed from context menu items (which according to the bug report is there since krypton).This is mainly the case in python addons where listitems are created (for example) with the
ActivateWindow(xxxx, plugin://plugin.video.foo/bar, return)
as context menu actions. Other examples are any otherdir
paths to MusicLibrary and VideoLibrary.According to the documentation, it is expected that Kodi moves back to the plugin directory from which the action was executed. However this doesn't work because:
Kodi always computes the history for the provided path even if we specify the return parameter (e.g. we provide "plugin://plugin.video.foo/bar" as
dir
, Kodi will create the respective history:plugin://plugin.video.foo/bar
../plugin://plugin.video.foo
)Kodi always defines the provided
dir
as the root folder. This works well if we are activating a different window than the one that is already active. If they are the same, the root folder ofdir
should be set to thepath
that was on the media window before activating this new one otherwise we won't be able to move back to where we were.@mediaminister @dagwieers since you were the ones reporting the issue, it'd be nice if you guys could test it.
I am unsure who I should ping for review, this seems no-man's code by now.
Motivation and Context
Fixes #16492
How Has This Been Tested?
Context menu item created in a plugin that pointed to another plugin:
Confirmed the
onBack
action moved back to where I was before. Also tested library navigation (movies and tvshows) in estuary and confirmed the behaviour is still the same.Screenshots (if appropriate):
Types of change
Checklist: