Skip to content

Commit

Permalink
Fix large and slow menu path
Browse files Browse the repository at this point in the history
1. The MainMenu was not shown
2. When the current title is an empty string, so nothing should be
shown, there was still a path shown when you choose big menu (e.g. on
the confirmation screen for multiboot selection)
  • Loading branch information
Littlesat committed Dec 31, 2020
1 parent 471b0b1 commit 1ac7a5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/python/Screens/Screen.py
Expand Up @@ -146,8 +146,8 @@ def getScreenPath(self):

def setTitle(self, title, showPath=True):
try: # This protects against calls to setTitle() before being fully initialised like self.session is accessed *before* being defined.
if self.session and len(self.session.dialog_stack) > 2:
self.screenPath = " > ".join(ds[0].getTitle() for ds in self.session.dialog_stack[2:])
if self.session and len(self.session.dialog_stack) > 1:
self.screenPath = " > ".join(ds[0].getTitle() for ds in self.session.dialog_stack[1:])
else:
self.screenPath = ""
if self.instance:
Expand All @@ -156,7 +156,7 @@ def setTitle(self, title, showPath=True):
except AttributeError:
pass
self.screenTitle = title
if showPath and config.usage.showScreenPath.value == "large":
if showPath and config.usage.showScreenPath.value == "large" and title:
screenPath = ""
screenTitle = "%s > %s" % (self.screenPath, title) if self.screenPath else title
elif showPath and config.usage.showScreenPath.value == "small":
Expand Down

9 comments on commit 1ac7a5e

@IanSav
Copy link
Contributor

@IanSav IanSav commented on 1ac7a5e Jan 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was the "dialogue_stack" index changed? This is creating a menu level that does not actually exist.

@littlesat
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delayed response....

It seems 'MainMenu' wasn't shown anymore in the path... So I brought it back one index.

@IanSav
Copy link
Contributor

@IanSav IanSav commented on 1ac7a5e Jan 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is odd. On my machine I now see a menu item of InfoBar which is incorrect. Has anything else changed on the machine you are testing?

@IanSav
Copy link
Contributor

@IanSav IanSav commented on 1ac7a5e Jan 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tested this code change on OpenVision and it needs a value of 1. I will retest an updated version of OpenPLi and see if things have changed.

@IanSav
Copy link
Contributor

@IanSav IanSav commented on 1ac7a5e Jan 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I am seeing on my box:

OpenPLi

You can clearly see that "Main menu" is not the first item in the history list. I don't understand why I am seeing something different from you?

@WanWizard
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm "Infobar" is now the first item.

@IanSav
Copy link
Contributor

@IanSav IanSav commented on 1ac7a5e Jan 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obviously InfoBar is the first screen but it should not be listed in the menu history path. It will be interesting to see why Littlesat is seeing something different.

@IanSav
Copy link
Contributor

@IanSav IanSav commented on 1ac7a5e Jan 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the session stack change to be reverted or can Littlesat verify the issue does not exist with the updated value?

@WanWizard
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obviously InfoBar is the first screen but it should not be listed in the menu history path. It will be interesting to see why Littlesat is seeing something different.

Agreed. I have no idea why this was done. @littlesat ?

Please sign in to comment.