guis.py 文件源码

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

项目:script.reddit.reader 作者: gedisony 项目源码 文件源码
def onClick(self, controlID):

        if controlID == self.main_control_id:
            self.gui_listbox_SelectedPosition = self.gui_listbox.getSelectedPosition()
            item = self.gui_listbox.getSelectedItem()
            if not item: #panel listbox control allows user to pick non-existing item by mouse/touchscreen. bypass it here.
                return

            if self.include_parent_directory_entry and self.gui_listbox_SelectedPosition == 0:
                self.close()  #include_parent_directory_entry means that we've added a ".." as the first item on the list onInit

            self.process_clicked_item(item)
        else:
            clicked_control=self.getControl(controlID)
            log('clicked on controlID='+repr(controlID))
            self.process_clicked_item(clicked_control)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号