예제 #1
0
 def _show_notification(self, text, blink_text=None, notification_time=None):
     text = strip_restriction_markup_and_format(text)
     self._message = strip_formatted_string(text)
     if notification_time is None:
         notification_time = self._default_notification_time
     if self._notification_timer:
         self._notification_timer.stop()
     if notification_time != -1:
         self._notification_timer = Live.Base.Timer(callback=self.hide_notification, interval=int(1000 * notification_time), repeat=False)
         self._notification_timer.start()
     if not self._visible:
         self._visible = True
         self.notify_visible()
     self.notify_message()
     self._current_notification = Notification(self)
     return ref(self._current_notification)
예제 #2
0
 def _show_notification(self, text, blink_text = None, notification_time = None):
     text = strip_restriction_markup_and_format(text)
     self._message = strip_formatted_string(text)
     if notification_time is None:
         notification_time = self._default_notification_time
     if self._notification_timer:
         self._notification_timer.stop()
     if notification_time != -1:
         self._notification_timer = Live.Base.Timer(callback=self.hide_notification, interval=int(1000 * notification_time), repeat=False)
         self._notification_timer.start()
     if not self._visible:
         self._visible = True
         self.notify_visible()
     self.notify_message()
     self._current_notification = Notification(self)
     return ref(self._current_notification)