Re: [Nautilus-list] Re: gnocam camera:// moniker and thumbnailing



Hi Michael,

the preferred diff format is described in the HACKING file in Nautilus
sources. The short form is: 'cvs diff -pu >patch'.

My first reaction to your patch was that re-using the USE_PUBLIC_METADATA
preference for the thumbnails was conceptually wrong. But it grew on me, and
I now think that it's not only sensible but better than having a separate
preference for this. (If a user wants to avoid scattering
.nautilus-metafile.xml files around their disk, then they probably want to
avoid scattering both .thumbnails directories for the same reason;
conversely, if they're working in a shared environment where it's useful to
share the metafile data among multiple users, then it's an advantage to
share the thumbnails as well.)

Your patch will work, but is not the most efficient way to write this.
There's a mechanism to access preferences repeatedly that's quicker than
calling get_preference (or get_integer_preference or whatever); you set up
an "auto-storage" variable for the preference and then just use that
variable. You can search the code for "eel_preferences_add_auto_integer" for
examples.

I think this is a good change to make and I'll try to finish the idea by
using the auto_storage mechanism in the next few days. If I'm not getting to
it quickly enough, you are welcome to redo your patch using the auto-storage
mechanism and post it again.

Thanks,

John

on 5/9/01 11:46 AM, Michael Rothwell at rothwell holly-springs nc us wrote:

> Here's a diff to make thumbnailing follow the "metadata" preferences. Now I
> have to figure out how to get gnocam's bonobo module to preview the images on
> the camera.
> 
> -M
> 
> p.s.. what's the preferred patch format?
> 
> RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-thumbnails.c,v
> retrieving revision 1.19
> diff -r1.19 nautilus-thumbnails.c
> 31a32,33
>> #include "nautilus-global-preferences.h"
>> #include "nautilus-metadata.h"
> 97a100
>> NautilusSpeedTradeoffValue preference_value;
> 104a108,114
>> /*  make thumbnails in central location according to setting of
>> NAUTILUS_PREFERENCES_USE_PUBLIC_METADATA -- thumbnails are metadata, right?
>> */
>> preference_value = eel_preferences_get_integer
>> (NAUTILUS_PREFERENCES_USE_PUBLIC_METADATA);
>> if (preference_value == NAUTILUS_SPEED_TRADEOFF_NEVER) {
>> use_local_directory = FALSE;
>> } 
>> 
> 296a307
>> 
> 576a588
>> 
> 586a599
>> 
> 
> On Wed, May 09, 2001 at 01:06:30PM -0400, Michael Rothwell wrote:
>> 
>> In nautilus/libnautilus-private/nautilus-thumbnails.c, I found this:
>> 
>> if (use_local_directory && is_local) {
>> thumbnail_uri = g_strdup_printf ("%s/.thumbnails", directory_name);
>> } else  {
>> GnomeVFSResult result;
>> GnomeVFSURI *thumbnail_directory_uri;
>> 
>> ... is there a place to set the use_local_directory flag to false via the GUI
>> preferences?
>> 
>> -M
>> 
>> On Wed, May 09, 2001 at 12:38:59PM -0400, Michael Rothwell wrote:
>>> Hmm.. I just opened Nautilus by right-clicking on my "home" directory and
>>> choosing "open." I then opened the preferences menu. Then I opened it again.
>>> Then I thought to look on another desktop. :) Perhaps Nautilus could be
>>> taught to open its dialogs in the same place as teh current window. And is
>>> there a wy to make Nautilus open a new window if there's not already a
>>> window with that view when opening desktop items?
>>> 
>>> I'll look at the thumbnails problem.
>>> 
>>> -M
>>> 
>>> On Wed, May 09, 2001 at 08:32:49AM -0700, John Sullivan wrote:
>>>> on 5/9/01 5:20 AM, David Megginson at david megginson com wrote:
>>>> 
>>>>> Michael Rothwell writes:
>>>>> 
>>>>>> Another problem is, Nautilus cannot make a ".thumbnails" directory
>>>>>> on the camera, so it cannot display thumbnails at all. It might be
>>>>>> nice to have nautilus use a substitute directory in my home dir for
>>>>>> read-only media like cameras and CDROMs, so that it can still show
>>>>>> thumbnails for images on read-only media. Maybe
>>>>>> ~.thumbnails/proxy/camera:__previews s20/IMG_0336.JPG.png"
>>>>> 
>>>>> I think it would be a good idea to use a substitute directory
>>>>> *always*.  As a basic principle, Nautilus shouldn't pollute any
>>>>> directories it doesn't own, except for the standard configuration
>>>>> points ($HOME, $HOME/gnome, $HOME/.gnome-desktop).  With Nautilus 1.0,
>>>>> I had the very unpleasant experience of burning a CD-ROM and finding
>>>>> unwanted .nautilus-metafile.xml files all over it afterwards.
>>>>> 
>>>>> 
>>>>> All the best,
>>>>> 
>>>>> 
>>>>> David
>>>> 
>>>> You can set a preference so that Nautilus puts all the nautilus-metafiles
>>>> into a single directory. The preference is the confusingly-named "Make
>>>> Folder Appearance Details Public" and is found only at the Advanced user
>>>> level in the Speed Tradeoffs pane. If you set this to Never then Nautilus
>>>> will put all the nautilus-metafiles into a single directory.
>>>> 
>>>> (You can also turn off thumbnailing, but there's not currently an option to
>>>> leave thumbnailing on but have all the thumbnails stored in a single
>>>> directory. Perhaps some enterprising hacker would like to add that
>>>> feature.)
>>>> 
>>>> John
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Nautilus-list mailing list
>>>> Nautilus-list lists eazel com
>>>> http://lists.eazel.com/mailman/listinfo/nautilus-list
>>> 
>>> 
>>> _______________________________________________
>>> Nautilus-list mailing list
>>> Nautilus-list lists eazel com
>>> http://lists.eazel.com/mailman/listinfo/nautilus-list
> 
> 
> _______________________________________________
> Nautilus-list mailing list
> Nautilus-list lists eazel com
> http://lists.eazel.com/mailman/listinfo/nautilus-list






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