gw0kin / gnome2-globalmenu

Automatically exported from code.google.com/p/gnome2-globalmenu
GNU General Public License v2.0
0 stars 0 forks source link

All menu signals filtered #613

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Connect to any signal, e.g. 'event' of any menu without global menu module 
loaded and output the event details
2. See a lot of output due to various signals being emitted
3. Connect to the same signal of any menu with global menu module loaded

What is the expected output? What do you see instead?
Any signal should get through, none does instead. It is as if the global menu 
filters out all signals.

Original issue reported on code.google.com by matsusuk...@gmail.com on 18 Jun 2010 at 11:37

GoogleCodeExporter commented 9 years ago
Well, I would say most of the signals regarding the widget cycle eg realize, 
show, map, and such, won't emit because the local menu is never realized. The 
widget life cycle never occurs.

On the other hand, the signals like activate highlight/dehighlight(i forget the 
gtk name of the signal) are simulated by the global menu plugin and emitted, 
upon the request from the global menu applet.

Original comment by rainwood...@gmail.com on 19 Jun 2010 at 12:12

GoogleCodeExporter commented 9 years ago
That’s too bad but I understand what you mean. I assume simulating all 
signals would be to much of a burden?

Why I stumbled upon this: in our project we dynamically rebuild a menu on the 
"map" signal and clear it on "unmap", thus ATM the menu will stay empty all the 
time.

Original comment by matsusuk...@gmail.com on 19 Jun 2010 at 12:21

GoogleCodeExporter commented 9 years ago
I remember the map signal of the submenus is simulated.

It is on line 298 of 

http://github.com/gnome-globalmenu/gnome-globalmenu/blob/master/globalmenu-plugi
n/agent.vala

Did your program hook on the map signal of the submenu or the map signal of the 
item?
Java SWT hooks to the map signal of the submenu(at least when I investigated 
the empty submenu issue for SWT programs).

Original comment by rainwood...@gmail.com on 19 Jun 2010 at 12:44

GoogleCodeExporter commented 9 years ago
We’re listening to the map event of the menu itself as can be seen here:
http://bazaar.launchpad.net/~exaile-devel/exaile/exaile-0.3.x/annotate/3450/xlgu
i/widgets/menu.py#L171

If you run our application, you will see that the submenu of the "Columns" menu 
item in the "View" menu is never generated.

Original comment by matsusuk...@gmail.com on 19 Jun 2010 at 12:54

GoogleCodeExporter commented 9 years ago
I see. I'll do some research on 'map' and 'ummap'. But I guess it is anyways 
better to hook to 'show/hide' signal, as map/unmap are a bit more low level and 
are not invoked when the widget is not realized. 

Original comment by rainwood...@gmail.com on 19 Jun 2010 at 2:41

GoogleCodeExporter commented 9 years ago
I have a similar problem here. I use the 'focus' event to rebuild a submenu, 
but the event is not emitted.

I tried do work around this limitation, but I am completely unable to 
manipulate ($menu->set_submenu($foo)) the menu (even when triggered by a button 
click). Changing the 'is_sensitive' state works fine.

Is the menu cached or anything like that? 

@exaile-devs: How did you solve the problem?

Original comment by mario.ke...@gmail.com on 18 Oct 2010 at 9:56