From 1af80acd589d0eca61810dff19b08000e8fc3cc5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
Date: Tue, 18 Dec 2012 13:04:40 -0300
Subject: [PATCH toolkit] get_mime_description, use Gio from dynamic bindings
- SL #4323 #4307
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
'import gio' was importing static gobject, and mixing static and
dynamic bindings provoked a crash.
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
---
src/sugar3/mime.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/sugar3/mime.py b/src/sugar3/mime.py
index 70b4d2b..be9b5eb 100644
a
|
b
|
import logging |
26 | 26 | import gettext |
27 | 27 | |
28 | 28 | from gi.repository import GdkPixbuf |
| 29 | from gi.repository import Gio |
29 | 30 | |
30 | 31 | from sugar3 import _sugarbaseext |
31 | 32 | |
… |
… |
def get_mime_description(mime_type): |
149 | 150 | if generic_type: |
150 | 151 | return generic_type['name'] |
151 | 152 | |
152 | | import gio |
153 | | return gio.content_type_get_description(mime_type) |
| 153 | return Gio.content_type_get_description(mime_type) |
154 | 154 | |
155 | 155 | |
156 | 156 | def get_mime_parents(mime_type): |