本文整理汇总了Python中gobject.TYPE_PYOBJECT属性的典型用法代码示例。如果您正苦于以下问题:Python gobject.TYPE_PYOBJECT属性的具体用法?Python gobject.TYPE_PYOBJECT怎么用?Python gobject.TYPE_PYOBJECT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类gobject
的用法示例。
在下文中一共展示了gobject.TYPE_PYOBJECT属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: initLeftPane
# 需要导入模块: import gobject [as 别名]
# 或者: from gobject import TYPE_PYOBJECT [as 别名]
def initLeftPane(self):
global groups
self.treeModel = gtk.TreeStore(gobject.TYPE_STRING, gobject.TYPE_PYOBJECT, gtk.gdk.Pixbuf)
self.treeServers.set_model(self.treeModel)
self.treeServers.set_level_indentation(5)
#Force the alternating row colors, by default it's off with one column
self.treeServers.set_property('rules-hint', True)
gtk.rc_parse_string( """
style "custom-treestyle"{
GtkTreeView::allow-rules = 1
}
widget "*treeServers*" style "custom-treestyle"
""")
column = gtk.TreeViewColumn()
column.set_title('Servers')
self.treeServers.append_column( column )
renderer = gtk.CellRendererPixbuf()
column.pack_start(renderer, expand=False)
column.add_attribute(renderer, 'pixbuf', 2)
renderer = gtk.CellRendererText()
column.pack_start(renderer, expand=True)
column.add_attribute(renderer, 'text', 0)
self.treeServers.set_has_tooltip(True)
self.treeServers.connect('query-tooltip', self.on_treeServers_tooltip)
self.loadConfig()
self.updateTree()