当前位置: 首页>>代码示例>>Python>>正文


Python xbmcgui.INPUT_ALPHANUM属性代码示例

本文整理汇总了Python中xbmcgui.INPUT_ALPHANUM属性的典型用法代码示例。如果您正苦于以下问题:Python xbmcgui.INPUT_ALPHANUM属性的具体用法?Python xbmcgui.INPUT_ALPHANUM怎么用?Python xbmcgui.INPUT_ALPHANUM使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在xbmcgui的用法示例。


在下文中一共展示了xbmcgui.INPUT_ALPHANUM属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: edit_game_command

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_ALPHANUM [as 别名]
def edit_game_command(self):
        log.info("edit_game_command")
        if self.selectedGame == None:
            #32014 = Can't load selected Game
            #32015 = Edit Game Command Error
            message = "%s[CR]%s" % (util.localize(32015), util.localize(32014))
            xbmcgui.Dialog().ok(util.SCRIPTNAME, message)
            return

        origCommand = self.selectedGame.getProperty('gameCmd')
        command = xbmcgui.Dialog().input(util.localize(32135), defaultt=origCommand, type=xbmcgui.INPUT_ALPHANUM)

        if command != origCommand:
            log.info("Updating game '{0}' with command '{1}'".format(self.selectedGame.getLabel(), command))
            Game(self.gui.gdb).update(('gameCmd',), (command,), self.selectedGame.getProperty('gameId'), True)
            self.gui.gdb.commit() 
开发者ID:maloep,项目名称:romcollectionbrowser,代码行数:18,代码来源:dialogcontextmenu.py

示例2: on_keyboard_input

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_ALPHANUM [as 别名]
def on_keyboard_input(self, title, default='', hidden=False):
        # fallback for Frodo
        if self._context.get_system_version().get_version() <= (12, 3):
            keyboard = xbmc.Keyboard(default, title, hidden)
            keyboard.doModal()
            if keyboard.isConfirmed() and keyboard.getText():
                text = utils.to_unicode(keyboard.getText())
                return True, text
            else:
                return False, u''
            pass

        # Starting with Gotham (13.X > ...)
        dialog = xbmcgui.Dialog()
        result = dialog.input(title, utils.to_unicode(default), type=xbmcgui.INPUT_ALPHANUM)
        if result:
            text = utils.to_unicode(result)
            return True, text

        return False, u'' 
开发者ID:Kolifanes,项目名称:plugin.video.youtube,代码行数:22,代码来源:xbmc_context_ui.py

示例3: set_skinshortcuts_property

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_ALPHANUM [as 别名]
def set_skinshortcuts_property(self, setting="", window_header="", property_name=""):
        '''allows the user to make a setting for skinshortcuts using the special skinsettings dialogs'''
        cur_value = xbmc.getInfoLabel(
            "$INFO[Container(211).ListItem.Property(%s)]" %
            property_name).decode("utf-8")
        cur_value_label = xbmc.getInfoLabel(
            "$INFO[Container(211).ListItem.Property(%s.name)]" %
            property_name).decode("utf-8")
        if setting == "||IMAGE||":
            # select image
            label, value = self.select_image(setting, allow_multi=True, windowheader=windowheader)
        if setting:
            # use skin settings select dialog
            value, label = self.set_skin_setting(
                setting, window_header=window_header, sublevel="", cur_value_label=cur_value_label,
                skip_skin_string=True, cur_value=cur_value)
        else:
            # manually input string
            if not cur_value:
                cur_value = "None"
            value = xbmcgui.Dialog().input(window_header, cur_value, type=xbmcgui.INPUT_ALPHANUM).decode("utf-8")
            label = value
        if label:
            from skinshortcuts import set_skinshortcuts_property
            set_skinshortcuts_property(property_name, value, label) 
开发者ID:kodi-community-addons,项目名称:script.skin.helper.service,代码行数:27,代码来源:skinsettings.py

示例4: show_add_library_title_dialog

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_ALPHANUM [as 别名]
def show_add_library_title_dialog(self, original_title):
        """
        Asks the user for an alternative title for the show/movie that
        gets exported to the local library

        :param original_title: Original title of the show
        :type original_title: str

        :returns: str - Title to persist
        """
        if self.custom_export_name == 'true':
            return original_title
        dlg = xbmcgui.Dialog()
        custom_title = dlg.input(
            heading=self.get_local_string(string_id=30031),
            defaultt=original_title,
            type=xbmcgui.INPUT_ALPHANUM) or original_title
        return original_title or custom_title 
开发者ID:asciidisco,项目名称:plugin.video.netflix,代码行数:20,代码来源:Dialogs.py

示例5: promptEmulatorParams

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_ALPHANUM [as 别名]
def promptEmulatorParams(self, defaultValue):
        """ Ask the user to enter emulator parameters """
        emuParams = xbmcgui.Dialog().input(util.localize(32179), defaultt=defaultValue, type=xbmcgui.INPUT_ALPHANUM)
        return emuParams 
开发者ID:maloep,项目名称:romcollectionbrowser,代码行数:6,代码来源:wizardconfigxml.py

示例6: promptOtherConsoleName

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_ALPHANUM [as 别名]
def promptOtherConsoleName(self):
        """  Ask the user to enter a (other) console name """
        console = xbmcgui.Dialog().input(util.localize(32177), type=xbmcgui.INPUT_ALPHANUM)
        return console 
开发者ID:maloep,项目名称:romcollectionbrowser,代码行数:6,代码来源:wizardconfigxml.py

示例7: promptEmulatorFileMasks

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_ALPHANUM [as 别名]
def promptEmulatorFileMasks(self):
        fileMaskInput = xbmcgui.Dialog().input(util.localize(32181), type=xbmcgui.INPUT_ALPHANUM)
        if fileMaskInput == '':
            return []
        return fileMaskInput.split(',') 
开发者ID:maloep,项目名称:romcollectionbrowser,代码行数:7,代码来源:wizardconfigxml.py

示例8: ask_credentials

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_ALPHANUM [as 别名]
def ask_credentials():
    """
    Show some dialogs and ask the user for account credentials
    """
    email = g.py2_decode(xbmcgui.Dialog().input(
        heading=common.get_local_string(30005),
        type=xbmcgui.INPUT_ALPHANUM)) or None
    common.verify_credentials(email)
    password = ask_for_password()
    common.verify_credentials(password)
    common.set_credentials(email, password) 
开发者ID:CastagnaIT,项目名称:plugin.video.netflix,代码行数:13,代码来源:dialogs.py

示例9: ask_for_password

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_ALPHANUM [as 别名]
def ask_for_password():
    """Ask the user for the password"""
    return g.py2_decode(xbmcgui.Dialog().input(
        heading=common.get_local_string(30004),
        type=xbmcgui.INPUT_ALPHANUM,
        option=xbmcgui.ALPHANUM_HIDE_INPUT)) or None 
开发者ID:CastagnaIT,项目名称:plugin.video.netflix,代码行数:8,代码来源:dialogs.py

示例10: _ask_for_input

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_ALPHANUM [as 别名]
def _ask_for_input(heading, default_text=None):
    return g.py2_decode(xbmcgui.Dialog().input(
        defaultt=default_text,
        heading=heading,
        type=xbmcgui.INPUT_ALPHANUM)) or None 
开发者ID:CastagnaIT,项目名称:plugin.video.netflix,代码行数:7,代码来源:dialogs.py

示例11: list_search

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_ALPHANUM [as 别名]
def list_search(self):
        self.updatelisting = True if self.params.pop('updatelisting', False) else False
        org_query = self.params.get('query')
        if not self.params.get('query'):
            self.params['query'] = self.set_searchhistory(
                query=utils.try_decode_string(xbmcgui.Dialog().input(self.addon.getLocalizedString(32044), type=xbmcgui.INPUT_ALPHANUM)),
                itemtype=self.params.get('type'))
        elif self.params.get('history', '').lower() == 'true':  # Param to force history save
            self.set_searchhistory(query=self.params.get('query'), itemtype=self.params.get('type'))
        if self.params.get('query'):
            self.list_tmdb(query=self.params.get('query'), year=self.params.get('year'))
            if not org_query:
                self.params['updatelisting'] = 'True'
                container_url = u'plugin://plugin.video.themoviedb.helper/?{}'.format(utils.urlencode_params(self.params))
                xbmc.executebuiltin('Container.Update({})'.format(container_url)) 
开发者ID:jurialmunkey,项目名称:plugin.video.themoviedb.helper,代码行数:17,代码来源:container.py

示例12: login_dialog

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_ALPHANUM [as 别名]
def login_dialog():
    username = dialog.input(u'用户名:', type=xbmcgui.INPUT_ALPHANUM)
    password = dialog.input(u'密码:', type=xbmcgui.INPUT_ALPHANUM, option=xbmcgui.ALPHANUM_HIDE_INPUT)
    if username and password:
        cookie,tokens = get_auth.run(username,password)
        if tokens:
            save_user_info(username,password,cookie,tokens)
            homemenu = plugin.get_storage('homemenu')
            homemenu.clear()
            dialog.ok('',u'登录成功', u'点击返回首页并耐心等待')
            items = [{'label': u'<< 返回首页', 'path': plugin.url_for('main_menu')}]
            return plugin.finish(items, update_listing=True)
    else:
        dialog.ok('Error',u'用户名或密码不能为空')
    return None 
开发者ID:taxigps,项目名称:xbmc-addons-chinese,代码行数:17,代码来源:default.py

示例13: renamePlaylistDialog

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_ALPHANUM [as 别名]
def renamePlaylistDialog(self, playlist):
        dialog = xbmcgui.Dialog()
        title = dialog.input(_T(30233), playlist.title, type=xbmcgui.INPUT_ALPHANUM)
        ok = False
        if title:
            description = dialog.input(_T(30234), playlist.description, type=xbmcgui.INPUT_ALPHANUM)
            ok = self.rename_playlist(playlist, title, description)
        return ok 
开发者ID:arnesongit,项目名称:plugin.audio.tidal2,代码行数:10,代码来源:koditidal.py

示例14: newPlaylistDialog

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_ALPHANUM [as 别名]
def newPlaylistDialog(self):
        dialog = xbmcgui.Dialog()
        title = dialog.input(_T(30233), type=xbmcgui.INPUT_ALPHANUM)
        item = None
        if title:
            description = dialog.input(_T(30234), type=xbmcgui.INPUT_ALPHANUM)
            item = self.create_playlist(title, description)
        return item 
开发者ID:arnesongit,项目名称:plugin.audio.tidal2,代码行数:10,代码来源:koditidal.py

示例15: dialog_input

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_ALPHANUM [as 别名]
def dialog_input(heading, default='', type=xbmcgui.INPUT_ALPHANUM, option=0, delay=0):
	if type not in [xbmcgui.INPUT_ALPHANUM, xbmcgui.INPUT_NUMERIC, xbmcgui.INPUT_DATE, xbmcgui.INPUT_TIME, xbmcgui.INPUT_IPADDRESS, xbmcgui.INPUT_PASSWORD]: type = xbmcgui.INPUT_ALPHANUM
	dialog = xbmcgui.Dialog()
	return dialog.input(heading, default, type, option, delay) 
开发者ID:tvaddonsco,项目名称:plugin.git.browser,代码行数:6,代码来源:ui.py


注:本文中的xbmcgui.INPUT_ALPHANUM属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。