Discussion:
Menu Show Event with Unity desktop
(too old to reply)
Greg Raffaelle
2014-01-08 01:56:58 UTC
Permalink
The menu show event does not appear to be working with the global unity
menu in Ubuntu. When a program menu is displayed from the top global
menu it does not send a show event to the main program class. My
program menu only appears in the top global menu bar and not at the top
of the main form. Is there a way to get the menu show event from the
global menu? Is there a work around to get the program menu back on the
main form?

Thanks,
Greg
Benoît Minisini
2014-01-08 02:13:19 UTC
Permalink
Post by Greg Raffaelle
The menu show event does not appear to be working with the global unity
menu in Ubuntu. When a program menu is displayed from the top global
menu it does not send a show event to the main program class. My
program menu only appears in the top global menu bar and not at the top
of the main form. Is there a way to get the menu show event from the
global menu?
If it not automatically managed by the GUI toolkit (i.e. it should make
no difference to the program if its menu has been put somewhere else) I
don't think so.
Post by Greg Raffaelle
Is there a work around to get the program menu back on the
main form?
Normally, that environment variable:

APPMENU_DISPLAY_BOTH=1

Test it and tell me if it works for you.

Regards,
--
Benoît Minisini
Greg Raffaelle
2014-01-09 04:07:19 UTC
Permalink
I set the environment variable APPMENU_DISPLAY_BOTH=1 as suggested and
the program menu is now displayed on both the global unity menu at the
top of the screen and on the main form.

However, I still believe the program main class is only receiving show
menu events from the menu on the main form. The attached pdf shows two
screen shots with the program file menu displayed. The image on the
left is the file menu displayed from the top menu and the one of the
right is the file menu displayed from the main form. In the main class
I use the file menu _show() event to displayed recently opened file
names as items 1 through 5 at the bottom of the file menu. On the left
image you can see that item 1 is blank but on the right image the file
name test2.bps appears besides item 1. I did not perform any other
program operations between these two screen shots so the file menus
should have been displayed the same. Also note the underlining of short
cut letters (keys) does not show on the file menu in the right image.
When I set a breakpoint on the show menu event sub in the main class the
program does not stop when the file menu is selected from the top menu,
but it does stop when the same menu is selected on the main form.

Any suggestions on getting the two menu to display the same would be
appreciated.

Thanks,
Greg
Benoît Minisini
2014-01-10 20:40:38 UTC
Permalink
Post by Greg Raffaelle
I set the environment variable APPMENU_DISPLAY_BOTH=1 as suggested and
the program menu is now displayed on both the global unity menu at the
top of the screen and on the main form.
However, I still believe the program main class is only receiving show
menu events from the menu on the main form. The attached pdf shows two
screen shots with the program file menu displayed. The image on the
left is the file menu displayed from the top menu and the one of the
right is the file menu displayed from the main form. In the main class
I use the file menu _show() event to displayed recently opened file
names as items 1 through 5 at the bottom of the file menu. On the left
image you can see that item 1 is blank but on the right image the file
name test2.bps appears besides item 1. I did not perform any other
program operations between these two screen shots so the file menus
should have been displayed the same. Also note the underlining of short
cut letters (keys) does not show on the file menu in the right image.
When I set a breakpoint on the show menu event sub in the main class the
program does not stop when the file menu is selected from the top menu,
but it does stop when the same menu is selected on the main form.
Any suggestions on getting the two menu to display the same would be
appreciated.
Thanks,
Greg
I'm afraid there is no solution.

The "AppMenu" protocol made by Ubuntu is poorly documented, and it seems
that there is no way to be warned when a external menu is shown.

Regards,
--
Benoît Minisini
Greg Raffaelle
2014-01-13 19:15:46 UTC
Permalink
Post by Greg Raffaelle
I set the environment variable APPMENU_DISPLAY_BOTH=1 as suggested and
the program menu is now displayed on both the global unity menu at the
top of the screen and on the main form.
However, I still believe the program main class is only receiving show
menu events from the menu on the main form. The attached pdf shows two
screen shots with the program file menu displayed. The image on the
left is the file menu displayed from the top menu and the one of the
right is the file menu displayed from the main form. In the main class
I use the file menu _show() event to displayed recently opened file
names as items 1 through 5 at the bottom of the file menu. On the left
image you can see that item 1 is blank but on the right image the file
name test2.bps appears besides item 1. I did not perform any other
program operations between these two screen shots so the file menus
should have been displayed the same. Also note the underlining of short
cut letters (keys) does not show on the file menu in the right image.
When I set a breakpoint on the show menu event sub in the main class the
program does not stop when the file menu is selected from the top menu,
but it does stop when the same menu is selected on the main form.
Any suggestions on getting the two menu to display the same would be
appreciated.
Thanks,
Greg
I'm afraid there is no solution.
The "AppMenu" protocol made by Ubuntu is poorly documented, and it >seems
that there is no way to be warned when a external menu is shown.
Regards,
--
Benoît Minisini
I was using the gb.gui component in my project when I reported the menu
problems with Ubuntu Unity Desktop in my email above.

However, when I switched to using gb.qt4 instead of gb.gui the showmenu
event and underlining of shortcut menu letters works correctly.

Thanks,
Greg
Benoît Minisini
2014-01-13 14:36:42 UTC
Permalink
Post by Greg Raffaelle
Post by Greg Raffaelle
I set the environment variable APPMENU_DISPLAY_BOTH=1 as suggested and
the program menu is now displayed on both the global unity menu at the
top of the screen and on the main form.
However, I still believe the program main class is only receiving show
menu events from the menu on the main form. The attached pdf shows two
screen shots with the program file menu displayed. The image on the
left is the file menu displayed from the top menu and the one of the
right is the file menu displayed from the main form. In the main class
I use the file menu _show() event to displayed recently opened file
names as items 1 through 5 at the bottom of the file menu. On the left
image you can see that item 1 is blank but on the right image the file
name test2.bps appears besides item 1. I did not perform any other
program operations between these two screen shots so the file menus
should have been displayed the same. Also note the underlining of short
cut letters (keys) does not show on the file menu in the right image.
When I set a breakpoint on the show menu event sub in the main class the
program does not stop when the file menu is selected from the top menu,
but it does stop when the same menu is selected on the main form.
Any suggestions on getting the two menu to display the same would be
appreciated.
Thanks,
Greg
I'm afraid there is no solution.
The "AppMenu" protocol made by Ubuntu is poorly documented, and it >seems
that there is no way to be warned when a external menu is shown.
Regards,
--
Benoît Minisini
I was using the gb.gui component in my project when I reported the menu
problems with Ubuntu Unity Desktop in my email above.
However, when I switched to using gb.qt4 instead of gb.gui the showmenu
event and underlining of shortcut menu letters works correctly.
Thanks,
Greg
Hu hu !? Do you have a little project for me that I can use for testing?
--
Benoît Minisini
Continue reading on narkive:
Loading...