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

Bug#243375: kdelibs-bin: menu-method freedesktop should set the Generic Name Field to longtitle instead of title



On Mon, Apr 12, 2004 at 08:41:23PM +0200, Fabian Franz wrote:
> Package: kdelibs-bin
> Version: 4:3.2.2-1
> Severity: important
> Tags: patch
> 
> Hi,
> 
> while building the new Knoppix KDE CVS I noticed I forgot in my post to
> debian-devel to add the change I made to freedesktop-desktop-entry-spec-apps.
> 
> We have the longtitle field and we should use it and I think the comment
> field is not so good for longtitle as it does not get displayed (from
> the desktop-entry-spec: only in tooltip).
> 
> However what would work is to use the Generic Name field as also many
> KDE-Applications have a comment _or_ a generic name on the package.
> 
> As most menu items are not self-explanatory (what is slrn?) it would be
> helpful to add this comments by the package.
> 
> slrn (Newsreader)
> 
> Following patch does that:
> 
> --- /mnt/hda3/etc/menu-methods/freedesktop-desktop-entry-spec-apps      2004-04-12 11:32:42.000000000 +0200
> +++ freedesktop-desktop-entry-spec-apps 2004-04-12 17:35:43.000000000 +0200
> @@ -13,7 +13,7 @@
>         "Type=Application\n"
>         "Encoding=UTF-8\n"
>         "Name=" title() "\n"
> -       "GenericName=" title() "\n"
> +       "GenericName=" ifnempty($longtitle,replace($longtitle,title() ":", "")) "\n"
>         "Comment=" ifnempty($longtitle,$longtitle) "\n"
>         "Icon=" icon() "\n"
>         "Exec=" $command "\n"
> 
> The replace is for applications, which repeat the title in the longtitle field, like xeyes.
> 
> Please think about it :-).
> 
> cu
> 
> Fabian
> 
> PS: Severity set to important as this can be a huge usability issue.

I had previously forgotten to remove the GenericName entry from the
menu-methods which caused the bad looking GenericName (Name) display
duplication. I had enabled it only for testing and forgot to remove it.
However, I believe misusing GenericName = longtitle() is a usability
issue as well. GenericName is supposed to be Generic, not a really long
description of the program.

Here is an example debian .menu file I saw on my system:

?package(xbase-clients):\
 needs=x11\
 section=Apps/Tools\
 hints="Screenshot"\
 longtitle="X Window Snapshot: take snapshot of any X window (xwd|xwud)"\
 title="X Window Snapshot"\
 command="xwd | xwud"

With GenericName misused as above the default KDE setup would display:

X Window Snapshot: take snapshot of any X window (xwd|xwud) (X Window Snapshot)

That is 79 chars wide! That probably won't even fit on the screen width
of many systems. I am not sure what happens in that case, whether it
just wraps the text of displays part of it off the side of the screen.

There are two real bugs here that you have touched on though.
1. Debian menu has no real concept of GenericName
2. KDE menu doesn't display comments as tooltips (Gnome does this nicely)

If both of those bugs were fixed it would work much better. We could
have GenericName = generictitle() and Comment = longtitle() or something
similiar to that. I look forward to the time when Debian will convert to
the freedesktop menu standards so that the integration will be much
smoother. :)

Note that of course Knoppix is free to modify the scripts how they see
fit I just don't think its a good idea to make GenericName = longtitle()

Chris

Attachment: signature.asc
Description: Digital signature


Reply to: