def fromXmlString(self, xmlString):
        if not self.__isEnabled:
            self.__pending.append(xmlString)
            return
        try:
            notID, ttl, actionsHolder, guiItemsHolder, proxyDataHolder = fromString(
                xmlString)
        except ParseError as e:
            LOG_ERROR('Can not parse notification', e.message, xmlString)
            return

        return self.__makeAndShow(notID, ttl, actionsHolder, guiItemsHolder,
                                  proxyDataHolder)
Beispiel #2
0
    def fromXmlString(self, xmlString):
        if not self.__isEnabled:
            self.__pending.append(xmlString)
            return
        try:
            notID, ttl, actionsHolder, itemsHolder = fromString(xmlString)
        except ParseError as e:
            LOG_ERROR('Can not parse notification', e.message, xmlString)
            return

        if notID in self.__nots:
            LOG_WARNING('Notification already is added', notID, self.__nots[notID])
            return 0L
        vo = _NotificationVO(notID, ttl, actionsHolder, itemsHolder)
        if not vo.isActive():
            return 0L
        if not vo.validate():
            return 0L
        self.__nots[notID] = vo
        vo.showAll()
        return notID
Beispiel #3
0
    def fromXmlString(self, xmlString):
        if not self.__isEnabled:
            self.__pending.append(xmlString)
            return
        try:
            notID, ttl, actionsHolder, guiItemsHolder, proxyDataHolder = fromString(xmlString)
        except ParseError as e:
            LOG_ERROR('Can not parse notification', e.message, xmlString)
            return

        if notID in self.__nots:
            LOG_WARNING('Notification already is added', notID, self.__nots[notID])
            return 0
        vo = _NotificationVO(notID, ttl, actionsHolder, guiItemsHolder, proxyDataHolder)
        if not vo.isActive():
            return 0
        if not vo.validate():
            return 0
        self.__nots[notID] = vo
        vo.showAll()
        return notID