mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 08:28:39 +00:00
Supress gobject warning in filtertreeview and torrentview
In console the warning "g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed" will appear. Quick investigation could find no solution with suggestions a python issue.
This commit is contained in:
parent
445f3c0123
commit
1c58dce3c1
2 changed files with 17 additions and 5 deletions
|
@ -40,6 +40,7 @@ import gtk.glade
|
||||||
import logging
|
import logging
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
import glib
|
import glib
|
||||||
|
import warnings
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
import deluge.common
|
import deluge.common
|
||||||
|
@ -259,7 +260,11 @@ class FilterTreeView(component.Component):
|
||||||
value = model.get_value(row, 1)
|
value = model.get_value(row, 1)
|
||||||
label = model.get_value(row, 2)
|
label = model.get_value(row, 2)
|
||||||
count = model.get_value(row, 3)
|
count = model.get_value(row, 3)
|
||||||
pix = model.get_value(row, 4)
|
|
||||||
|
#Supress Warning: g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed
|
||||||
|
with warnings.catch_warnings():
|
||||||
|
warnings.simplefilter("ignore")
|
||||||
|
pix = model.get_value(row, 4)
|
||||||
|
|
||||||
if pix:
|
if pix:
|
||||||
self.renderpix.set_property("visible", True)
|
self.renderpix.set_property("visible", True)
|
||||||
|
|
|
@ -43,6 +43,7 @@ import gtk.glade
|
||||||
import gettext
|
import gettext
|
||||||
import gobject
|
import gobject
|
||||||
import logging
|
import logging
|
||||||
|
import warnings
|
||||||
from urlparse import urlparse
|
from urlparse import urlparse
|
||||||
|
|
||||||
import deluge.common
|
import deluge.common
|
||||||
|
@ -84,8 +85,11 @@ def cell_data_statusicon(column, cell, model, row, data):
|
||||||
"""Display text with an icon"""
|
"""Display text with an icon"""
|
||||||
try:
|
try:
|
||||||
icon = ICON_STATE[model.get_value(row, data)]
|
icon = ICON_STATE[model.get_value(row, data)]
|
||||||
if cell.get_property("pixbuf") != icon:
|
#Supress Warning: g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed
|
||||||
cell.set_property("pixbuf", icon)
|
with warnings.catch_warnings():
|
||||||
|
warnings.simplefilter("ignore")
|
||||||
|
if cell.get_property("pixbuf") != icon:
|
||||||
|
cell.set_property("pixbuf", icon)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -104,8 +108,11 @@ def cell_data_trackericon(column, cell, model, row, data):
|
||||||
else:
|
else:
|
||||||
icon = create_blank_icon()
|
icon = create_blank_icon()
|
||||||
|
|
||||||
if cell.get_property("pixbuf") != icon:
|
#Supress Warning: g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed
|
||||||
cell.set_property("pixbuf", icon)
|
with warnings.catch_warnings():
|
||||||
|
warnings.simplefilter("ignore")
|
||||||
|
if cell.get_property("pixbuf") != icon:
|
||||||
|
cell.set_property("pixbuf", icon)
|
||||||
|
|
||||||
host = model[row][data]
|
host = model[row][data]
|
||||||
if host:
|
if host:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue