def update_view(self):
global con
iv = self.builder.get_object("iconview1")
model = gtk.ListStore(str, gtk.gdk.Pixbuf)
with con:
cur = con.cursor()
cur.execute("select * from dump")
rows = cur.fetchall()
for (cookie, angent, photo, info, url) in rows:
try:
pixbuf = gtk.gdk.pixbuf_new_from_file(photo)
model.append([info, pixbuf])
except:
pass
iv.set_model(model)
iv.set_text_column(0)
iv.set_pixbuf_column(1)
iv.set_orientation(gtk.ORIENTATION_VERTICAL)
iv.set_selection_mode(gtk.SELECTION_SINGLE)
iv.set_columns(1)
iv.set_item_width(-1)
iv.set_size_request(72, -1)
self.builder.get_object("window1").show_all()
return True
评论列表
文章目录