本文整理汇总了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
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)