Menus
Pete Ryland
pdr at pdr.cx
Thu Oct 26 18:38:38 EEST 2006
On 26/10/06, The Rasterman Carsten Haitzler <raster at rasterman.com> wrote:
>
> On Thu, 26 Oct 2006 02:41:08 +0100 "Pete Ryland" <pdr at pdr.cx> babbled:
> > 1. User installs package XYZ (which has nodisplay=true in xyz.desktop,
> so
> > doesn't show up in the menus by default)
> > 2. User runs a menu editor and sets it to display, causing the menu
> editor
> > to copy the .desktop file to ~/.menus/ with nodisplay=false
> > 3. User upgrades package XYZ which has changed its binary's name to xyz2
> > 4. User's menu has now broken
>
> aaah a COW problem (can of worms). - problem - what if app now changes
> its .desktop name from gimp.desktop to gimp-2.2.desktop in the upgrade
> (has
> happened before)? back to same/similar problem. and include doesn't fix
> it.
> thought useful - this also adds more expense and slowness and disk io
> overhead
> in parsing .desktop files.
There is actually no extra disk io overhead, since both .desktop files will
be parsed anyway (well at least that's currently what happens in the gnome
implementation). Besides, this would be a relatively tiny extra overhead.
There are far greater inefficiencies in other ways in gnome-menus in any
case (I'm not familiar with other implementations of this spec).
in reality the problem is that of shadowing data you
> can't always monitor and know what happened to it - did it get deleted,
> simply
> upgraded to a new name etc. etc.
>
> i think that maybe this is a problem we can live with - but if we
> absolutely
> have to have a fix, maybe instead of an include we have a Source= line
> added
> that determines the real source - at any time the menu or launcher or
> whatever
> can perform a sanity check and find the source that this .desktop shadows
> and
> then infer if it has changed and alert the user to take some action. Maybe
> also
> an Original= line that points to a pristine copy of the source before the
> shadow copy (in the users config) was altered. thus no matter what happens
> to
> the original itself, other than deletion of the file, the app can infer
> what,
> changed in the original compared to when it made the shadow copy and what
> has
> been altered in the shadow compare to that original.
This does seem a better approach, but I can see two drawbacks already.
Firstly, when would the user be prompted to take action on a changed
original? In the menu editor? When using the panel's menu, or any other
menu consumer? Secondly, how can you determine if the original has
changed? Are you suggesting keeping a copy of the original system .desktop
file alongside the user's file and comparing it every time to the current
system file? Surely there's a better way.
Actually, I think users will be ok with having a menu item not get updated
if they've changed anything like the name or parameters, in fact this is
probably what they want. However, if all they've done is unhide the item, I
think they'd want system updates to apply. If the file name changes, I
don't think it's a problem for a user to have to unhide it again; there's
really nothing else possible, but the old one item should no longer appear.
Perhaps we need another file which simply contains the hidden status, or put
this in the .menu file instead.
Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/xdg/attachments/20061026/937ad7a6/attachment.htm
More information about the xdg
mailing list