def _get_description_data(self, column, cell, model, aiter, user_data=None): self._set_colors() event_id = model[aiter][ScheduleStore.COL_EVENT_ID] if event_id == ScheduleStore.NEW_DAY: date = model[aiter][ScheduleStore.COL_DATETIME] description = "<big><b>%s</b></big>" % date.strftime("%A %x") cell.set_property("xalign", 0.5) cell.set_property("cell-background-rgba", self.date_color) else: cell.set_property("xalign", 0) cell.set_property("cell-background-rgba", self.entry_color) duration = seconds_to_time_duration_string( model[aiter][ScheduleStore.COL_DURATION]) title = model[aiter][ScheduleStore.COL_TITLE] short_desc = model[aiter][ScheduleStore.COL_SHORT_DESC] if len(short_desc) > 0: short_desc += "\n" description = "<b>%s</b>\n%s<small><i>%s: %s</i></small>" % ( title, short_desc, _("Duration"), duration) cell.set_property("markup", description)
def _get_description_data(self, column, cell, model, aiter, user_data=None): self._set_colors() event_id = model[aiter][ScheduleStore.COL_EVENT_ID] if event_id == ScheduleStore.NEW_DAY: date = model[aiter][ScheduleStore.COL_DATETIME] description = "<big><b>%s</b></big>" % date.strftime("%A %x") cell.set_property("xalign", 0.5) cell.set_property ("cell-background-rgba", self.date_color) else: cell.set_property("xalign", 0) cell.set_property ("cell-background-rgba", self.entry_color) duration = seconds_to_time_duration_string(model[aiter][ScheduleStore.COL_DURATION]) title = model[aiter][ScheduleStore.COL_TITLE] short_desc = model[aiter][ScheduleStore.COL_SHORT_DESC] if len(short_desc) > 0: short_desc += "\n" description = "<b>%s</b>\n%s<small><i>%s: %s</i></small>" % (title, short_desc, _("Duration"), duration) cell.set_property("markup", description)
def _get_duration_data(self, column, cell, model, aiter, user_data): # We have minutes but need seconds duration = model[aiter][self.COL_DURATION] * 60 duration_str = gnomedvb.seconds_to_time_duration_string(duration) cell.set_property("text", duration_str)
def set_duration(self, duration): duration_str = gnomedvb.seconds_to_time_duration_string(duration) self._duration.set_text(duration_str)
def _get_length_data(self, column, cell, model, aiter, user_data=None): duration = model[aiter][RecordingsStore.COL_DURATION] duration_str = seconds_to_time_duration_string(duration) cell.set_property("text", duration_str)
def _get_length_data(self, column, cell, model, aiter, user_data=None): duration = model[aiter][RecordingsStore.COL_DURATION] duration_str = seconds_to_time_duration_string(duration) cell.set_property("text", duration_str)
def set_duration(self, duration): duration_str = gnomedvb.seconds_to_time_duration_string(duration) self._duration.set_text(duration_str)