Re: [Thunar-dev] ThunarVFS, volumes and pathes
Ok, I will look more closely why it doesn't return a pointer in my case. Perhaps just a little mistake from me. For the trash path, you're right, once we are on the Vfs API there's no reason to be able to translate it to a unix path... I'll deal with the VFS for the code related to the trash, then. Thanks ! Christophe On Feb 17, 2008 6:38 PM, Benedikt Meurer <[EMAIL PROTECTED]> wrote: > Christophe Chapuis wrote: > > Hello ! > > > > I'm currently trying to develop a little plugin for cairo-dock, in > > order to have a better integration inside Xfce. It consists in > > implementing some wrapper methods to do simple things with the VFS, > > like listing the volumes, accessing the trash, (un)mounting, etc... > > I've finished the first draft, and it begins to work. But I'm facing > > some problems with some functions of ThunarVfs... So perhaps you have > > some ideas about it. > > > > 1) I'm trying to use thunar_vfs_volume_manager_get_volume_by_info in > > order to know if a given URI is mounted or not. For example, I've got > > "file:///home/chris/Documents", which is abviously mounted because it > > is on "/home". But it doesn't find the volume! I just get a NULL > > pointer Why ? > > Hm, this function simply checks all currently reported volumes (from > HAL) for a volume that contains the actual file. See > thunar-vfs-volume-manager.c. Dunno why that should fail for you. > > > 2) I would like to get the unix path of the trash. I used > > thunar_vfs_path_dup_string with a ThunarVfsPath associated with > > "trash:/", but it returns "/"... How could I retrieve > > "/home/chris/.local/share/Trash" ? > > You cannot retrieve the Unix path, because there might not even be > something like this (well, actually currently, there needs to be one, > but this will change in the future). > > > If you could help me, I'd be very grateful ! > > Christophe > > Benedikt > ___ > Thunar-dev mailing list > Thunar-dev@xfce.org > http://foo-projects.org/mailman/listinfo/thunar-dev > ___ Thunar-dev mailing list Thunar-dev@xfce.org http://foo-projects.org/mailman/listinfo/thunar-dev
Re: [Thunar-dev] ThunarVFS, volumes and pathes
Christophe Chapuis wrote: > Hello ! > > I'm currently trying to develop a little plugin for cairo-dock, in > order to have a better integration inside Xfce. It consists in > implementing some wrapper methods to do simple things with the VFS, > like listing the volumes, accessing the trash, (un)mounting, etc... > I've finished the first draft, and it begins to work. But I'm facing > some problems with some functions of ThunarVfs... So perhaps you have > some ideas about it. > > 1) I'm trying to use thunar_vfs_volume_manager_get_volume_by_info in > order to know if a given URI is mounted or not. For example, I've got > "file:///home/chris/Documents", which is abviously mounted because it > is on "/home". But it doesn't find the volume! I just get a NULL > pointer Why ? Hm, this function simply checks all currently reported volumes (from HAL) for a volume that contains the actual file. See thunar-vfs-volume-manager.c. Dunno why that should fail for you. > 2) I would like to get the unix path of the trash. I used > thunar_vfs_path_dup_string with a ThunarVfsPath associated with > "trash:/", but it returns "/"... How could I retrieve > "/home/chris/.local/share/Trash" ? You cannot retrieve the Unix path, because there might not even be something like this (well, actually currently, there needs to be one, but this will change in the future). > If you could help me, I'd be very grateful ! > Christophe Benedikt ___ Thunar-dev mailing list Thunar-dev@xfce.org http://foo-projects.org/mailman/listinfo/thunar-dev
Re: [Thunar-dev] Problem with thumbnails
Erik Harrison wrote: > On Feb 17, 2008 6:37 AM, Erlend Davidson <[EMAIL PROTECTED]> wrote: > >>> Thunar use the generic icon for that mime type. >>> >> Or, the thumbnailer should gracefully fail when overwhelmed, and let >> Well the problem is how to tell when you're overwhelmed? Difference >> people have difference ideas of when a thumbnailer should and shouldn't >> run... I think most people would say don't run if it's going to use swap >> space, I would say don't run if it's going to adversely affect the >> apparent responsiveness of the operating environment. If you're running >> a remote filesystem (fusesmb / sshfs) then the file-sizes which are safe >> to thumbnail change dramatically. >> >> > > Which is why I wasn't arguing for a constant file size. I figured a > simple timeout would scale nicely. > Actually that would work quite well - a setting in thunar "thumbnail only files which take under 5 seconds". In order to handle the networked filesystems thunar would remember the size and mimetype of the file, and not thumbnail other files in that directory (incl. subdirectories) which it believes will take too long. Two problems: 1. if you try and load X MB into machine RAM when only Y MB is available (Y What's Nautilus's solution here? We use Nautilus thumbnailers if GConf > is available, we ought to look and see how they handle this problem - > do the individual thumbnailers take care of it, or does Nautilus kill > thumbnailers that misbehave? > Nautilus just does it by filesize, and they never thumbnail files in remote filesystems. Erlend ___ Thunar-dev mailing list Thunar-dev@xfce.org http://foo-projects.org/mailman/listinfo/thunar-dev
Re: [Thunar-dev] Problem with thumbnails
On Feb 17, 2008 6:37 AM, Erlend Davidson <[EMAIL PROTECTED]> wrote: > > > Hehe, high-performance and large images? It is possible to load and > > store thumbnails inside the EXIF data AFAIK. I imagine large JPEGs > > will sometimes have that. The thumbnailer could check for that and > > fail otherwise. > > > Most images produced by a digital camera will have a thumbnail stored in > the exiv data (it's the same thumbnail the camera uses to display the > image on the LCD). Thunar already extracts those (this came in 0.8.0, > and gives very good performance). > > > Or, the thumbnailer should gracefully fail when overwhelmed, and let > > Thunar use the generic icon for that mime type. > Well the problem is how to tell when you're overwhelmed? Difference > people have difference ideas of when a thumbnailer should and shouldn't > run... I think most people would say don't run if it's going to use swap > space, I would say don't run if it's going to adversely affect the > apparent responsiveness of the operating environment. If you're running > a remote filesystem (fusesmb / sshfs) then the file-sizes which are safe > to thumbnail change dramatically. > Which is why I wasn't arguing for a constant file size. I figured a simple timeout would scale nicely. What's Nautilus's solution here? We use Nautilus thumbnailers if GConf is available, we ought to look and see how they handle this problem - do the individual thumbnailers take care of it, or does Nautilus kill thumbnailers that misbehave? > One or two of the Thunar-thumbnailers (the goodies.xfce.org ones) will > refuse to run on large files. For example the xmgrace thumbnailer (.agr > files) won't run on files > 50MB, because it would actually have to load > all of that into memory. But as I said before you cannot apply the same > logic to video files (they aren't loaded into memory). > > Having thumbnailers try and run on large files just to fail is bad... > for the 3 seconds when it's loading the performance of the user's > computer will be affected. > > > Erlend > > ___ > Thunar-dev mailing list > Thunar-dev@xfce.org > http://foo-projects.org/mailman/listinfo/thunar-dev > -- Erik "Look at me still talking when there is Science to do" ___ Thunar-dev mailing list Thunar-dev@xfce.org http://foo-projects.org/mailman/listinfo/thunar-dev
Re: [Thunar-dev] Problem with thumbnails
> Hehe, high-performance and large images? It is possible to load and > store thumbnails inside the EXIF data AFAIK. I imagine large JPEGs > will sometimes have that. The thumbnailer could check for that and > fail otherwise. > Most images produced by a digital camera will have a thumbnail stored in the exiv data (it's the same thumbnail the camera uses to display the image on the LCD). Thunar already extracts those (this came in 0.8.0, and gives very good performance). > Or, the thumbnailer should gracefully fail when overwhelmed, and let > Thunar use the generic icon for that mime type. Well the problem is how to tell when you're overwhelmed? Difference people have difference ideas of when a thumbnailer should and shouldn't run... I think most people would say don't run if it's going to use swap space, I would say don't run if it's going to adversely affect the apparent responsiveness of the operating environment. If you're running a remote filesystem (fusesmb / sshfs) then the file-sizes which are safe to thumbnail change dramatically. One or two of the Thunar-thumbnailers (the goodies.xfce.org ones) will refuse to run on large files. For example the xmgrace thumbnailer (.agr files) won't run on files > 50MB, because it would actually have to load all of that into memory. But as I said before you cannot apply the same logic to video files (they aren't loaded into memory). Having thumbnailers try and run on large files just to fail is bad... for the 3 seconds when it's loading the performance of the user's computer will be affected. Erlend ___ Thunar-dev mailing list Thunar-dev@xfce.org http://foo-projects.org/mailman/listinfo/thunar-dev
Re: [Thunar-dev] Problem with thumbnails
On Feb 17, 2008 9:54 AM, Cory Christison <[EMAIL PROTECTED]> wrote: > > I agree with Erik.. > > Either that or if someone knows of or can write a really high-performance > thumbnailer for large images... but I dunno about that one. ;-) > >- Cory Christison Hehe, high-performance and large images? It is possible to load and store thumbnails inside the EXIF data AFAIK. I imagine large JPEGs will sometimes have that. The thumbnailer could check for that and fail otherwise. - Stephan ___ Thunar-dev mailing list Thunar-dev@xfce.org http://foo-projects.org/mailman/listinfo/thunar-dev
[Thunar-dev] ThunarVFS, volumes and pathes
Hello ! I'm currently trying to develop a little plugin for cairo-dock, in order to have a better integration inside Xfce. It consists in implementing some wrapper methods to do simple things with the VFS, like listing the volumes, accessing the trash, (un)mounting, etc... I've finished the first draft, and it begins to work. But I'm facing some problems with some functions of ThunarVfs... So perhaps you have some ideas about it. 1) I'm trying to use thunar_vfs_volume_manager_get_volume_by_info in order to know if a given URI is mounted or not. For example, I've got "file:///home/chris/Documents", which is abviously mounted because it is on "/home". But it doesn't find the volume! I just get a NULL pointer Why ? 2) I would like to get the unix path of the trash. I used thunar_vfs_path_dup_string with a ThunarVfsPath associated with "trash:/", but it returns "/"... How could I retrieve "/home/chris/.local/share/Trash" ? If you could help me, I'd be very grateful ! Christophe ___ Thunar-dev mailing list Thunar-dev@xfce.org http://foo-projects.org/mailman/listinfo/thunar-dev
Re: [Thunar-dev] Problem with thumbnails
I agree with Erik.. Either that or if someone knows of or can write a really high-performance thumbnailer for large images... but I dunno about that one. ;-) - Cory Christison Erik Harrison wrote: On Feb 15, 2008 4:24 PM, Erlend Davidson <[EMAIL PROTECTED]> wrote: Radomir Dopieralski wrote: Fri, Feb 15, 2008 at 06:16:09PM +0100: Hi Sorry if this has already been discussed, I'm knew to this list and just tried searching with google. When I select a big image file in thunar (like a 100-300MB tiff) the computer hangs. Looking at top output I see thunar-vfs-pixb... using more than available memory (let say 100MB). How can I fix this? Is it possible to set a size limit or to blacklist those files? I thought about inserting an if just after the call to fstat in exo_gdk_pixbuf_new_from_file_at_max_size in file exo-gtk-pixbuf-extensions.c. Maybe a better solution is to add a parameter specifying the max file size to the function. For now I put big files in a separate directory and open them using the command line. According to the thumbnail storage standard on http://freedesktop.org, you can prevent generation of thumbnails for some files by making matching files in the "failed" directory. That is true. It's not a real solution though - this is a bug. The trouble with having a global size limit in Thunar is that some files are meant to be big - like video files (where just one frame will be extracted for the thumbnail). The limits really have to be decided on a case-by-case basis for each mimetype. Or, the thumbnailer should gracefully fail when overwhelmed, and let Thunar use the generic icon for that mime type. Erlend ___ Thunar-dev mailing list Thunar-dev@xfce.org http://foo-projects.org/mailman/listinfo/thunar-dev ___ Thunar-dev mailing list Thunar-dev@xfce.org http://foo-projects.org/mailman/listinfo/thunar-dev