diff options
author | Tom Callaway <spot@fedoraproject.org> | 2018-11-30 11:42:21 -0500 |
---|---|---|
committer | Tom Callaway <spot@fedoraproject.org> | 2018-11-30 11:42:21 -0500 |
commit | b8d3d7b337adeb2fc2ef8a36f3a500e147d7a41b (patch) | |
tree | d2bdeb131c12db46ab326eca1e34099b25f4eaba | |
parent | 7db14dcf4c4305c3859a2d9fcf9f5da2db328330 (diff) |
There are several places in the code where Menu.py uses attributes that
no longer exist, having been replaced with functions. Specifically:
.Type has been replaced with .getType()
.OnlyShowIn has been replaced with .getOnlyShowIn()
.NotShowIn has been replaced with .getNotShowIn()
This change uses the new functions and fixes crashes.
-rw-r--r-- | xdg/Menu.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xdg/Menu.py b/xdg/Menu.py index 1d03cad..c27eee2 100644 --- a/xdg/Menu.py +++ b/xdg/Menu.py @@ -298,11 +298,11 @@ class Menu: entry.Show = NO_EXEC self.Visible -= 1 elif xdg.Config.windowmanager: - if (entry.DesktopEntry.OnlyShowIn != [] and ( - xdg.Config.windowmanager not in entry.DesktopEntry.OnlyShowIn + if (entry.DesktopEntry.getOnlyShowIn() != [] and ( + xdg.Config.windowmanager not in entry.DesktopEntry.getOnlyShowIn() ) ) or ( - xdg.Config.windowmanager in entry.DesktopEntry.NotShowIn + xdg.Config.windowmanager in entry.DesktopEntry.getNotShowIn() ): entry.Show = NOT_SHOW_IN self.Visible -= 1 @@ -994,8 +994,8 @@ class XMLMenuBuilder(object): menuentry = MenuEntry(directory, dir) if not menu.Directory: menu.Directory = menuentry - elif menuentry.Type == MenuEntry.TYPE_SYSTEM: - if menu.Directory.Type == MenuEntry.TYPE_USER: + elif menuentry.getType() == MenuEntry.TYPE_SYSTEM: + if menu.Directory.getType() == MenuEntry.TYPE_USER: menu.Directory.Original = menuentry if menu.Directory: break |