示例#1
0
    def __init__(self, **kwargs):

	Alert.__init__(self, **kwargs)
        self.add_button(1, _('New\nGame'), icon=None)
        self.add_button(2, _(' Change \n Numbers '), icon=None)
        self.add_button(3, _('Easy'), icon=None)
        self.add_button(4, _('Medium'), icon=None)
        self.add_button(5, _('Hard'), icon=None)
示例#2
0
 def __init__(self, parent, title, content, mtype):
     SugarAlert.__init__(self)
     self._parent = parent
     if mtype == gtk.MESSAGE_INFO:
         icon = Icon(icon_name='emblem-notification')
         icon.show()
         self.props.icon = icon
         icon.props.pixel_size = style.SMALL_ICON_SIZE * 2
     self.props.title = title
     self.props.msg = content
     ok_icon = Icon(icon_name='dialog-ok')
     self.add_button(gtk.RESPONSE_OK, _('Ok'), ok_icon)
     ok_icon.show()
     self.connect('response', self.remove_myself)