Python xbmcgui 模块,WindowXMLDialog() 实例源码

我们从Python开源项目中,提取了以下14个代码示例,用于说明如何使用xbmcgui.WindowXMLDialog()

项目:catchup4kodi    作者:catchup4kodi    | 项目源码 | 文件源码
def iiNT3LiiFLAG():

    class flagDialog(xbmcgui.WindowXMLDialog):

        def onInit(self):
            pass

        def onAction(self, action):
            KEY_BUTTON_BACK = 275
            KEY_KEYBOARD_ESC = 61467
            ACTION_PREVIOUS_MENU = 10
            ACTION_SELECT_ITEM = 7
            ACTION_BACKSPACE = 92
            buttonCode          =  action.getButtonCode()
            actionID            =  action.getId()
            if action           == ACTION_PREVIOUS_MENU:    self.close()
            elif action         == ACTION_BACKSPACE:        self.close()

    redFlag = flagDialog('down.xml', addonPath,'default')
    redFlag.doModal()
    del redFlag
项目:script.skin.helper.skinbackup    作者:marcelveldt    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        xbmcgui.WindowXMLDialog.__init__(self)
        self.listing = kwargs.get("listing")
        self.windowtitle = kwargs.get("windowtitle")
        self.extrabutton = kwargs.get("extrabutton", "")
        self.autofocus = kwargs.get("autofocus", "")
        self.result = None
项目:plugin.audio.spotify    作者:marcelveldt    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        self.metadatautils = MetadataUtils()
        xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
项目:plugin.video.stream-cinema    作者:bbaronSVK    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        xbmcgui.WindowXMLDialog.__init__(self)
        self.listing = kwargs.get("listing")
        self.windowtitle = kwargs.get("windowtitle")
        self.multiselect = kwargs.get("multiselect")
        self.richlayout = kwargs.get("richlayout", False)
        self.getmorebutton = kwargs.get("getmorebutton", "")
        self.autofocus_id = kwargs.get("autofocusid", 0)
        self.autofocus_label = kwargs.get("autofocuslabel", "")
        self.totalitems = 0
        self.result = None
项目:plugin.video.stream-cinema    作者:bbaronSVK    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        if OS_MACHINE[0:5] == 'armv7':
            xbmcgui.WindowXMLDialog.__init__(self)
        else:
            try:
                xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
            except:
                try:
                    xbmcgui.WindowXMLDialog.__init__(self)
                except:
                    pass
项目:script.module.metadatautils    作者:marcelveldt    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        xbmcgui.WindowXMLDialog.__init__(self)
        self.listing = kwargs.get("listing")
        self.window_title = kwargs.get("window_title", "")
        self.result = -1
项目:plugin.video.streamondemand-pureita    作者:orione7    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        self.totalpage = 1
        self.nowpage = 0
        self.words = ''
        self.inputString = kwargs.get("default") or ""
        self.heading = kwargs.get("heading") or ""
        self.captcha = kwargs.get("captcha") or ""

        if self.captcha == "":
            self.captcha = DEFAULT_CAPTCHA

        xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
项目:script.reddit.reader    作者:gedisony    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
        self.listing = kwargs.get("listing")

        #log( str(args) )
        #log(sys.argv[1])
项目:script.reddit.reader    作者:gedisony    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        xbmcgui.WindowXML.__init__(self, *args, **kwargs)
        #xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)   #<--- what's the difference? WindowXMLDialog animations are more system-demanding but can have transparent background.
        self.subreddits_file = kwargs.get("subreddits_file")
        self.listing = kwargs.get("listing")
        self.main_control_id = kwargs.get("id")
        self.title_bar_text = kwargs.get("title")
        #log( str(args) )
        #log(sys.argv[1])
项目:plex-for-kodi-mod    作者:mrclemds    | 项目源码 | 文件源码
def setProperty(self, key, value):
        if self._closing:
            return

        if not self._winID:
            self._winID = xbmcgui.getCurrentWindowId()

        try:
            xbmcgui.Window(self._winID).setProperty(key, value)
            xbmcgui.WindowXMLDialog.setProperty(self, key, value)
        except RuntimeError:
            xbmc.log('kodigui.BaseDialog.setProperty: Missing window', xbmc.LOGDEBUG)
项目:plex-for-kodi-mod    作者:mrclemds    | 项目源码 | 文件源码
def show(self):
        self._closing = False
        xbmcgui.WindowXMLDialog.show(self)
项目:service.vpn.manager    作者:Zomboided    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        self.caption = kwargs.get("caption", "")
        self.text_left = kwargs.get("text_left", "")
        self.text_right = kwargs.get("text_right", "")
        xbmcgui.WindowXMLDialog.__init__(self)
项目:service.vpn.manager    作者:Zomboided    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        self.caption = kwargs.get("caption", "")
        self.text = kwargs.get("text", "")
        xbmcgui.WindowXMLDialog.__init__(self)
项目:script.reddit.reader    作者:gedisony    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        xbmcgui.WindowXML.__init__(self, *args, **kwargs)
        #xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)   #<--- what's the difference?
        self.subreddits_file = kwargs.get("subreddits_file")
        self.listing = kwargs.get("listing")
        self.main_control_id = kwargs.get("id")

        #self.gui_listbox.addItems(self.listing)

        listing_generator=generator(self.listing)

        tlc_id=0 #create id's for top-level-comments
        self.child_lists[:] = []  #a collection of child comments (non-tlc) tlc_children
        tlc_children=[]
        #for listing in self.listing:
        for listing in listing_generator:
            depth=int(listing.getProperty('comment_depth'))
            #add root comments and links on the listbox
            if not listing.getProperty('link_url'):
                if depth==0:
                    tlc_id+=1
                    listing.setProperty('tlc_id',str(tlc_id)) #assign an id to this top-level-comment
                    self.items_for_listbox.append(listing)    #this post will be on the listbox
                    #log('tlc: '+listing.getProperty('plot'))

                    #save the set of comments from previous top level comment
                    self.child_lists.append(tlc_children)

                    #begin a new list of child comments(this does not clear the old refernces)
                    tlc_children=[]
                    tlc_children.append( self.get_post_text_tuple(listing) ) #save the post_text of the top level comment
                else:
                    #collect the child comments. when depth=0 again, this list is reset.
                    child_comment=listing
                    #log('   : '+child_comment.getProperty('plot'))
                    tlc_children.append( self.get_post_text_tuple(child_comment) )
            else: #link in tlc
                if depth>0:
                    listing.setProperty('tlc_id',str(tlc_id))
                    listing.setProperty('non_tlc_link','true')

                listing.setProperty('tlc_id',str(tlc_id))
                self.items_for_listbox.append(listing)

        #don't forget to add the children of the last tlc
        self.child_lists.append(tlc_children)
        #log(pprint.pformat(self.child_lists))
        self.exit_monitor = ExitMonitor(self.close_gui)#monitors for abortRequested and calls close on the gui

        #can't dynamically create an auto-height textbox inside a grouplist
        #  so we make x of them in the xml and hope they're enough
        #  these are their id's
        self.x_controls=[x for x in range(1000, 1071)]