def update_header(self, row, before, *args): if before: separator = Separator() context = separator.get_style_context() set_style(context, '/ml/prevete/Daty/gtk/value.css', 'separator', True) row.set_header(separator)
def set_selection_mode(self, value): """Toggle selection mode Args: value (bool): if True, activates selection mode. """ # Titlebar self.titlebar.set_selection_mode(value) # New entity button self.entity_open.set_visible(not value) # Entities search button self.entities_search.set_visible(value) # App menu self.app_menu.set_visible(not value) # Select button self.entities_select.set_visible(not value) # Cancel selection button self.cancel_entities_selection.set_visible(value) # Sidebar self.sidebar_list.set_selection_mode(value) if value: self.column_separator = Separator() self.common = Label(label="common") self.content_box.add(self.column_separator) self.content_box.add(self.common) self.content_box.show_all() else: self.content_box.remove(self.column_separator) self.content_box.remove(self.common)
def update_header(self, row, before, *args): """See GTK+ Documentation""" if before: row.set_header(Separator())