Re: Gnome::Vfs::DirectoryHandle::list_load



Oops. Could you submit a cvs patch in bugzilla, please. If the current
method signature is useless then we can change it to make it work.

On Thu, 2006-11-02 at 12:15 +0100, Maik Beckmann wrote:
> Hello
> 
> I think there is something wrong with the gnome-vfsmm the static
> member-function of Gnome::Vfs::DirectoryHandle:
> 
> static void list_load(const Glib::ListHandle<Glib::ustring>& list,
>                       const Glib::ustring& text_uri, 
>                       FileInfoOptions info_options) throw(exception);
> 
> See this little example program:
> <code>
> #include <libgnomevfsmm.h>
> #include <iostream>
> #include <list>
> 
> int main(int argc, char** argv)
> {
>     Gnome::Vfs::init();
> 
>     std::list<Glib::ustring>        list;
>     Glib::ListHandle<Glib::ustring> listHandle(list);
>     Gnome::Vfs::DirectoryHandle::list_load(
>         listHandle,
>         "ftp://ftp.gnome.org";,
>         Gnome::Vfs::FILE_INFO_DEFAULT );
>     
>     std::cout << list.size() << std::endl; 
> 
>     // ------------------------------
>     GList* glist;
>     gnome_vfs_directory_list_load(
>         &glist, 
>         "ftp://ftp.gnome.org";,               
> static_cast<GnomeVFSFileInfoOptions>(Gnome::Vfs::FILE_INFO_DEFAULT) );
>    
>     std::cout << g_list_length(glist) << std::endl; // prints: 17
>     GnomeVFSFileInfo* info =
> static_cast<GnomeVFSFileInfo*>(g_list_nth_data(glist,5));
>     std::cout << info->name << std::endl;
>     
>     return 0;
> }
> </code>
> 
> <output>
> 0
> 17
> conspiracy
> </output>
> 
> The GList holds pointers GnomeVFSFileInfo structures, so Glib::ustring
> being ListHandle-type makes no sense to me.
> 
> Is this a bug or didn't I get how to use this this function?
> 
> 
> Maik
> 
> 
> 
> 
> 
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
-- 
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]