Re: [Nautilus-list] Creating Launchers with Nautilus. Potensial patch.



On Mon, 4 Mar 2002, Gaute Lindkvist wrote:

> > > Basically, you have to write the file somewhere else, and make sure that
> > > the vfolder specifications pick up the directory you write to.
> >
> > Surely it's easy enough to save any modifications to somewhere in a user's
> > .gnome directory, and read that dir along with the others? (Should users
> > ever be able to modify 'system' .desktop files? I wouldn't think so, but
> > there could be a good reason for them to somewhere.)
> >
> 
> Ok. I've figured out how to do it. There is a useritem-directory specified
> in .gnome2vfolders/applications.vfolder-info.
> Anything I put in this folder, will be merged into the dirs, based on
> "Categories" specified in the desktop-file.
> 
> However, this only works for a few subfolders of Applications. For
> instance, applications:///Internet won't accept user created desktop
> files. applications:///Accesories will. I have no idea why there is a
> difference.

That's really strange. Looking at the vfolder specifications they seem 
quite identical in principle. I don't know this code very well though. 
There might actually be a bug in the vfolder code, since that is quite new 
code.
 
> In addition, me creating this workaround does nothing for helping to move
> desktop-files from one place to another in the hierarchy via drag and
> drop. This is still broken. Most likely because this doesn't really handle
> vfolders either.

The idea of dragging files in the hiearachy conceptualy doesn't 
work. That is not how vfolders work. Any given files can appear in many or 
no places in the hierarchy, all depending on the keywords in it and the 
queries that define the hierarchy.

The idea behind vfolders is that all the files go to the same place, and 
you build the menus from the content of the files (the keywords).
The latest version of the specifications for vfolders are at:
https://listman.redhat.com/pipermail/xdg-list/2001-November/000196.html
 
> The correct way will probably be to implement this support into whatever
> common library these cases use, instead of a workaround for each case.
> 
> This is beyond my skills at this point.
> 
> It is however a really critical issue, because Gnome 2 is extremely broken
> if there is a release without a functioning menu-editor.
> I cc'ed this to desktop-devel-list, because if this isn't fixable before
> Gnome 2.0, there need to be an alternative menu-editor.

The menu editor should basically be an editor for the vfolder spec and for 
the desktop files that lets you change the keywords for launchers and 
perhaps edit the queries making up the vfolders.
 
> To summarize for those who haven't followed the entire discussion:
> 1. I've created a patch that lets Nautilus create launcher-files.
> 2. gnome_desktop_item_save() does not support vFolders, which is used by
> the menu-system, so I started to look at a work-around.
> 3. I have a workaround that seems exceptionally hacky, bad and silly, but
> sort of works for some cases. My workaround is a function
> "gnome_desktop_item_safe_vfolder()".

What does this function do? Change the contents of the desktop file?

> 4. The Right Way [tm] is probably to just implement vFolder support into
> gnome_desktop_item_save() or a lower layer that is common between this,
> and drag and dropping to the applications:/// folder.
> 
> Gaute

I'm not sure what the right way is at all. Maybe george could shed some 
light on this issue. 

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a suicidal albino hairdresser fleeing from a secret government programme. 
She's a cold-hearted extravagent safe cracker with an evil twin sister. They 
fight crime! 




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