diff options
author | Simon Schampijer <simon@laptop.org> | 2012-09-03 08:17:48 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@laptop.org> | 2012-09-07 09:14:24 (GMT) |
commit | 3007f43996b5ef9a9fb4ccf37906f17612438c68 (patch) | |
tree | c91708f35f18baef6ef60779165bb14a85f0c09e /src/jarabe/model/bundleregistry.py | |
parent | 98f5b640ad4c3f1d67622a031629af42f0b96997 (diff) |
Run pygi-convert.sh for automatic conversion from GTK+ 2 to GTK+ 3
Run pygi-convert.sh for automatic conversion from GTK+ 2 to GTK+ 3 and
pygobject+gobject-introspection. This is only on a best-effort basis;
the code will be in a broken state after this patch and need to be
fixed manually.
The purpose of committing the intermediate, non-working output is to make it
reproducible. It's impractical to manually review the changes.
The exact version used was 2d8f48f4ff56bb75985136452b50b75895258608 from the
main pygobject repository [1].
[1] git://git.gnome.org/pygobject
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel QuiƱones <manuq@laptop.org>
Diffstat (limited to 'src/jarabe/model/bundleregistry.py')
-rw-r--r-- | src/jarabe/model/bundleregistry.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/jarabe/model/bundleregistry.py b/src/jarabe/model/bundleregistry.py index 26e719f..d790410 100644 --- a/src/jarabe/model/bundleregistry.py +++ b/src/jarabe/model/bundleregistry.py @@ -18,9 +18,9 @@ import os import logging -import gconf -import gobject -import gio +from gi.repository import GConf +from gi.repository import GObject +from gi.repository import Gio import simplejson from sugar.bundle.activitybundle import ActivityBundle @@ -38,21 +38,21 @@ from jarabe.model import mimeregistry _instance = None -class BundleRegistry(gobject.GObject): +class BundleRegistry(GObject.GObject): """Tracks the available activity bundles""" __gsignals__ = { - 'bundle-added': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, - ([gobject.TYPE_PYOBJECT])), - 'bundle-removed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, - ([gobject.TYPE_PYOBJECT])), - 'bundle-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, - ([gobject.TYPE_PYOBJECT])), + 'bundle-added': (GObject.SignalFlags.RUN_FIRST, None, + ([GObject.TYPE_PYOBJECT])), + 'bundle-removed': (GObject.SignalFlags.RUN_FIRST, None, + ([GObject.TYPE_PYOBJECT])), + 'bundle-changed': (GObject.SignalFlags.RUN_FIRST, None, + ([GObject.TYPE_PYOBJECT])), } def __init__(self): logging.debug('STARTUP: Loading the bundle registry') - gobject.GObject.__init__(self) + GObject.GObject.__init__(self) self._mime_defaults = self._load_mime_defaults() @@ -63,7 +63,7 @@ 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) + directory = Gio.File(activity_dir) monitor = directory.monitor_directory() monitor.connect('changed', self.__file_monitor_changed_cb) self._gio_monitors.append(monitor) @@ -71,10 +71,10 @@ class BundleRegistry(gobject.GObject): self._last_defaults_mtime = -1 self._favorite_bundles = {} - client = gconf.client_get_default() + client = GConf.Client.get_default() self._protected_activities = client.get_list( '/desktop/sugar/protected_activities', - gconf.VALUE_STRING) + GConf.ValueType.STRING) if self._protected_activities is None: self._protected_activities = [] @@ -90,9 +90,9 @@ class BundleRegistry(gobject.GObject): event_type): if not one_file.get_path().endswith('.activity'): return - if event_type == gio.FILE_MONITOR_EVENT_CREATED: + if event_type == Gio.FileMonitorEvent.CREATED: self.add_bundle(one_file.get_path(), install_mime_type=True) - elif event_type == gio.FILE_MONITOR_EVENT_DELETED: + elif event_type == Gio.FileMonitorEvent.DELETED: self.remove_bundle(one_file.get_path()) def _load_mime_defaults(self): |