GNOME Bugzilla – Bug 527541
port to GIO
Last modified: 2009-02-05 19:39:14 UTC
http://live.gnome.org/GioPort $:andre\> grep -R gnome_vfs . ./lib/dirmonitor.py: self.watches = {} # maps filename => gnome_vfs_monitor handle $:andre\> grep -R gnome-vfs . ./lib/config.py.in: ".gnome/gnome-vfs/.trash_entry_cache",
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!
(In reply to comment #0) > http://live.gnome.org/GioPort > > $:andre\> grep -R gnome_vfs . > ./lib/dirmonitor.py: self.watches = {} # maps filename => > gnome_vfs_monitor handle > > $:andre\> grep -R gnome-vfs . > ./lib/config.py.in: ".gnome/gnome-vfs/.trash_entry_cache", > In python it's gnomevfs, not gnome_vfs.
$:andre\> cd sabayon/ $:andre\> grep -R gnomevfs . ./lib/dirmonitor.py:import gnomevfs ./lib/dirmonitor.py:CHANGED = gnomevfs.MONITOR_EVENT_CHANGED ./lib/dirmonitor.py:DELETED = gnomevfs.MONITOR_EVENT_DELETED ./lib/dirmonitor.py:CREATED = gnomevfs.MONITOR_EVENT_CREATED ./lib/dirmonitor.py: # Processing of a gnomevfs callback ./lib/dirmonitor.py: def __handle_gnomevfs_event (self, dir_uri, file_uri, event): ./lib/dirmonitor.py: dprint ("Got gnomevfs event '%s' on '%s'", event_to_string (event), path) ./lib/dirmonitor.py: gnomevfs.monitor_cancel (self.watches [path]) ./lib/dirmonitor.py: self.watches [dir] = gnomevfs.monitor_add (dir, gnomevfs.MONITOR_DIRECTORY, self.__handle_gnomevfs_event) ./lib/dirmonitor.py: gnomevfs.monitor_cancel (self.watches [path])
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 118201 [details] [review] GIO port patch This needs to be tested. Send me feedback and I'll work on it.
The patch looks good to me, though I'm not a Sabayon maintainer. Federico, can we get this in for 2.26?
Federico: ping - Patch attached
Looks good to me too.
<federic1> andre: please commit it, and remove the call to urllib.unquote() <federic1> andre: it's not needed as file_uri.get_path() should already do the unquoting foo <federic1> assuming file_uri is a GFile :)
Committed, thanks a lot! http://svn.gnome.org/viewvc/sabayon?view=revision&revision=1046