double menu entries

Brian J. Tarricone bjt23 at cornell.edu
Tue Nov 16 15:01:48 CET 2004


On 11/16/04 07:51, Joop Stakenborg wrote:
> Op ma, 15-11-2004 te 14:11 -0800, schreef Brian J. Tarricone:
> > On 11/15/04 22:27, Joop Stakenborg wrote:
> > > I noticed that xfce4 creates double menu entries when an application
> > > registers with both gnome and kde. For example, qalculate uses the
> > > following entries in qalculate.desktop:
> > > 
> > > Categories=GNOME;Application;Utility;
> > > Categories=Qt;KDE;Utility
> > > 
> > > This file is installed both in $(datadir)/applications (use by gnome)
> > > and $(datadir)/applnk/Utilities (kde), resulting in 2 identical xfce
> > > menu entries in the xfce Utilities menu.
> > 
> > if the .desktop file contains two Categories= lines, then it's invalid.
> > the menu avoids duplicates by comparing the full menu path of the
> > to-be-added item to previous items.  if there's a match, it discards it.
> > if the two .desktop files end up specifying the location differently,
> > there's nothing i can do.  you should bug the qalculate maintainer to
> > fix his .desktop files.
> > 
> 
> Okay, 
> 
> what about the following. I have developed an application with a single
> desktop file and a single entry:
> 
> Categories=GNOME;Application;Utility;
> 
> I install it in $(datadir)/applications (gnome) and
> $(datadir)/applnk/Applications (kde). The xfce menu now also shows 2
> entries. BTW this is for XFCE 4.2 RC1.

ok, after talking with benny a bit, i committed something that might solve
this one, and maybe a few related problems.  if the entry is still showing
up now, then the package maintainer needs a good kick in the butt ^_~.

also i noticed a place where i was malloc()ing and free()ing a string over
and over; now it's using a static string with snprintf(), so the menu might
be slightly faster now ^_~.

	-brian



More information about the Xfce4-dev mailing list