def cursorAtSpaceEnd(block):
            cursor = QTextCursor(block)
            cursor.setPosition(block.position() + len(blockIndentation(block)))
            return cursor
def _setup_item_button(self, item_button, icon, position=None):
    item_button.set_relief(gtk.RELIEF_NONE)