(self, cell, path, newtext)
Update a layout name
Update a layout name
Update a layout name
def on_layout_name_edited(self, cell, path, newtext):
        """Update a layout name"""
        oldname = cell.get_property('text')
        if oldname == newtext or oldname == 'default':
            return
        dbg('Changing %s to %s' % (oldname, newtext))
        self.config.rename_layout(oldname, newtext)
        self.config.save()

        widget = self.builder.get_object('layoutlist')
        model = widget.get_model()
        itera = model.get_iter(path)
        model.set_value(itera, 0, newtext)

        if oldname == self.previous_layout_selection:
            self.previous_layout_selection = newtext

        if oldname == self.layouteditor.layout_name:
            self.layouteditor.layout_name = newtext
def on_layout_name_edited ( self , cell , path , newtext ) : oldname = cell . get_property ( 'text' ) if oldname == newtext or oldname == 'default' : return dbg ( 'Changing %s to %s' % ( oldname , newtext ) ) self . config . rename_layout ( oldname , newtext ) self . config . save ( ) widget = self . builder . get_object ( 'layoutlist' ) model = widget . get_model ( ) itera = model . get_iter ( path ) model . set_value ( itera , 0 , newtext ) if oldname == self . previous_layout_selection : self . previous_layout_selection = newtext if oldname == self . layouteditor . layout_name : self . layouteditor . layout_name = newtext