Re: [patch] pluggable property dialog pages



On 24 Oct 2002, James Willcox wrote:

> On Thu, 2002-10-24 at 11:05, Alexander Larsson wrote:
> > On 23 Oct 2002, James Willcox wrote:
> > 
> > > Hi,
> > > 
> > > I've attached a patch that makes it possible to have mime-type-sensitive
> > > pages in the properties dialog.  It uses the good 'ol NautilusView stuff
> > > people are used to, so there wasn't much required to make it happen. 
> > > I've also attached a sample view that lets you see metadata contained in
> > > audio files (mp3, ogg, etc).  Let me know what you think.
> <snip>
> 
> Ok, I've fixed some more stuff.  See the attached patch w/ changelog.

Looks pretty good. You're leaking new_mime_type though.

I'm not 100% sure about the file change though. Removing + adding will 
lose the state of any pages that still exist after the change. Think about 
a page that lets you change a file (e.g. desktop file property page). When 
it rewrites the file Nautilus is gonna catch change events before it's 
fully written, and it may potentially exist as a different type for a 
while, which means the component doing the change will be destroyed.

I guess if we make sure all property pages modify files atomically (write 
to new file + rename over original when done) it'll be ok.

Anyway. Please check in after you've freed new_mime_type. We'll look at 
the rest later.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a jaded soccer-playing sorceror from the 'hood. She's a virginal 
kleptomaniac wrestler prone to fits of savage, blood-crazed rage. They fight 
crime! 




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