Skip to main content

Hints for StartMenu events

6 replies [Last post]
Anonymous

Hi,
i'm working on the menu integration issue, and I would need some help to
understand what's the flow to add groups&items to the StartMenu. I've been
digging and found that the StartMenu class registers some listeners for
StartMenuGroupConfig and StartMenuItemConfig. I tried the following snnipet,
but it's silently ignored (while it's processed as can be checked by removing
the setGroupLinks line which leads to a NullPointerException on
StartMenu:237):

<br />
        StartMenuGroupConfig cfg =new StartMenuGroupConfig();<br />
        cfg.setName("Nothing");<br />
        cfg.setGroupLinks(new String[]{"Main"});<br />
        cfg.setDesc("Nothing interesting");<br />
        LgEventConnector.getLgEventConnector().postEvent(cfg,null);<br />

Some hint? Collin, do you still read this list? (if you didn't know, Collin
Bullock wrote the StartMenu stuff).

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@lg3d.dev.java.net
For additional commands, e-mail: interest-help@lg3d.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hideya
Offline
Joined: 2003-07-22

Hi Juan,

Checking the etc/lg3d/startmenu.lgcfg file, I see 7 menu groupLinks are specified using String array. I guess the startmenu ignores a StartMenuGroupConfig which is not included in this String array. Maybe you may want to try adding a new entry there (and it might be better if we could upgrade startmenu config mechanism so that it doesn't need to rely on this fixed String array).

hideya

> Hi,
> i'm working on the menu integration issue, and I
> nd I would need some help to
> understand what's the flow to add groups&items to the
> StartMenu. I've been
> digging and found that the StartMenu class registers
> some listeners for
> StartMenuGroupConfig and StartMenuItemConfig. I tried
> the following snnipet,
> but it's silently ignored (while it's processed as
> can be checked by removing
> the setGroupLinks line which leads to a
> NullPointerException on
> StartMenu:237):
>
> [code]
> StartMenuGroupConfig cfg =new cfg =new StartMenuGroupConfig();
> cfg.setName("Nothing");
> cfg.setGroupLinks(new String[]{"Main"});
> cfg.setDesc("Nothing interesting");
> LgEventConnector.getLgEventConnector().postEvent(cfg,
> null);
> [/code]
>
> Some hint? Collin, do you still read this list? (if
> you didn't know, Collin
> Bullock wrote the StartMenu stuff).

Juan González

Hi hideya,
I finally reported an issue (678) on start menu because it's doing some
strange things. After debugging it I can't see where is the problem cause all
the needed events are catched and processed, no idea yet, but i'm still
looking down for it.
I've come to a moment where I can generate the adequate events for every menu
& element in it getting all this info from system wide files (not feature
complete, but in good shape), but this issue is preventing me from effectivly
building the menu.
So, today i'll upload the code I have created for this purpose in the
incubator (unusefull for now), and will continue with other works until I
(we) find a solution for the StartMenu issues.

Regards.

PS: As a side note, just append that items are correctly added to existing
menus.

El Lunes, 7 de Agosto de 2006 19:28, lg3d@javadesktop.org escribió:
> Hi Juan,
>
> Checking the etc/lg3d/startmenu.lgcfg file, I see 7 menu groupLinks are
> specified using String array. I guess the startmenu ignores a
> StartMenuGroupConfig which is not included in this String array. Maybe you
> may want to try adding a new entry there (and it might be better if we
> could upgrade startmenu config mechanism so that it doesn't need to rely on
> this fixed String array).
>
> hideya
>
> > Hi,
> > i'm working on the menu integration issue, and I
> > nd I would need some help to
> > understand what's the flow to add groups&items to the
> > StartMenu. I've been
> > digging and found that the StartMenu class registers
> > some listeners for
> > StartMenuGroupConfig and StartMenuItemConfig. I tried
> > the following snnipet,
> > but it's silently ignored (while it's processed as
> > can be checked by removing
> > the setGroupLinks line which leads to a
> > NullPointerException on
> > StartMenu:237):
> >
> > [code]
> > StartMenuGroupConfig cfg =new cfg =new StartMenuGroupConfig();
> > cfg.setName("Nothing");
> > cfg.setGroupLinks(new String[]{"Main"});
> > cfg.setDesc("Nothing interesting");
> > LgEventConnector.getLgEventConnector().postEvent(cfg,
> > null);
> > [/code]
> >
> > Some hint? Collin, do you still read this list? (if
> > you didn't know, Collin
> > Bullock wrote the StartMenu stuff).
>
> [Message sent by forum member 'hideya' (hideya)]
>
> http://forums.java.net/jive/thread.jspa?messageID=140547
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@lg3d.dev.java.net
> For additional commands, e-mail: interest-help@lg3d.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@lg3d.dev.java.net
For additional commands, e-mail: interest-help@lg3d.dev.java.net

Juan González

I want to add that as I have understood the StartMenu logic it seems the data
model (for groups) is a bidirectional graph that fits the kind of info I'm
producing at the moment, it only needs to work as it's supposed.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@lg3d.dev.java.net
For additional commands, e-mail: interest-help@lg3d.dev.java.net

Juan González

I just figured out another issue with the current model. In the actual start
menu data model, menus are identified by their name (an String), but the
freedesktop standard uses a different approach to identify each submenu that
can drive to conflict.
>From http://standards.freedesktop.org/menu-spec/menu-spec-1.0.html#id2514172:

"A "menu path" is the path to a particular menu. Menu paths are
always "relative" so never start with a slash character. The path to a menu
is simply the of each parent of the menu, followed by the of
the menu itself. For example, "Foo/Bar/Baz" is a valid menu path."

This "menu path" is used through all the standard to identify each menu, and
my implementation also uses it. Now let's take a look at some of the menus
I've in my system:

Menu: /Applications/Multimedia/More: Más aplicaciones
Menu: /Applications/Utilities: Utilidades
Menu: /Applications/Utilities/More: Más aplicaciones

Following the specs there is no problem with this structure, but in our model,
as each menu is identified only by it's own name (ignoring the ones from
it's "unexistant" parents), we would (and will) end mixing a lot of stuff
from different contexts in the "More" menu. Maybe it's not a big problem to
end with that apps mixed, but is something to wonder about.

El Martes, 15 de Agosto de 2006 18:52, Juan González escribió:
> I want to add that as I have understood the StartMenu logic it seems the
> data model (for groups) is a bidirectional graph that fits the kind of info
> I'm producing at the moment, it only needs to work as it's supposed.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@lg3d.dev.java.net
> For additional commands, e-mail: interest-help@lg3d.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@lg3d.dev.java.net
For additional commands, e-mail: interest-help@lg3d.dev.java.net

hideya
Offline
Joined: 2003-07-22

Hi Juan,

Thanks for improving the menu system and filing Issue 678!

> I just figured out another issue with the current model. In the actual start
> menu data model, menus are identified by their name (an String), but the
> freedesktop standard uses a different approach to identify each submenu that
> can drive to conflict.
...
> Following the [freedesktop] specs there is no problem with this structure, but in our model,
> as each menu is identified only by it's own name (ignoring the ones from
> it's "unexistant" parents), we would (and will) end mixing a lot of stuff
> from different contexts in the "More" menu. Maybe it's not a big problem to
> end with that apps mixed, but is something to wonder about.

This is a good finding. In order not to forget, would you mind to file an RFE about this?

Would it be possible to simply use the entire menupath to identify a menu group (set it to the "name" field) and put a simple name to group's "desc" (and show it when the group is displayed)?

hideya

Juan González

s/Collin/Colin

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@lg3d.dev.java.net
For additional commands, e-mail: interest-help@lg3d.dev.java.net