pantea.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:pantea 作者: nim4 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号