Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorManuel QuiƱones <manuq@laptop.org>2012-09-04 08:56:47 (GMT)
committer Simon Schampijer <simon@laptop.org>2012-09-07 09:14:25 (GMT)
commitec4929dac9da725091f8395ec4bada8df90768d3 (patch)
tree51671416b50d9ebc585bf8f1e9295ba29cd86f9b /src
parente4ef8e80334f358a385e5a64ca0ed25858680fab (diff)
Bundleregistry: adopt to dynamic bindings for Gio GFile
There is a constructor to construct a GFile with a given path [1] instead of passing the patch to the constructor as in the static bindings. For monitoring the directory [3] we pass no GFileMonitorFlags [4] and mark it non cancellable. A test program can be found at [5]. [1] http://developer.gnome.org/gio/unstable/GFile.html#g-file-new-for-path [2] http://www.pygtk.org/docs/pygobject/class-giofile.html#constructor-giofile [3] http://developer.gnome.org/gio/unstable/GFile.html#g-file-monitor-directory [4] http://developer.gnome.org/gio/unstable/GFile.html#GFileMonitorFlags-enum [5] http://dev.laptop.org/~erikos/shell_port/tests/test_gio_watch.py Signed-off-by: Manuel QuiƱones <manuq@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
Diffstat (limited to 'src')
-rw-r--r--src/jarabe/model/bundleregistry.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jarabe/model/bundleregistry.py b/src/jarabe/model/bundleregistry.py
index cec831f..4fd03a1 100644
--- a/src/jarabe/model/bundleregistry.py
+++ b/src/jarabe/model/bundleregistry.py
@@ -63,8 +63,9 @@ class BundleRegistry(GObject.GObject):
user_path = env.get_user_activities_path()
for activity_dir in [user_path, config.activities_path]:
self._scan_directory(activity_dir)
- directory = Gio.File(activity_dir)
- monitor = directory.monitor_directory()
+ directory = Gio.File.new_for_path(activity_dir)
+ monitor = directory.monitor_directory( \
+ flags=Gio.FileMonitorFlags.NONE, cancellable=None)
monitor.connect('changed', self.__file_monitor_changed_cb)
self._gio_monitors.append(monitor)