After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 355828 - exception when hiding submenu
exception when hiding submenu
Status: RESOLVED FIXED
Product: alacarte
Classification: Applications
Component: general
0.10.x
Other Linux
: Normal normal
: ---
Assigned To: Alacarte Maintainer(s)
Alacarte Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-09-13 17:31 UTC by Frederic Crozat
Modified: 2006-10-02 23:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
don't hardcode root node name (1.25 KB, patch)
2006-10-02 16:06 UTC, Frederic Crozat
none Details | Review

Description Frederic Crozat 2006-09-13 17:31:46 UTC
-start alacarte
-try to unselect Accessibility submenu check box

exception :

Traceback (most recent call last):
  • File "/usr/lib/python2.4/site-packages/Alacarte/MainWindow.py", line 372 in on_item_tree_show_toggled
    self.editor.setVisible(item, False)
  • File "/usr/lib/python2.4/site-packages/Alacarte/MenuEditor.py", line 208 in setVisible
    menu_xml = self.__getXmlMenu(self.__getPath(item), dom, dom)
  • File "/usr/lib/python2.4/site-packages/Alacarte/MenuEditor.py", line 475 in __getXmlMenu
    node = self.__addXmlMenuElement(element, name, dom)
  • File "/usr/lib/python2.4/site-packages/Alacarte/MenuEditor.py", line 486 in __addXmlMenuElement
    return element.appendChild(node)
  • File "/usr/lib/python2.4/xml/dom/minidom.py", line 1548 in appendChild
    raise xml.dom.HierarchyRequestErr( xml.dom.HierarchyRequestErr: two document elements disallowed

Comment 1 Scott Reeves 2006-09-21 21:58:14 UTC
I get this same exception also, only it occurs whenever I attempt basically anything - hide submenu, create a new menu, create a new item ...

I tried this with both python-xml (the provider of xml.dom.minidom.py) version 2.4.2 and 2.4.3
Comment 2 Travis Watkins 2006-10-02 01:23:25 UTC
I cannot reproduce this here.
Comment 3 Frederic Crozat 2006-10-02 12:58:30 UTC
Ok, I found what is causing this : 

on Mandriva Linux, our top menu is called "Mandriva Linux" and not "Applications" (because we used to have a submenu also called Applications). Unfortunately, Alacarte is searching for "Applications" to get root node. 

I've check menu specification and there is no indication top menu node must be called "Applications" (or Desktop for settings.menu).

Let's see if we can guess it from system menu file instead of hardcoding it.
Comment 4 Frederic Crozat 2006-10-02 16:06:48 UTC
Created attachment 73856 [details] [review]
don't hardcode root node name
Comment 5 Travis Watkins 2006-10-02 23:38:34 UTC
Applied, thanks.