233 del self.__timers[key] |
233 del self.__timers[key] |
234 |
234 |
235 # delete the notification |
235 # delete the notification |
236 index = self.__layout.indexOf(notification) |
236 index = self.__layout.indexOf(notification) |
237 self.__layout.takeAt(index) |
237 self.__layout.takeAt(index) |
238 self.__notifications.remove(notification) |
238 try: |
239 notification.deleteLater() |
239 self.__notifications.remove(notification) |
|
240 notification.deleteLater() |
|
241 except ValueError: |
|
242 # it was already delete by other method; ignore |
|
243 pass |
240 |
244 |
241 if self.__layout.count(): |
245 if self.__layout.count(): |
242 self.__adjustSizeAndPosition() |
246 self.__adjustSizeAndPosition() |
243 else: |
247 else: |
244 self.hide() |
248 self.hide() |