Re: [Thunar-dev] ThunarVFS, volumes and pathes
Christophe Chapuis wrote: > On Wed, Feb 20, 2008 at 9:13 AM, Benedikt Meurer > <[EMAIL PROTECTED]> wrote: >> Christophe Chapuis wrote: >> > Well, looks like I've partially found why my problem occurs... >> > It looks like when I'm listing all the known volumes and ask for they >> > mount path, it returns me pathes like "file:///media/sda1", >> > "file:///media/sda2", ..., the volume being mounted or not. Therefore >> > I understand that as a consequence >> > thunar_vfs_volume_manager_get_volume_by_info doesn't work well. >> >> thunar_vfs_volume_manager_real_get_volume_by_info() iterates only >> mounted volumes, see thunar-vfs-volume-manager.c:259. >> > > Oh, I didn't see that. But this doesn't explain why it doesn't find a > volume for a local file... which is obviously on a mounted device. So > I guess I've got a problem with HAL which returns an invalid path, or > no path at all... > >> > I don't have any idea where it did take that sort of path, it's not at >> > all like that in my fstab, for example. >> >> The paths above are generated by Thunar for volumes where HAL does not >> report a path. They will change once HAL reports a valid path (i.e. once >> the volume is mounted). >> > > Well, all of the volumes returned by thunar_vfs where of the form > "/media/sdaX". For the unmounted one, I understand that it generates > its own path. But for my root partition, for example, I really don't > understand: I would expect a path like "file:///". Is it possible that > my HAL returns an invalid path ? > > Perhaps should I have a different approach ? Hm, check the HAL properties for the volumes. Benedikt ___ Thunar-dev mailing list Thunar-dev@xfce.org http://foo-projects.org/mailman/listinfo/thunar-dev
Re: [Thunar-dev] ThunarVFS, volumes and pathes
On Wed, Feb 20, 2008 at 9:13 AM, Benedikt Meurer <[EMAIL PROTECTED]> wrote: > Christophe Chapuis wrote: > > Well, looks like I've partially found why my problem occurs... > > It looks like when I'm listing all the known volumes and ask for they > > mount path, it returns me pathes like "file:///media/sda1", > > "file:///media/sda2", ..., the volume being mounted or not. Therefore > > I understand that as a consequence > > thunar_vfs_volume_manager_get_volume_by_info doesn't work well. > > thunar_vfs_volume_manager_real_get_volume_by_info() iterates only > mounted volumes, see thunar-vfs-volume-manager.c:259. > Oh, I didn't see that. But this doesn't explain why it doesn't find a volume for a local file... which is obviously on a mounted device. So I guess I've got a problem with HAL which returns an invalid path, or no path at all... > > > I don't have any idea where it did take that sort of path, it's not at > > all like that in my fstab, for example. > > The paths above are generated by Thunar for volumes where HAL does not > report a path. They will change once HAL reports a valid path (i.e. once > the volume is mounted). > Well, all of the volumes returned by thunar_vfs where of the form "/media/sdaX". For the unmounted one, I understand that it generates its own path. But for my root partition, for example, I really don't understand: I would expect a path like "file:///". Is it possible that my HAL returns an invalid path ? Perhaps should I have a different approach ? > > > > Christophe > Thank you Benedikt and Tino for your support ! > 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: > Well, looks like I've partially found why my problem occurs... > It looks like when I'm listing all the known volumes and ask for they > mount path, it returns me pathes like "file:///media/sda1", > "file:///media/sda2", ..., the volume being mounted or not. Therefore > I understand that as a consequence > thunar_vfs_volume_manager_get_volume_by_info doesn't work well. thunar_vfs_volume_manager_real_get_volume_by_info() iterates only mounted volumes, see thunar-vfs-volume-manager.c:259. > I don't have any idea where it did take that sort of path, it's not at > all like that in my fstab, for example. The paths above are generated by Thunar for volumes where HAL does not report a path. They will change once HAL reports a valid path (i.e. once the volume is mounted). > Christophe Benedikt ___ Thunar-dev mailing list Thunar-dev@xfce.org http://foo-projects.org/mailman/listinfo/thunar-dev
Re: [Thunar-dev] ThunarVFS, volumes and pathes
On Wed, Feb 20, 2008 at 08:09:03 +0100, Christophe Chapuis wrote: > Well, looks like I've partially found why my problem occurs... > It looks like when I'm listing all the known volumes and ask for they > mount path, it returns me pathes like "file:///media/sda1", > "file:///media/sda2", ..., the volume being mounted or not. Therefore > I understand that as a consequence > thunar_vfs_volume_manager_get_volume_by_info doesn't work well. > > I don't have any idea where it did take that sort of path, it's not at > all like that in my fstab, for example. thunar can also do automatic mounts (thunar-volman), without fstab entries. The mount path is /media/, so it seems to fill in the path that is used for automatic mounts. Regards, Tino ___ Thunar-dev mailing list Thunar-dev@xfce.org http://foo-projects.org/mailman/listinfo/thunar-dev
Re: [Thunar-dev] ThunarVFS, volumes and pathes
Well, looks like I've partially found why my problem occurs... It looks like when I'm listing all the known volumes and ask for they mount path, it returns me pathes like "file:///media/sda1", "file:///media/sda2", ..., the volume being mounted or not. Therefore I understand that as a consequence thunar_vfs_volume_manager_get_volume_by_info doesn't work well. I don't have any idea where it did take that sort of path, it's not at all like that in my fstab, for example. Christophe On Sun, Feb 17, 2008 at 7:31 PM, Christophe Chapuis <[EMAIL PROTECTED]> wrote: > 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
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
[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