Comment 6 for bug 878165

Revision history for this message
Aurélien Gâteau (agateau) wrote :

Attached is a simple python-dbus script to illustrate the bug. It gets the top level menu items, call AboutToShow on the first item, wait 1 second and gets the children of the first item.

To properly reproduce the bug, one must run in an environment where unity-panel-service is not running but there is an appmenu registrar, otherwise unity-panel-service will call AboutToShow() behind our back.

An easy way to set up such an environment is to:
1. Install plasma-menubar-widget and kde-workspace-bin
2. Start a session in an environment which does not use unity-panel-service (kde, openbox,...)
3. Run "plasmoidviewer menubar" to get an appmenu registrar

One can then do the following:
1. Start firefox
2. Start d-feet
3. Find the address and objectpath firefox is using to expose its menu (it exposes 4 addresses, but only one of them has an objectpath named "/com/canonical/menu/<n>")
4. Call fake-menubar-widget with the address and objectpath => no content for File
5. Call fake-menubar-widget with the address and objectpath another time => one should get the content of the File menu

Here is the output of the script on my machine:

--------------- 1st call ----------------------------
$ ./fake-menubar-widget ':1.654' /com/canonical/menu/6C000EE
# menubar items
2: _Fichier
3: Éditio_n
4: _Affichage
5: _Historique
6: _Marque-pages
7: _Outils
8:

# Calling AboutToShow

# children of '_Fichier'

--------------- 2nd call ----------------------------
$ ./fake-menubar-widget ':1.654' /com/canonical/menu/6C000EE
# menubar items
2: _Fichier
3: Éditio_n
4: _Affichage
5: _Historique
6: _Marque-pages
7: _Outils
8:

# Calling AboutToShow

# children of '_Fichier'
9: Nouvel ongle_t
10: No_uvelle fenêtre
23: Ouvrir une _adresse…
11: _Ouvrir un fichier…
22: _Fermer l'onglet
24: Fe_rmer la fenêtre
12: <no label>
13: _Enregistrer sous…
14: E_nvoyer un lien vers la page…
15: <no label>
16: _Mise en page…
17: Aperçu a_vant impression
18: Im_primer…
19: <no label>
20: Travailler hors conne_xion
21: _Quitter