Re: Gnome::Vfs::VolumeMonitor - how to use?



On Thu, 2005-04-14 at 19:28 -0500, Sudrien wrote:
> I want to make a menu with all mounted partitions on it (with gtkmm &
> gnome-vfsmm). After a suggestion to look at Gnome::Vfs::Drive, I got to
> this point:
> 
> 
> Glib::RefPtr<Gnome::Vfs::VolumeMonitor> nx =
>   Gnome::Vfs::VolumeMonitor::create();
> Glib::ListHandle< Glib::RefPtr<Gnome::Vfs::Volume> > ny =
>   nx->get_mounted_volumes();
> 
> Which does not seem to work. Or, it causes a segfault with no real
> backtrace to it.

There might be a reference-counting problem in gnome-vfsmm. If you
create an example [1] and add it to bugzilla then I'll fix it for you.
You might also try the C API, using gobj() and Glib::wrap(), though you
might need to be aware of the reference counts.

[1] Then we can add the example to gnome-vfsmm. Please modify one of the
existing examples, so that it looks similar. 

> If I can get to Gnome::Vfs::Volume::get_device_path(), I can handle it -
> but I have not figured out how to get a list of drives yet. How do you
> start this thing?

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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