def _display_distance(self, distance): caption = _("Distance between selected events") if distance is None: distance_text = _("Events are overlapping or distance is 0") else: distance_text = self.timeline.get_time_type().format_delta(distance) display_information_message(caption, distance_text)
def _toStr(self, value): try: return str(value) except UnicodeEncodeError: display_information_message( _("Warning"), _("The selected value contains invalid characters and can't be saved" ))
def _display_distance(self, distance): caption = _("Distance between selected events") if distance is None: distance_text = _("Events are overlapping or distance is 0") else: distance_text = self.timeline.get_time_type().format_delta( distance) display_information_message(caption, distance_text)
def date_button_on_click(self, evt): try: dt = self.date_picker.GetCopticDate() wx_date = self.date_tuple_to_wx_date(dt) except ValueError: wx_date = wx.DateTime.Now() except wx._core.PyAssertionError: display_information_message('wx.DateTime limitation', ERROR_MESSAGE) else: try: self._view.PopupCalendar(evt, wx_date) except wx._core.PyAssertionError: display_information_message('GUI control limitation', ERROR_MESSAGE)
def date_button_on_click(self, evt): try: dt = self.date_picker.GetGregorianDate() wx_date = self.date_tuple_to_wx_date(dt) except ValueError: wx_date = wx.DateTime.Now() except wx._core.PyAssertionError: display_information_message('wx.DateTime limitation', ERROR_MESSAGE) else: try: self._view.PopupCalendar(evt, wx_date) except wx._core.PyAssertionError: display_information_message('GUI control limitation', ERROR_MESSAGE)
def DisplayInformationMessage(self, caption, message): display_information_message(caption, message, parent=self)
def DisplayInformationMessage(self, label, text): display_information_message(label, text, self)
def on_click(evt): display_information_message( caption=_("Other email client"), message=_("Copy and paste this email into your favorite email client and send it from there."), parent=self)
def _toStr(self, value): try: return str(value) except UnicodeEncodeError: display_information_message(_("Warning"), _("The selected value contains invalid characters and can't be saved"))