diff --git a/gramps/gen/utils/image.py b/gramps/gen/utils/image.py index 46e07a02a..f96d2222a 100644 --- a/gramps/gen/utils/image.py +++ b/gramps/gen/utils/image.py @@ -161,12 +161,12 @@ def image_size(source): :returns: a tuple consisting of the width and height """ from gi.repository import GdkPixbuf - from gi.repository import GObject + from gi.repository import GLib try: img = GdkPixbuf.Pixbuf.new_from_file(source) width = img.get_width() height = img.get_height() - except GObject.GError: + except GLib.GError: width = 0 height = 0 return (width, height) diff --git a/gramps/gen/utils/thumbnails.py b/gramps/gen/utils/thumbnails.py index 36c2044b1..42f7c628a 100644 --- a/gramps/gen/utils/thumbnails.py +++ b/gramps/gen/utils/thumbnails.py @@ -36,7 +36,7 @@ from hashlib import md5 # GTK/Gnome modules # #------------------------------------------------------------------------- -from gi.repository import GObject +from gi.repository import GLib from gi.repository import GdkPixbuf try: @@ -98,7 +98,7 @@ def __get_gconf_string(key): """ try: val = CLIENT.get_string(key) - except GObject.GError: + except GLib.GError: val = None return str(val) @@ -119,7 +119,7 @@ def __get_gconf_bool(key): """ try: val = CLIENT.get_bool(key) - except GObject.GError: + except GLib.GError: val = None return val @@ -318,7 +318,7 @@ def get_thumbnail_image(src_file, mtype=None, rectangle=None, size=SIZE_NORMAL): try: filename = get_thumbnail_path(src_file, mtype, rectangle, size) return GdkPixbuf.Pixbuf.new_from_file(filename) - except (GObject.GError, OSError): + except (GLib.GError, OSError): if mtype: return find_mime_type_pixbuf(mtype) else: diff --git a/gramps/gui/widgets/selectionwidget.py b/gramps/gui/widgets/selectionwidget.py index 289958524..f53dea71a 100644 --- a/gramps/gui/widgets/selectionwidget.py +++ b/gramps/gui/widgets/selectionwidget.py @@ -26,7 +26,7 @@ from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GdkPixbuf -from gi.repository import GObject +from gi.repository import GLib, GObject #------------------------------------------------------------------------- # @@ -305,7 +305,7 @@ class SelectionWidget(Gtk.ScrolledWindow): viewport_size.height) self._rescale() self.loaded = True - except (GObject.GError, OSError): + except (GLib.GError, OSError): self.show_missing() def show_missing(self):