summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2011-05-21 18:50:33 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2011-05-21 18:53:03 +0100
commit449be00e33b025b29d5c05dd7ff359c2eeb7e660 (patch)
tree05620b1dac5300c279414f3286c45098e0a3e273
parent655af15695e6d603fa52cc2c1aa029bedcf0bfdb (diff)
downloaddeluge-449be00e33b025b29d5c05dd7ff359c2eeb7e660.zip
deluge-449be00e33b025b29d5c05dd7ff359c2eeb7e660.tar.gz
deluge-449be00e33b025b29d5c05dd7ff359c2eeb7e660.tar.bz2
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.
-rw-r--r--deluge/ui/gtkui/filtertreeview.py7
-rw-r--r--deluge/ui/gtkui/torrentview.py15
2 files changed, 17 insertions, 5 deletions
diff --git a/deluge/ui/gtkui/filtertreeview.py b/deluge/ui/gtkui/filtertreeview.py
index 350249e..09f136d 100644
--- a/deluge/ui/gtkui/filtertreeview.py
+++ b/deluge/ui/gtkui/filtertreeview.py
@@ -39,6 +39,7 @@ import gtk
import gtk.glade
import pkg_resources
import glib
+import warnings
import deluge.component as component
import deluge.common
@@ -256,7 +257,11 @@ class FilterTreeView(component.Component):
value = model.get_value(row, 1)
label = model.get_value(row, 2)
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:
self.renderpix.set_property("visible", True)
diff --git a/deluge/ui/gtkui/torrentview.py b/deluge/ui/gtkui/torrentview.py
index b6a87bc..7428434 100644
--- a/deluge/ui/gtkui/torrentview.py
+++ b/deluge/ui/gtkui/torrentview.py
@@ -41,6 +41,7 @@ pygtk.require('2.0')
import gtk, gtk.glade
import gettext
import gobject
+import warnings
from urlparse import urlparse
import deluge.common
@@ -81,8 +82,11 @@ def cell_data_statusicon(column, cell, model, row, data):
"""Display text with an icon"""
try:
icon = ICON_STATE[model.get_value(row, data)]
- if cell.get_property("pixbuf") != icon:
- cell.set_property("pixbuf", icon)
+ #Supress Warning: g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed
+ with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ if cell.get_property("pixbuf") != icon:
+ cell.set_property("pixbuf", icon)
except KeyError:
pass
@@ -101,8 +105,11 @@ def cell_data_trackericon(column, cell, model, row, data):
else:
icon = create_blank_icon()
- if cell.get_property("pixbuf") != icon:
- cell.set_property("pixbuf", icon)
+ #Supress Warning: g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed
+ with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ if cell.get_property("pixbuf") != icon:
+ cell.set_property("pixbuf", icon)
host = model[row][data]
if host: