merge
This commit is contained in:
commit
b96f70d39c
|
@ -30,7 +30,7 @@ class CellRendererImage(Gtk.CellRendererPixbuf):
|
||||||
|
|
||||||
__gproperties__ = {
|
__gproperties__ = {
|
||||||
'image': (GObject.TYPE_OBJECT, 'Image',
|
'image': (GObject.TYPE_OBJECT, 'Image',
|
||||||
'Image', GObject.PARAM_READWRITE),
|
'Image', GObject.ParamFlags.READWRITE),
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, col_index, tv_index):
|
def __init__(self, col_index, tv_index):
|
||||||
|
|
|
@ -32,7 +32,7 @@ import gi
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
from gi.repository import Gdk
|
from gi.repository import Gdk
|
||||||
from gi.repository import GdkPixbuf
|
from gi.repository import GdkPixbuf
|
||||||
from gi.repository import GObject
|
from gi.repository import GLib
|
||||||
from gi.repository import Pango
|
from gi.repository import Pango
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
@ -51,7 +51,7 @@ gtk_icon_theme.append_search_path(gajim.ICONS_DIR)
|
||||||
def get_icon_pixmap(icon_name, size=16, quiet=False):
|
def get_icon_pixmap(icon_name, size=16, quiet=False):
|
||||||
try:
|
try:
|
||||||
return gtk_icon_theme.load_icon(icon_name, size, 0)
|
return gtk_icon_theme.load_icon(icon_name, size, 0)
|
||||||
except GObject.GError as e:
|
except GLib.GError as e:
|
||||||
if not quiet:
|
if not quiet:
|
||||||
log.error('Unable to load icon %s: %s' % (icon_name, str(e)))
|
log.error('Unable to load icon %s: %s' % (icon_name, str(e)))
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ def get_icon_path(icon_name, size=16):
|
||||||
return ""
|
return ""
|
||||||
else:
|
else:
|
||||||
return icon_info.get_filename()
|
return icon_info.get_filename()
|
||||||
except GObject.GError as e:
|
except GLib.GError as e:
|
||||||
log.error("Unable to find icon %s: %s" % (icon_name, str(e)))
|
log.error("Unable to find icon %s: %s" % (icon_name, str(e)))
|
||||||
|
|
||||||
import vcard
|
import vcard
|
||||||
|
@ -419,7 +419,7 @@ def get_pixbuf_from_data(file_data, want_type = False):
|
||||||
pixbufloader.write(file_data)
|
pixbufloader.write(file_data)
|
||||||
pixbufloader.close()
|
pixbufloader.close()
|
||||||
pixbuf = pixbufloader.get_pixbuf()
|
pixbuf = pixbufloader.get_pixbuf()
|
||||||
except GObject.GError: # 'unknown image format'
|
except GLib.GError: # 'unknown image format'
|
||||||
pixbufloader.close()
|
pixbufloader.close()
|
||||||
pixbuf = None
|
pixbuf = None
|
||||||
if want_type:
|
if want_type:
|
||||||
|
|
Loading…
Reference in New Issue