#645975 alacarte: can't disable menu items

#645975#5
Date:
2011-10-20 03:40:00 UTC
From:
To:
Under GNOME 3, you can no longer disable (or enable) menu items in Alacarte. Console output:

Traceback (most recent call last):
  File "/usr/share/alacarte/Alacarte/MainWindow.py", line 432, in on_item_tree_show_toggled
    self.editor.setVisible(item, False)
  File "/usr/share/alacarte/Alacarte/MenuEditor.py", line 200, in setVisible
    menu_xml = self.__getXmlMenu(self.__getPath(item), dom, dom)
  File "/usr/share/alacarte/Alacarte/MenuEditor.py", line 473, in __getXmlMenu
    node = self.__addXmlMenuElement(element, name, dom)
  File "/usr/share/alacarte/Alacarte/MenuEditor.py", line 484, in __addXmlMenuElement
    return element.appendChild(node)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1550, in appendChild
    "two document elements disallowed")
xml.dom.HierarchyRequestErr: two document elements disallowed

This may be related to bug #645470, as I see similar errors in the console.

My rationale for classifying this as important rather than normal
is because this is very commonly used functionality that has broken.

Paul

#645975#10
Date:
2011-10-20 08:59:06 UTC
From:
To:
The cause for both these bugs seems to be python 2.7. If I change
/usr/bin/alacarte's shebang line to "#! /usr/bin/python2.6 -OOt" it
works again as expected.

  - Fabian

#645975#15
Date:
2011-11-13 20:43:34 UTC
From:
To:
I can confirm that changing the python version to 2.6 solves the problem
for now.

This is just a hack though.

#645975#20
Date:
2014-10-11 15:18:41 UTC
From:
To:
Hey,

I don't have this error messages from console like previous messages.

But my changes don't have effect on menus.

Using alacarte I can select and deselect items and menus but when I try to
check them on gnome-shell menu I see no changes were made. It takes no
effect.

thanks
regards
althaser

#645975#27
Date:
2026-02-11 06:23:09 UTC
From:
To:
Dear Maintainer,

*** Reporter, please consider answering these questions, where
appropriate ***

* What led up to the situation?
* What exactly did you do (or not do) that was effective (or
ineffective)?
* What was the outcome of this action?
* What outcome did you expect instead?

*** End of the template - remove these template lines ***
Nothing special led up to the situation, alacarte is just simply not
doing what
it is supposed to do on a fresh new installation. Items can be ticked not to
appear in the menue but nothong happens.