def __init__(self, parent, title, content, icon, timeout): SugarNotify.__init__(self, timeout) self._parent = parent self.props.title = title self.props.msg = content if icon is not None: icon = Icon(icon_name=icon) icon.show() self.props.icon = icon icon.props.pixel_size = style.SMALL_ICON_SIZE * 2 self.connect('response', self.remove_myself)
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)