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


Python Button.show方法代码示例

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


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

示例1: add_icon_button

# 需要导入模块: from quodlibet.qltk.x import Button [as 别名]
# 或者: from quodlibet.qltk.x.Button import show [as 别名]
    def add_icon_button(self, label, icon_name, response_id):
        """Like add_button() but allows to pass an icon name"""

        button = Button(label, icon_name)
        # file chooser uses grab_default() on this
        button.set_can_default(True)
        button.show()
        self.add_action_widget(button, response_id)
        return button
开发者ID:bossjones,项目名称:quodlibet,代码行数:11,代码来源:window.py

示例2: __init__

# 需要导入模块: from quodlibet.qltk.x import Button [as 别名]
# 或者: from quodlibet.qltk.x.Button import show [as 别名]
    def __init__(self, parent):
        title = _("Uninitialized iPod")
        description = _("Do you want to create an empty database on this iPod?")

        super(ConfirmDBCreate, self).__init__(parent, title, description, buttons=Gtk.ButtonsType.NONE)

        self.add_button(_("_Cancel"), Gtk.ResponseType.CANCEL)
        save_button = Button(_("_Create Database"), "system-run")
        save_button.show()
        self.add_action_widget(save_button, self.RESPONSE_CREATE)
        self.set_default_response(Gtk.ResponseType.CANCEL)
开发者ID:faubiguy,项目名称:quodlibet,代码行数:13,代码来源:ipod.py

示例3: __init__

# 需要导入模块: from quodlibet.qltk.x import Button [as 别名]
# 或者: from quodlibet.qltk.x.Button import show [as 别名]
    def __init__(self, parent, path):
        title = _("File exists")
        fn_format = "<b>%s</b>" % util.escape(fsdecode(path))
        description = _("Replace %(file-name)s?") % {"file-name": fn_format}

        super(ConfirmFileReplace, self).__init__(
            parent, title, description, buttons=Gtk.ButtonsType.NONE)

        self.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL)
        save_button = Button(_("_Replace File"), "document-save")
        save_button.show()
        self.add_action_widget(save_button, self.RESPONSE_REPLACE)
        self.set_default_response(Gtk.ResponseType.CANCEL)
开发者ID:Konzertheld,项目名称:quodlibet,代码行数:15,代码来源:msg.py

示例4: __init__

# 需要导入模块: from quodlibet.qltk.x import Button [as 别名]
# 或者: from quodlibet.qltk.x.Button import show [as 别名]
    def __init__(self, parent):
        title = _("Set up library directories?")
        description = _("You don't have any music library set up. "
                        "Would you like to do that now?")

        super(ConfirmLibDirSetup, self).__init__(
            parent, title, description, buttons=Gtk.ButtonsType.NONE)

        cancel_button = Button(_("_Not Now"), Gtk.STOCK_CANCEL)
        cancel_button.show()
        self.add_action_widget(cancel_button, Gtk.ResponseType.CANCEL)
        save_button = Gtk.Button(label=_("_Set Up"), use_underline=True)
        save_button.show()
        self.add_action_widget(save_button, self.RESPONSE_SETUP)
        self.set_default_response(Gtk.ResponseType.CANCEL)
开发者ID:kriskielce88,项目名称:xn--ls8h,代码行数:17,代码来源:quodlibetwindow.py

示例5: __init__

# 需要导入模块: from quodlibet.qltk.x import Button [as 别名]
# 或者: from quodlibet.qltk.x.Button import show [as 别名]
    def __init__(self, parent, plugin_name, count):
        title = ngettext("Run the plugin \"%(name)s\" on %(count)d album?",
                         "Run the plugin \"%(name)s\" on %(count)d albums?",
                         count) % (plugin_name, count)

        super(ConfirmMultiAlbumInvoke, self).__init__(
            get_top_parent(parent),
            title, "",
            buttons=Gtk.ButtonsType.NONE)

        self.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL)
        delete_button = Button(_("_Run Plugin"), Gtk.STOCK_EXECUTE)
        delete_button.show()
        self.add_action_widget(delete_button, self.RESPONSE_INVOKE)
        self.set_default_response(Gtk.ResponseType.CANCEL)
开发者ID:kriskielce88,项目名称:xn--ls8h,代码行数:17,代码来源:songsmenu.py

示例6: __init__

# 需要导入模块: from quodlibet.qltk.x import Button [as 别名]
# 或者: from quodlibet.qltk.x.Button import show [as 别名]
    def __init__(self, parent, song):
        title = _("Tag may not be accurate")

        fn_format = "<b>%s</b>" % util.escape(fsdecode(song("~basename")))
        description = _("%(file-name)s changed while the program was running. "
            "Saving without refreshing your library may "
            "overwrite other changes to the song.") % {"file-name": fn_format}

        super(OverwriteWarning, self).__init__(
            parent, title, description, buttons=Gtk.ButtonsType.NONE)

        self.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL)
        save_button = Button(_("_Save"), "document-save")
        save_button.show()
        self.add_action_widget(save_button, self.RESPONSE_SAVE)
        self.set_default_response(Gtk.ResponseType.CANCEL)
开发者ID:Konzertheld,项目名称:quodlibet,代码行数:18,代码来源:_editutils.py

示例7: __init__

# 需要导入模块: from quodlibet.qltk.x import Button [as 别名]
# 或者: from quodlibet.qltk.x.Button import show [as 别名]
    def __init__(self, parent, paths, description):
        title = ngettext(
            "Delete %(file_count)d file permanently?",
            "Delete %(file_count)d files permanently?",
            len(paths)) % {
                "file_count": len(paths),
            }

        super(DeleteDialog, self).__init__(
            get_top_parent(parent),
            title, description,
            buttons=Gtk.ButtonsType.NONE)

        area = self.get_message_area()
        exp = FileListExpander(paths)
        exp.show()
        area.pack_start(exp, False, True, 0)

        self.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL)
        delete_button = Button(_("_Delete Files"), Gtk.STOCK_DELETE)
        delete_button.show()
        self.add_action_widget(delete_button, self.RESPONSE_DELETE)
        self.set_default_response(Gtk.ResponseType.CANCEL)
开发者ID:kriskielce88,项目名称:xn--ls8h,代码行数:25,代码来源:delete.py


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