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/journal/listmodel.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/journal/listmodel.py')
-rw-r--r-- | src/jarabe/journal/listmodel.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/jarabe/journal/listmodel.py b/src/jarabe/journal/listmodel.py index 417ff61..5ab3671 100644 --- a/src/jarabe/journal/listmodel.py +++ b/src/jarabe/journal/listmodel.py @@ -17,8 +17,8 @@ import logging import simplejson -import gobject -import gtk +from gi.repository import GObject +from gi.repository import Gtk from gettext import gettext as _ from sugar.graphics.xocolor import XoColor @@ -34,12 +34,12 @@ DS_DBUS_INTERFACE = 'org.laptop.sugar.DataStore' DS_DBUS_PATH = '/org/laptop/sugar/DataStore' -class ListModel(gtk.GenericTreeModel, gtk.TreeDragSource): +class ListModel(Gtk.GenericTreeModel, Gtk.TreeDragSource): __gtype_name__ = 'JournalListModel' __gsignals__ = { - 'ready': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])), - 'progress': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])), + 'ready': (GObject.SignalFlags.RUN_FIRST, None, ([])), + 'progress': (GObject.SignalFlags.RUN_FIRST, None, ([])), } COLUMN_UID = 0 @@ -73,7 +73,7 @@ class ListModel(gtk.GenericTreeModel, gtk.TreeDragSource): _PAGE_SIZE = 10 def __init__(self, query): - gobject.GObject.__init__(self) + GObject.GObject.__init__(self) self._last_requested_index = None self._cached_row = None @@ -140,7 +140,7 @@ class ListModel(gtk.GenericTreeModel, gtk.TreeDragSource): xo_color = misc.get_icon_color(metadata) self._cached_row.append(xo_color) - title = gobject.markup_escape_text(metadata.get('title', + title = GObject.markup_escape_text(metadata.get('title', _('Untitled'))) self._cached_row.append('<b>%s</b>' % (title, )) @@ -217,7 +217,7 @@ class ListModel(gtk.GenericTreeModel, gtk.TreeDragSource): return None def on_get_flags(self): - return gtk.TREE_MODEL_ITERS_PERSIST | gtk.TREE_MODEL_LIST_ONLY + return Gtk.TREE_MODEL_ITERS_PERSIST | Gtk.TREE_MODEL_LIST_ONLY def on_iter_children(self, iterator): return None |