Re: [PATCH] Move custom icons when copying metadata



On Mon, 2005-12-19 at 19:30 +0100, Christian Neumair wrote:
> On Mo, 2005-12-19 at 10:19 +0100, Alexander Larsson wrote:
> > On Sun, 2005-12-18 at 22:45 +0100, Christian Neumair wrote:
> > > On Mo, 2005-09-26 at 12:28 +0200, Alexander Larsson wrote:
> > > > Its sort of strange that the metafile system special-cases a specific
> > > > key entry like this. It would make more sense to e.g. store the custom
> > > > icon with a relative filename. That would work for more cases than the
> > > > prefix of the uri being identical too. For instance when there are
> > > > symlinks etc involved.
> > > 
> > > Do you prefer the attached patch?
> > 
> > Yeah that looks better.
> > 
> >  			if (nautilus_file_is_mime_type (file, "application/x-desktop")) {
> > +				icon = g_strdup (icon_path);
> > +
> > 
> > This seems to leak though.
> 
> I don't think it leaked, the free/malloc codepath was a bit
> undiscoverable, though.
> I'm attaching a new patch, which aims to be a a bit more readable. This
> one also sets the default path of the image file chooser to the target
> directory, ensures that no image preview flickering occurs when opening
> the file chooser and calls set_icon in the file chooser result switch
> with the selected URI instead of using the filename.

Looks good. Please commit.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a lounge-singing drug-addicted paramedic fleeing from a secret government 
programme. She's a radical extravagent research scientist with an evil twin 
sister. They fight crime! 




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