GNOME Bugzilla – Bug 514574
Alacarte needs porting to gio
Last modified: 2009-02-04 12:09:12 UTC
Alacarte is listed among the modules that need migrating to gio at http://live.gnome.org/GioPort . The required changes seem trivial; I'll try my hand at a patch if the move is to happen in 2.22 and nobody else is working on it.
There is currently no python binding for gio but when one does get created I'll be sure to do this.
http://svn.gnome.org/viewvc/pygobject/trunk/gio/ <jdahlin> It won't be complete for a while, but I encourage you to start using it right now <jdahlin> not sure if it's realistic to introduce gvfs/gio compatibility layer in applications <jdahlin> I need more bug reports, to know what's missing so please start porting *now* and file reports!
Murat, do you have time and interest to work on porting this? $:andre\> grep -R gnomevfs . ./Alacarte/MainWindow.py: import gtk, gtk.glade, gmenu, gobject, gnomevfs, gnome.ui ./Alacarte/MainWindow.py: file_path = gnomevfs.unescape_string(selection.data, '').strip() ./Alacarte/MainWindow.py: file_info = gnomevfs.get_file_info( ./Alacarte/MainWindow.py: file_path, gnomevfs.FILE_INFO_GET_MIME_TYPE| ./Alacarte/MainWindow.py: gnomevfs.FILE_INFO_FORCE_SLOW_MIME_TYPE| ./Alacarte/MainWindow.py: gnomevfs.FILE_INFO_FOLLOW_LINKS|gnomevfs.FILE_INFO_DEFAULT ./Alacarte/MainWindow.py: handle = gnomevfs.open(file_path)
Andre, sorry for not reporting earlier; I unfortunately can't safely undertake this at present due to life taking over. You or others can go ahead with it.
Murat: Sure, no problem. Anybody: We now have GIO bindings in PyGObject SVN, see bug 537551.
And we now have a pygobject 2.15 release including these bindings. no reason to not work on this. :-)
Created attachment 114876 [details] [review] simple patch
Comment on attachment 114876 [details] [review] simple patch >+ file_info = myfile.query_info("*") I am not an Alacarte maintainer, but this looks a bit overkill; you don't need to query for all the available info on the file just to get the content type. You can use query_info("standard::content_type") I guess, if the syntax is the same as in C. Anyway, it would be good to have this in before 2.24!
amaranth: ping - can we please get this in soon?
amaranth: ping - you're dead?
- file_path = gnomevfs.unescape_string(selection.data, '').strip() + file_path = selection.data.decode('string_escape').strip() Sounds wrong to me. It doesn't do the same thing, AFAIK.
Isn't there a python-binded function for g_uri_unescape_string for that?
(In reply to comment #13) > Isn't there a python-binded function for g_uri_unescape_string for that? Possibly. I didn't check -- I only gave a quick look at the patch ;-)
Cosimo: Interested in updating the patch? :-)
Created attachment 119050 [details] [review] patch v2 Updated patch, fixes the comments above and clean up a bit the configure script. Vincent, Andre: do you think it's worth to push this into the (imminent :/) 2.24.0 release? I can ask r-t a freeze break for it if you think it's worth.
Cosimo: no way it can go in 2.24.0 at this point. It's not important enough.
I propose to get this in and have a non-maintainer release. Seems like this module is dead.
This has been fixed in trunk, will be there in 0.11.7, which I just released. Closing as FIXED.
Cosimo: :-*
A quick followup on this: Shouldn't the call to gnome.ui.authentication_manager_init() in MainWindow.py be removed too? At least according to http://live.gnome.org/LibgnomeMustDie this is only needed for gnome-vfs.
You're right, I fixed this in trunk. 2009-02-04 Cosimo Cecchi <cosimoc@gnome.org> * Alacarte/MainWindow.py: removed a call to gnome.ui.authentication_manager_init(), as that's not needed with GIO anymore. Thanks to Andreas Proschofsky.