Re: [PATCH] - Fix for 155928 -Adds GTK2 Bookmarks to Nautilus

On Wed, 2005-06-22 at 13:48 +0100, Jamie McCracken wrote:
> Alexander Larsson wrote:
> > On Wed, 2005-06-22 at 08:40 +0200, Alexander Larsson wrote:
> > 
> >>On Tue, 2005-06-21 at 19:01 +0200, Michele Cella wrote:
> >>
> >>>Dave Camp wrote:
> >>>
> >>>>It should probably just be removed outright for now.
> >>>>
> >>>>-dave
> >>>
> >>>gtk 2.7.0 supports this [1]. Maybe you should add a conditional check 
> >>>because it's not clear if gnome 2.12 will depend on gtk 2.8.
> >>
> >>That sounds good. We should try to be compatible with that.
> > 
> > 
> > The format looks simple:
> > 
> > file:///home/alex/bin MyBinDir
> > 
> > Should be easy to handle. 
> Its not that easy! :)
> That format is forwards compatible but not backwards compatible so 
> GTKFileChooser in 2.6 cant use that so I have to tread carefully.
> I have created a new patch that allows nautilus to use, edit and store 
> bookmarks in both formats. (I copied some of the code from gtk 2.7 so if 
> its buggy complain to them!)
> To prevent new format being written in Nautilus, the patch will make the 
> Name field in the bookmarks editing window insensitive if compiled with 
> -dUSING_GTK_2_6. This is the easiest way to do this without 
> changing/removing a whole load of code. I also had to add a flag to the 
> bookmarks to indicate whether it has a user defined name.

Just use:
#include <gtk/gtkversion.h>
in the code instead.

> I haven't changed the autotools stuff as Im not an expert in that area 
> so I would appreciate if the maintainers could alter them where necessary.
> The function get_default_bookmark_name is slightly different to 
> compute_default_title (it truncates!) so I have not centralised that in 
> libnautilus-private.

No need to have a copy of everything for that, just call the general
code and then truncate it. That way changes and fixes in one place will
fix all places.

 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a bookish alcoholic romance novelist from the Mississippi delta. She's a 
manipulative red-headed magician's assistant with a birthmark shaped like 
Liberty's torch. They fight crime! 

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