def on_activity_add_clicked(self, button):
        """ appends row, jumps to it and allows user to input name """
        category_id = self._get_selected_category()

        new_activity = self.activity_store.append([-1, _("New activity"), category_id])

        (model, iter) = self.selection.get_selected()

        self.activityCell.set_property("editable", True)
        self.activity_tree.set_cursor_on_cell(model.get_path(new_activity),
                                              focus_column = self.activity_tree.get_column(0),
                                              focus_cell = None,
                                              start_editing = True)
def on_activity_add_clicked ( self , button ) : category_id = self . _get_selected_category ( ) new_activity = self . activity_store . append ( [ - 1 , _ ( "New activity" ) , category_id ] ) ( model , iter ) = self . selection . get_selected ( ) self . activityCell . set_property ( "editable" , True ) self . activity_tree . set_cursor_on_cell ( model . get_path ( new_activity ) , focus_column = self . activity_tree . get_column ( 0 ) , focus_cell = None , start_editing = True )
appends row, jumps to it and allows user to input name