Re: popup menu not grabbing focus problems



First of all thanks for your quick reply Florian.

Because I have to start somewhere I studied a few extensions about their
use of __proto__: PanelMenu.Button.prototype to define a panelmenu
button.

They all use it to bring a button on the panel that opens a popup menu
when clicked on. with all these extensions I see no use of other coding
than making a object with that prototype, hang a few actors on
it (bin and icon mostly), populating that menu and insert the button to
the main pannel with
Main.panel._leftBox.insert_child_at_index(this.actor, 1);

I tried the same but different, I insert a layout to the main panel
with several (maximum 11 which is the number of XDG categories)
buttons, each is a Panel Menu Button that has a menu attached.

If you need to see code than that is no problem, just ask me and
forgive me for the mess in my code that comes with trying, I always
cleanup when things work, not sooner.

-- 
(o_
//\  Regards, Groeten,
V_/_ Bas Burger.


On Wed, 20 Jun 2012 23:21:27 +0200
Florian Müllner <fmuellner gnome org> wrote:

> On Wed, Jun 20, 2012 at 11:09 PM, Yaa101 <yaa101 xs4all nl> wrote:
> > I am writing an extension that is a variation to both quicklaunch
> > extensions, mine is a buttonbar that collects the XDG category of
> > a .desktop file and defines a button for each found Main XDG
> > category, when clicked on the button a popup menu becomes visible
> > with all the .desktop files that carry the category.
> >
> > This is where things go rough on me, [...] clicking the button
> > brings up the menu but the menu does not want to grab the focus and
> > sits there, when clicking on the menu, anything that is under it
> > will be activated but not the items on the menu.
> 
> I'm not entirely sure what you are trying to do, but it sounds like
> you are missing a call to
> 
> global.set_stage_input_mode (Shell.StageInputMode.FOCUSED)
> 
> 
> Regards,
> Florian



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]