Python gtk 模块,SORT_ASCENDING 实例源码

我们从Python开源项目中,提取了以下3个代码示例,用于说明如何使用gtk.SORT_ASCENDING

项目:zim-icontags-plugin    作者:Pl-M    | 项目源码 | 文件源码
def refill_model(self):
        '''Update model.'''
        self.model.clear()

        for tag in [a.name for a in self.index.list_all_tags()]:
            if tag in self.icons_for_tags:
                icon_name = self.icons_for_tags[tag]
                rendered_icon = render_icon(ICONS[icon_name])
            else:
                icon_name, rendered_icon = None, None

            self.model.append([tag, rendered_icon, icon_name,
                               self.index.n_list_tagged_pages(tag)])

        # Sort tags by number of pages and then by names.
        self.model.set_sort_column_id(self.TAG_COL, order = gtk.SORT_ASCENDING)
        self.model.set_sort_column_id(self.N_PAGES_COL, order = gtk.SORT_DESCENDING)
项目:zim-icontags-plugin    作者:Pl-M    | 项目源码 | 文件源码
def refill_model(self):
        '''Update model.'''
        self.model.clear()

        tagview = TagsView.new_from_index(self.index)
        for tag in [a.name for a in tagview.list_all_tags()]:
            if tag in self.icons_for_tags:
                icon_name = self.icons_for_tags[tag]
                rendered_icon = render_icon(ICONS[icon_name])
            else:
                icon_name, rendered_icon = None, None

            self.model.append([tag, rendered_icon, icon_name,
                               tagview.n_list_pages(tag)])

        # Sort tags by number of pages and then by names.
        self.model.set_sort_column_id(self.TAG_COL, order = gtk.SORT_ASCENDING)
        self.model.set_sort_column_id(self.N_PAGES_COL, order = gtk.SORT_DESCENDING)
项目:File-Explorer    作者:aj95    | 项目源码 | 文件源码
def create_store(self):
        store = gtk.ListStore(str, gtk.gdk.Pixbuf, bool)
        store.set_sort_column_id(COL_PATH, gtk.SORT_ASCENDING)
        return store